Skip to content

feat: error type for not finding basic auth creds and export config path#674

Merged
Wwwsylvia merged 15 commits into
oras-project:mainfrom
qweeah:empty-basic-creds
Jan 17, 2024
Merged

feat: error type for not finding basic auth creds and export config path#674
Wwwsylvia merged 15 commits into
oras-project:mainfrom
qweeah:empty-basic-creds

Conversation

@qweeah

@qweeah qweeah commented Jan 9, 2024

Copy link
Copy Markdown
Contributor

Two changes proposed in this PR

  1. When failed to fetch credentials for basic auth, return a new error
  2. Add a new function to DynamicStore

An example usage of the proposed change: oras-project/oras#1235, resolves #676

qweeah added 3 commits January 8, 2024 09:18
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
@codecov

codecov Bot commented Jan 9, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3b1dd0e) 75.71% compared to head (f1d1a3d) 75.78%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #674      +/-   ##
==========================================
+ Coverage   75.71%   75.78%   +0.06%     
==========================================
  Files          59       59              
  Lines        5765     5769       +4     
==========================================
+ Hits         4365     4372       +7     
+ Misses       1028     1026       -2     
+ Partials      372      371       -1     

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

Comment thread registry/remote/credentials/store.go Outdated
Comment thread errdef/errors.go Outdated
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
@qweeah qweeah marked this pull request as ready for review January 11, 2024 11:17
Comment thread registry/remote/auth/client.go
Comment thread registry/remote/credentials/internal/config/config.go Outdated
Comment thread registry/remote/credentials/store.go
Comment thread registry/remote/credentials/store.go Outdated
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Comment thread registry/remote/credentials/store.go Outdated
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>

@Wwwsylvia Wwwsylvia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

@Wwwsylvia

Copy link
Copy Markdown
Member

I think this change is a feat instead of a chore as it introduces public types and methods.

@qweeah qweeah changed the title chore(ux): export a new error type for not finding basic auth creds feat: export a new error type for not finding basic auth creds Jan 12, 2024
@qweeah qweeah changed the title feat: export a new error type for not finding basic auth creds feat: error type for not finding basic auth creds and export config path Jan 12, 2024
Comment thread registry/remote/auth/client.go
Comment thread registry/remote/credentials/store.go Outdated
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
Comment thread registry/remote/auth/client.go
Signed-off-by: Billy Zha <jinzha1@microsoft.com>

@Wwwsylvia Wwwsylvia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM with a nit suggestion

Comment thread registry/remote/auth/client.go Outdated
Signed-off-by: Billy Zha <jinzha1@microsoft.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

@Wwwsylvia Wwwsylvia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@Wwwsylvia Wwwsylvia merged commit d8783fe into oras-project:main Jan 17, 2024
@Wwwsylvia Wwwsylvia mentioned this pull request Jan 26, 2024
4 tasks
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.

add exported function to get the path of a DynamicStore's underlying config file

3 participants