Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: API deprecate returning config for bulk endpoints #8732

Merged
merged 3 commits into from
Jan 25, 2024

Conversation

NicholasBlaskey
Copy link
Contributor

Description

Deprecate experiment config for bulk endpoints for performance reasons.

Remove this in a future version.

Test Plan

No testing needed

Commentary (optional)

Checklist

  • Changes have been manually QA'd
  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.
  • Licenses should be included for new code which was copied and/or modified from any external code.

Ticket

@NicholasBlaskey NicholasBlaskey requested a review from a team as a code owner January 23, 2024 18:05
@cla-bot cla-bot bot added the cla-signed label Jan 23, 2024
Copy link

netlify bot commented Jan 23, 2024

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit c5d459b
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/65b127d1b60ce10008c0bce3

@determined-ci determined-ci requested a review from a team January 23, 2024 18:05
@determined-ci determined-ci added the documentation Improvements or additions to documentation label Jan 23, 2024
Copy link
Contributor

@hamidzr hamidzr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good. how are you thinking we'd change the message definitions to achieve this? two copies of message Experiment? changing the field type? zero value

@@ -132,6 +132,7 @@ message Experiment {
// workspace).
bool parent_archived = 25;
// The configuration of the experiment.
// Will soon not be returned in list endpoints.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a deprecated annotation we'd probably want to use [deprecated = true];

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I misunderstood the change that added it initially, I assumed that config was just a nullable field that we started setting but now realize we did change the proto definitions. What do you think about basically just undoing this change?

3358e90#diff-0614f7e081e8db8d04bb236499cb0e1440bce3f5920e1c2b6a12aee860c28133R39

So add [deprecated = true] to experiments child and then add config back to GetExperimentResponse, I'll update the release note / proto deprecate notice if you think that change makes sense

Copy link
Contributor Author

@NicholasBlaskey NicholasBlaskey Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made those changes in this PR, let me know if you think it looks good

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would achieve what the PR set out to do and you've probably checked these to double check:
what would our internal clients prefer? maybe what you were thinking in terms of having it be nullable and set on demand would make sense. A full revert of that would seem also add an endpoint that @mapmeld removed there. Do we have other endpoints to let the clients pull these configs in bulk?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I didn't mean actually reverting the PR just undoing the config change that moved config from GetExperimentResponse to the proto experiment

No I don't think we have other endpoints that allow clients to do this currently but what I will say is that no one has used the config field in the year and a half for a valid use case. We use it for searcher name / type but we return this as a column on the experiment.

So I think removing then if someone has a valid use case making an optional parameter that sets it or making a different endpoint to support this would be the right call then.

On having it nullable and set on demand specifically I think this hard to do in a "type safe" way to do with proto. I'm not opposed to it but I think the change as is more clear from a type perspective.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good. :shipit:

Copy link

codecov bot commented Jan 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (62941a2) 47.25% compared to head (c5d459b) 47.26%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8732   +/-   ##
=======================================
  Coverage   47.25%   47.26%           
=======================================
  Files        1045     1045           
  Lines      166697   166711   +14     
  Branches     2244     2243    -1     
=======================================
+ Hits        78777    78792   +15     
+ Misses      87762    87761    -1     
  Partials      158      158           
Flag Coverage Δ
backend 40.94% <100.00%> (+<0.01%) ⬆️
harness 64.30% <100.00%> (+<0.01%) ⬆️
web 42.57% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
harness/determined/common/api/bindings.py 40.59% <100.00%> (+0.04%) ⬆️
master/internal/api_experiment.go 54.34% <100.00%> (+0.02%) ⬆️
master/pkg/model/experiment.go 11.76% <ø> (ø)
webui/react/src/services/api-ts-sdk/api.ts 47.65% <100.00%> (+<0.01%) ⬆️

... and 3 files with indirect coverage changes

@hamidzr
Copy link
Contributor

hamidzr commented Jan 25, 2024

is this the commit doing the revert e3d96ac ?

@NicholasBlaskey
Copy link
Contributor Author

NicholasBlaskey commented Jan 25, 2024

is this the commit doing the revert e3d96ac ?

Yeah it isn't a literal revert but I would just review the changes as this PR and not look per commit

let me know if you think it looks good

@NicholasBlaskey NicholasBlaskey merged commit d68ffaa into main Jan 25, 2024
75 of 86 checks passed
@NicholasBlaskey NicholasBlaskey deleted the deprecate_exp_config_in_list_endpoints branch January 25, 2024 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed documentation Improvements or additions to documentation User-facing API Change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants