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: canonicalize master urls shim code #8919

Merged
merged 1 commit into from
Feb 28, 2024
Merged

Conversation

rb-determined-ai
Copy link
Member

Since we are now stricter about what is a valid master_url (rejecting some silly things like usernames or fragments that make no sense in the url), we must take special care when reading auth.json written by old versions of our code.

Without this fix, users who mistakenly logged in in the past with

DET_USER=http://user@mymaster

would have a broken CLI because the shim code would puke every time it tried to upgrade auth.json from v1 to v2.

@rb-determined-ai rb-determined-ai added the to-cherry-pick Pull requests that need to be cherry-picked into the current release label Feb 28, 2024
@rb-determined-ai rb-determined-ai requested a review from a team as a code owner February 28, 2024 20:12
@cla-bot cla-bot bot added the cla-signed label Feb 28, 2024
Copy link

netlify bot commented Feb 28, 2024

Deploy Preview for determined-ui canceled.

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

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

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

Project coverage is 44.48%. Comparing base (392f054) to head (befeda7).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8919      +/-   ##
==========================================
- Coverage   48.42%   44.48%   -3.94%     
==========================================
  Files         743      715      -28     
  Lines      136157   134422    -1735     
  Branches     2235     2236       +1     
==========================================
- Hits        65929    59804    -6125     
- Misses      70070    74460    +4390     
  Partials      158      158              
Flag Coverage Δ
backend 34.20% <ø> (ø)
harness 50.16% <10.00%> (-13.54%) ⬇️
web 42.53% <ø> (ø)

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

Files Coverage Δ
harness/tests/common/api/test_authentication.py 13.33% <0.00%> (-86.67%) ⬇️
harness/determined/common/api/authentication.py 17.22% <11.11%> (-67.64%) ⬇️

... and 154 files with indirect coverage changes

Since we are now stricter about what is a valid master_url (rejecting
some silly things like usernames or fragments that make no sense in the
url), we must take special care when reading auth.json written by old
versions of our code.

Without this fix, users who mistakenly logged in in the past with

    DET_USER=http://user@mymaster

would have a broken CLI because the shim code would puke every time it
tried to upgrade auth.json from v1 to v2.
Copy link
Contributor

@azhou-determined azhou-determined left a comment

Choose a reason for hiding this comment

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

lgtm

@rb-determined-ai
Copy link
Member Author

only failures look like known flakes, I'm force-landing this.

@rb-determined-ai rb-determined-ai merged commit 3a3b668 into main Feb 28, 2024
65 of 80 checks passed
@rb-determined-ai rb-determined-ai deleted the rb/master-url branch February 28, 2024 21:22
dai-release bot pushed a commit that referenced this pull request Feb 28, 2024
Since we are now stricter about what is a valid master_url (rejecting
some silly things like usernames or fragments that make no sense in the
url), we must take special care when reading auth.json written by old
versions of our code.

Without this fix, users who mistakenly logged in in the past with

    DET_USER=http://user@mymaster

would have a broken CLI because the shim code would puke every time it
tried to upgrade auth.json from v1 to v2.

(cherry picked from commit 3a3b668)
maxrussell pushed a commit that referenced this pull request Mar 21, 2024
Since we are now stricter about what is a valid master_url (rejecting
some silly things like usernames or fragments that make no sense in the
url), we must take special care when reading auth.json written by old
versions of our code.

Without this fix, users who mistakenly logged in in the past with

    DET_USER=http://user@mymaster

would have a broken CLI because the shim code would puke every time it
tried to upgrade auth.json from v1 to v2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed to-cherry-pick Pull requests that need to be cherry-picked into the current release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants