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

feat: make --identity-token an alias of --password #1294

Merged
merged 9 commits into from
Apr 12, 2024

Conversation

wangxiaoxuan273
Copy link
Contributor

@wangxiaoxuan273 wangxiaoxuan273 commented Mar 18, 2024

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #742

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

@wangxiaoxuan273
Copy link
Contributor Author

wangxiaoxuan273 commented Mar 18, 2024

Current display:
image
issue
image

Copy link

codecov bot commented Mar 18, 2024

Codecov Report

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

Project coverage is 84.49%. Comparing base (bb3443d) to head (46bfbe3).

Files Patch % Lines
cmd/oras/internal/option/remote.go 89.74% 3 Missing and 1 partial ⚠️
cmd/oras/root/login.go 42.85% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1294      +/-   ##
==========================================
+ Coverage   84.40%   84.49%   +0.08%     
==========================================
  Files         101      101              
  Lines        3617     3637      +20     
==========================================
+ Hits         3053     3073      +20     
  Misses        335      335              
  Partials      229      229              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@qweeah
Copy link
Contributor

qweeah commented Mar 19, 2024

-u xxx --identity-token xxx usage should be banned, see #742 (comment) <= just find this has already been resolved, good catch.

cmd/oras/root/login.go Outdated Show resolved Hide resolved
cmd/oras/root/login.go Outdated Show resolved Hide resolved
@TerryHowe
Copy link
Member

Closes: #1040

Copy link
Contributor

@qweeah qweeah left a comment

Choose a reason for hiding this comment

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

LGTM, created #1301 as a follow up so we can make the flag confliction check easier.

@shizhMSFT
Copy link
Contributor

LGTM, created #1301 as a follow up so we can make the flag confliction check easier.

Can we resolve #1301 first and then this PR since it really simplifies the code a lot?

cmd/oras/internal/option/remote.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/remote.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/remote.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/remote.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/remote.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/remote.go Outdated Show resolved Hide resolved
Copy link
Contributor

@qweeah qweeah left a comment

Choose a reason for hiding this comment

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

LGTM

cmd/oras/internal/option/remote.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/remote.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/remote.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/remote.go Outdated Show resolved Hide resolved
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Signed-off-by: Xiaoxuan Wang <[email protected]>
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@qweeah qweeah left a comment

Choose a reason for hiding this comment

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

LGTM

@qweeah qweeah merged commit 61557e0 into oras-project:main Apr 12, 2024
8 checks passed
@wangxiaoxuan273 wangxiaoxuan273 deleted the token branch April 15, 2024 02:58
FeynmanZhou pushed a commit to FeynmanZhou/oras that referenced this pull request May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make --identity-token an alias of --password
4 participants