Skip to content

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

Merged
qweeah merged 9 commits into
oras-project:mainfrom
wangxiaoxuan273:token
Apr 12, 2024
Merged

feat: make --identity-token an alias of --password#1294
qweeah merged 9 commits into
oras-project:mainfrom
wangxiaoxuan273:token

Conversation

@wangxiaoxuan273

@wangxiaoxuan273 wangxiaoxuan273 commented Mar 18, 2024

Copy link
Copy Markdown
Contributor

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

wangxiaoxuan273 commented Mar 18, 2024

Copy link
Copy Markdown
Contributor Author

Current display:
image
issue
image

@codecov

codecov Bot commented Mar 18, 2024

Copy link
Copy Markdown

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.

Comment thread cmd/oras/internal/option/remote.go Outdated
@qweeah

qweeah commented Mar 19, 2024

Copy link
Copy Markdown
Contributor

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

Comment thread cmd/oras/root/login.go Outdated
Comment thread cmd/oras/root/login.go Outdated
Comment thread cmd/oras/internal/option/remote.go Outdated
Comment thread cmd/oras/internal/option/remote.go Outdated
Comment thread cmd/oras/internal/option/remote.go Outdated
Comment thread cmd/oras/internal/option/remote.go Outdated
Comment thread cmd/oras/internal/option/remote.go Outdated
@TerryHowe

Copy link
Copy Markdown
Member

Closes: #1040

Comment thread cmd/oras/internal/option/remote.go Outdated
Comment thread cmd/oras/internal/option/remote.go Outdated
Comment thread cmd/oras/internal/option/remote.go Outdated

@qweeah qweeah left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread cmd/oras/internal/option/remote.go Outdated
@shizhMSFT

Copy link
Copy Markdown
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?

Comment thread cmd/oras/internal/option/remote.go Outdated
Comment thread cmd/oras/internal/option/remote.go Outdated
Comment thread cmd/oras/internal/option/remote.go Outdated
Comment thread cmd/oras/internal/option/remote.go Outdated
Comment thread cmd/oras/internal/option/remote.go Outdated
Comment thread cmd/oras/internal/option/remote.go Outdated
Comment thread cmd/oras/internal/option/remote.go Outdated
Comment thread test/e2e/suite/auth/auth.go
Comment thread cmd/oras/internal/option/remote.go Outdated

@qweeah qweeah left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread cmd/oras/internal/option/remote.go Outdated
Comment thread cmd/oras/internal/option/remote.go Outdated
Comment thread cmd/oras/internal/option/remote.go Outdated
Comment thread cmd/oras/internal/option/remote.go Outdated
Comment thread cmd/oras/internal/option/remote.go Outdated
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>

@shizhMSFT shizhMSFT left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@qweeah qweeah left a comment

Copy link
Copy Markdown
Contributor

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
@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
Signed-off-by: Xiaoxuan Wang <wangxiaoxuan119@gmail.com>
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