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

Resolve registry auth URL by registry ID. Fixes issue #1688. #1694

Merged

Conversation

wajda
Copy link
Contributor

@wajda wajda commented Jul 16, 2023

fixes #1688

When registry is Docker Hub the authentication URL should be exactly "https://index.docker.io/v1/".
This PR adds a private method getRegistryUrl to the AuthConfig class that resolves authentication URL for the given registry ID.

This PR is related to the PR #1578.

Signed-off-by: Oleksandr Vayda <oleksandr.vayda@gmail.com>
@wajda wajda force-pushed the bugfix/1688-auth-failed-docker.io branch from 1bbc57f to 9b55e6c Compare July 16, 2023 23:39
@rohanKanojia
Copy link
Member

@wajda : Thanks for the PR. Could you please add some test to validate this fix?

@codecov
Copy link

codecov bot commented Jul 17, 2023

Codecov Report

Merging #1694 (7d25453) into master (6eeb78a) will increase coverage by 0.01%.
The diff coverage is 100.00%.

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

@@             Coverage Diff              @@
##             master    #1694      +/-   ##
============================================
+ Coverage     64.01%   64.03%   +0.01%     
- Complexity     2198     2200       +2     
============================================
  Files           171      171              
  Lines          9985     9989       +4     
  Branches       1371     1371              
============================================
+ Hits           6392     6396       +4     
  Misses         3058     3058              
  Partials        535      535              
Impacted Files Coverage Δ
...ava/io/fabric8/maven/docker/access/AuthConfig.java 100.00% <100.00%> (ø)

Signed-off-by: Oleksandr Vayda <oleksandr.vayda@gmail.com>
@wajda
Copy link
Contributor Author

wajda commented Jul 17, 2023

@wajda : Thanks for the PR. Could you please add some test to validate this fix?

Sure, done.

@wajda
Copy link
Contributor Author

wajda commented Jul 19, 2023

@rohanKanojia can you approve workflows please?

@sonarcloud
Copy link

sonarcloud bot commented Jul 19, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@wajda
Copy link
Contributor Author

wajda commented Jul 19, 2023

I'm not sure why the test on Java 8 on Windows fails. I guess it's not related to this PR. Can you check please?

Error:  Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.094 s <<< FAILURE! - in io.fabric8.maven.docker.assembly.TrackArchiverCollectionTest
Error:  multipleAssemblies  Time elapsed: 0.094 s  <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: <1> but was: <0>
	at io.fabric8.maven.docker.assembly.TrackArchiverCollectionTest.multipleAssemblies(TrackArchiverCollectionTest.java:57)

@wajda
Copy link
Contributor Author

wajda commented Jul 24, 2023

Hi team, @rohanKanojia,
Can you suggest when approximately this PR can be merged and a new release published on Maven central?
It's blocking some work on my side, and I'm wondering if I should wait or proceed with my fork. The first option is more preferred as my POM with this plugin is shared, but having to switch to my version would mean changing "groupId" which I'd like to avoid.
Thank you.

@rohanKanojia rohanKanojia merged commit c376e3d into fabric8io:master Jul 24, 2023
9 checks passed
@rohanKanojia
Copy link
Member

@wajda : Thanks for your PR!

Let me try to cut a new release this weekend. Thanks for your patience 🙏

@rohanKanojia
Copy link
Member

@wajda : Hi, I just released v0.43.1 to maven central. Could you please test it and provide feedback whenever you get time?

@wajda
Copy link
Contributor Author

wajda commented Jul 28, 2023

@wajda : Hi, I just released v0.43.1 to maven central. Could you please test it and provide feedback whenever you get time?

It works as expected. Thank you @rohanKanojia and have a nice weekend!

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.

Buildx: insufficient_scope: authorization failed
2 participants