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

chore: dependabot upgrade grpc/go-jose/net [RM-66] #9280

Merged
merged 6 commits into from
May 2, 2024

Conversation

NicholasBlaskey
Copy link
Contributor

@NicholasBlaskey NicholasBlaskey commented May 1, 2024

Ticket

Description

Manually applied these since I think dependabot got bugged out in the prs trying for this #9189

Hopefully new prs won't have the same issue.

Test Plan

CI passes

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.

@NicholasBlaskey NicholasBlaskey requested a review from a team as a code owner May 1, 2024 19:51
@NicholasBlaskey NicholasBlaskey requested a review from salonig23 May 1, 2024 19:51
@cla-bot cla-bot bot added the cla-signed label May 1, 2024
Copy link

netlify bot commented May 1, 2024

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit f3579d0
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/6633b76616934a00090a191a

Copy link

codecov bot commented May 1, 2024

Codecov Report

Attention: Patch coverage is 20.00000% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 44.58%. Comparing base (e4c6afe) to head (7b857ac).
Report is 4 commits behind head on main.

❗ Current head 7b857ac differs from pull request most recent head f3579d0. Consider uploading reports for the commit f3579d0 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9280      +/-   ##
==========================================
- Coverage   44.58%   44.58%   -0.01%     
==========================================
  Files        1275     1275              
  Lines      156216   156219       +3     
  Branches     2451     2451              
==========================================
+ Hits        69647    69648       +1     
- Misses      86329    86331       +2     
  Partials      240      240              
Flag Coverage Δ
backend 41.74% <100.00%> (+<0.01%) ⬆️
harness 64.09% <0.00%> (-0.01%) ⬇️
web 35.00% <ø> (ø)

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

Files Coverage Δ
master/internal/audit.go 73.68% <100.00%> (ø)
harness/determined/common/api/_session.py 83.46% <0.00%> (-2.02%) ⬇️

... and 1 file with indirect coverage changes

@NicholasBlaskey NicholasBlaskey requested a review from a team as a code owner May 1, 2024 21:29
@@ -50,7 +50,10 @@ def _get_error_str(r: requests.models.Response) -> str:
if mes is not None:
return str(mes)
# Try getting GRPC error description if message does not exist.
return str(json_resp.get("error").get("error"))
error = json_resp.get("error")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@azhou-determined this change related to changing the grpc version

With the grpc upgrade status messages get set even if it was wrapped so we can have messages that look like this now

 det dev curl /api/v1/tasks/dsaaaaaa/logs
{
  "error": {
    "details": [],
    "grpcCode": 5,
    "httpCode": 404,
    "httpStatus": "Not Found",
    "message": "1 error occurred:\n\t* failed to fetch batch: rpc error: code = NotFound desc = task 'dsaaaaaa' not found\n\n"
  }
}

while before this upgrade it would be a 500 error and not hit this code path.

Copy link
Contributor

@azhou-determined azhou-determined May 2, 2024

Choose a reason for hiding this comment

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

nit: maybe a comment here would be helpful, i've always found this logic pretty unintelligible.

IIUC, there's a total of 3 different error messages we now have: resp.message for echo-level errors, this resp.error.message for certain (streaming?) grpc errors, then resp.error.error for generic(?) grpc errors.

Copy link
Contributor

Choose a reason for hiding this comment

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

btw, i get messages in this format even without this upgrade:

det dev curl /api/v1/tasks/dsaaaaaa/logs
{
  "error": {
    "details": [],
    "grpcCode": 2,
    "httpCode": 500,
    "httpStatus": "Internal Server Error",
    "message": "1 error occurred:\n\t* failed to fetch batch: rpc error: code = NotFound desc = task 'dsaaaaaa' not found\n\n"
  }
}

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 guess it would run into this exception before the upgrade?

@@ -47,7 +47,7 @@ func auditLogMiddleware() echo.MiddlewareFunc {
}

for path := range staticWebDirectoryPaths {
if strings.HasPrefix(c.Path(), path) {
if strings.HasPrefix(c.Request().URL.Path, path) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@salonig23 this was a failing test I think because of this echo change

"Return an empty string for ctx.path if there is no registered path labstack/echo#2385"

Using the request path is always correct here I think. Other usages of Path look to be correct with the new change.

Copy link
Contributor

@salonig23 salonig23 left a comment

Choose a reason for hiding this comment

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

LGTM

@NicholasBlaskey NicholasBlaskey merged commit 2164912 into main May 2, 2024
77 of 92 checks passed
@NicholasBlaskey NicholasBlaskey deleted the dependabot_upgrades branch May 2, 2024 16:26
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