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

fix: patch request body parsing for model metadata [DET-3939] #1144

Merged
merged 4 commits into from
Aug 20, 2020

Conversation

sidneyw
Copy link
Contributor

@sidneyw sidneyw commented Aug 20, 2020

Description

It is unclear why this changed, however patch requests weren't parsing the request body. The update mask was automatically filled in though. I suspect something in the grpc reverse proxy is to blame but wasn't able to root cause this issue. This PR offers the same functionality as before but uses the body: "*" request parsing.

Test Plan

Adding a better E2E test as a follow on.

Commentary (optional)

@cla-bot cla-bot bot added the cla-signed label Aug 20, 2020
@sidneyw sidneyw changed the title Change patch request body parsing for model metadata [DET-3939] fix: patch request body parsing for model metadata [DET-3939] Aug 20, 2020
@hamidzr
Copy link
Member

hamidzr commented Aug 20, 2020

the swagger error seems to come from

del spec["definitions"]["protobufFieldMask"]

update: yep this is it.

Copy link
Member

@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.

would we also need to update our python library and how we call the API to nest it under model?
common/determined_common/experimental/model.py
Screen Capture_select-area_20200820113322

  • just to note, the current change means that requesting with only description or only metadata clears the other.

@hamidzr hamidzr assigned sidneyw and unassigned hamidzr Aug 20, 2020
@@ -77,8 +77,6 @@ message PostModelResponse {
message PatchModelRequest {
// The model desired model fields and values.
determined.model.v1.Model model = 1;
// An update mask for the above model.
Copy link
Member

Choose a reason for hiding this comment

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

nit: can we remove the fieldmask import as well

@sidneyw
Copy link
Contributor Author

sidneyw commented Aug 20, 2020

This is the case #1144 (review). There is no way to differentiate between a user not sending the field and the user attempting to clear the field.

@hamidzr
Copy link
Member

hamidzr commented Aug 20, 2020

This is the case #1144 (review). There is no way to differentiate between a user not sending the field and the user attempting to clear the field.

I think we could separate the patch requests into multiple endpoints and that'd fix this but I'm not sure that's more ideal especially considering we're waiting on this for release.

@sidneyw sidneyw merged commit cdd2b72 into determined-ai:master Aug 20, 2020
@sidneyw sidneyw deleted the fix/registry-update branch August 20, 2020 19:31
determined-dsw pushed a commit that referenced this pull request Aug 20, 2020
It is unclear why this changed, however patch requests weren't parsing the request body.

(cherry picked from commit cdd2b72)
azhou-determined pushed a commit that referenced this pull request Dec 7, 2023
Make an error message for token invalidation more informative.
It wraps the `jwt` error so that `errors.Is()` recognizes it down stream.
The error message now reads "token is expired since it has been invalidated".

(cherry picked from commit 3f80919fe224a6cec7e2fab526f660c888b0413d)
wes-turner pushed a commit that referenced this pull request Feb 2, 2024
Make an error message for token invalidation more informative.
It wraps the `jwt` error so that `errors.Is()` recognizes it down stream.
The error message now reads "token is expired since it has been invalidated".
@dannysauer dannysauer added this to the 0.13.2 milestone Feb 6, 2024
rb-determined-ai pushed a commit that referenced this pull request Feb 29, 2024
Make an error message for token invalidation more informative.
It wraps the `jwt` error so that `errors.Is()` recognizes it down stream.
The error message now reads "token is expired since it has been invalidated".
amandavialva01 pushed a commit that referenced this pull request Mar 18, 2024
Make an error message for token invalidation more informative.
It wraps the `jwt` error so that `errors.Is()` recognizes it down stream.
The error message now reads "token is expired since it has been invalidated".
eecsliu pushed a commit that referenced this pull request Apr 18, 2024
Make an error message for token invalidation more informative.
It wraps the `jwt` error so that `errors.Is()` recognizes it down stream.
The error message now reads "token is expired since it has been invalidated".
eecsliu pushed a commit to determined-ai/determined-release-testing that referenced this pull request Apr 22, 2024
)

Make an error message for token invalidation more informative.
It wraps the `jwt` error so that `errors.Is()` recognizes it down stream.
The error message now reads "token is expired since it has been invalidated".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants