Skip to content

Conversation

yurnov
Copy link
Contributor

@yurnov yurnov commented Nov 29, 2024

SUMMARY

The new module helm_registry_auth module support login and logout to OCI registry (helm registry login and helm registry logout command)

It's addressed issue #578

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

helm_registry_auth

ADDITIONAL INFORMATION

Similar was started as #601 but it wasn't completed for a while. Module in this PR is already used in my lab environment.

PR include a changelog, documentation and integration tests.

Copy link

Copy link

Copy link

Copy link

Copy link

Copy link

@yurnov
Copy link
Contributor Author

yurnov commented Nov 29, 2024

Hi @gravesm @abikouo,

it seems that Kubevirt tests failed for a reason that is not related to this PR. Could you please check? And also review this PR.

Copy link

@yurnov yurnov mentioned this pull request Dec 10, 2024
32 tasks
Copy link

Copy link

@abikouo
Copy link
Contributor

abikouo commented Dec 12, 2024

@yurnov, another thing: integration tests are not running because the following file is missing: tests/integration/targets/helm_registry_auth/aliases. Please add it with the following content: time=16. It seems this is the estimated time for the target to run.

@yurnov
Copy link
Contributor Author

yurnov commented Dec 12, 2024

@yurnov, another thing: integration tests are not running because the following file is missing: tests/integration/targets/helm_registry_auth/aliases. Please add it with the following content: time=16. It seems this is the estimated time for the target to run.

Done

Copy link

Copy link

@yurnov
Copy link
Contributor Author

yurnov commented Dec 12, 2024

Finally, integration test fixed

Copy link

@abikouo abikouo added the test-all-the-targets In order to tell to the integration test splitter to test all targets label Dec 13, 2024
Goal is to bring c8a33c7 into helm_login
Copy link

@yurnov
Copy link
Contributor Author

yurnov commented Dec 14, 2024

Merged main to PR to bring #827 (fix for helm tests)

@abikouo
Copy link
Contributor

abikouo commented Dec 17, 2024

@yurnov CI is stable now, could you please rebase your PR and address merge conflicts? Thanks

this commit bring a fix for the integration text merged witin the PR ansible-collections#830
@yurnov
Copy link
Contributor Author

yurnov commented Dec 17, 2024

@yurnov CI is stable now, could you please rebase your PR and address merge conflicts? Thanks

Sure, I just did this.

Thanks for your valuable help. May I ask you also to review PR #831 and add a skip-changelog label as it trivial documendation-only change?

Copy link

Copy link

@abikouo abikouo merged commit aee8474 into ansible-collections:main Dec 17, 2024
56 checks passed
Copy link

patchback bot commented Dec 17, 2024

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/aee847431af7e96dce5bb0f2b14adaf150813db8/pr-800

Backported as #836

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Dec 17, 2024
* new module helm_registry_auth

* Initial integration tests

* final update copyright and integration test before pr

* update link to pr in changelog fragment

* reformat plugins/module_utils/helm.py with black

to fix linters in actions

* attempt to fix unit test

unit test was missing initially

* fix https://pycqa.github.io/isort/ linter

* next attemp to fix unit-test

* remove unused and unsupported helm_args_common

* remove unused imports and fix other linters errors

* another fix for unit test

* fix issue introducied by commit ff02893

* add binary_path to arg_spec

* return helm_cmd in the output of check mode

remove changlog fragment

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* remove changed from module return

Co-authored-by: Bikouo Aubin <[email protected]>

* remove redundant code

Co-authored-by: Bikouo Aubin <[email protected]>

* Update plugins/modules/helm_registry_auth.py

Co-authored-by: Bikouo Aubin <[email protected]>

* consider support of logout when user is not logged in

Co-authored-by: Bikouo Aubin <[email protected]>

* consider support helm < 3.0.0

* Revert "consider support helm < 3.0.0"

This reverts commit f20004d.

* reintroduce support of helm version less than 3.8.0

reference: https://helm.sh/docs/topics/registries/#enabling-oci-support-prior-to-v380

* revert reintroducing support of helm < 3.8.0

reason: didn't find a quick way to deal with tests

* update documentation with the recent module updates

* Update plugins/modules/helm_registry_auth.py

Co-authored-by: Bikouo Aubin <[email protected]>

* add test of logout impendency

Co-authored-by: Bikouo Aubin <[email protected]>

* fix linters

* fix intendations in the integration tests

* create tests/integration/targets/helm_registry_auth/aliases

* fix integration test (typo)

* fix integration tests (test wrong cred)

* add stderr when module fail

* another attempt to fix integration test

* fix assertion in integration test to be not affceted by the #830

---------

Co-authored-by: Bikouo Aubin <[email protected]>
(cherry picked from commit aee8474)
abikouo pushed a commit that referenced this pull request Dec 17, 2024
* new module helm_registry_auth

* Initial integration tests

* final update copyright and integration test before pr

* update link to pr in changelog fragment

* reformat plugins/module_utils/helm.py with black

to fix linters in actions

* attempt to fix unit test

unit test was missing initially

* fix https://pycqa.github.io/isort/ linter

* next attemp to fix unit-test

* remove unused and unsupported helm_args_common

* remove unused imports and fix other linters errors

* another fix for unit test

* fix issue introducied by commit ff02893

* add binary_path to arg_spec

* return helm_cmd in the output of check mode

remove changlog fragment

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* description suggestion from reviewer/maintainer

Co-authored-by: Bikouo Aubin <[email protected]>

* remove changed from module return

Co-authored-by: Bikouo Aubin <[email protected]>

* remove redundant code

Co-authored-by: Bikouo Aubin <[email protected]>

* Update plugins/modules/helm_registry_auth.py

Co-authored-by: Bikouo Aubin <[email protected]>

* consider support of logout when user is not logged in

Co-authored-by: Bikouo Aubin <[email protected]>

* consider support helm < 3.0.0

* Revert "consider support helm < 3.0.0"

This reverts commit f20004d.

* reintroduce support of helm version less than 3.8.0

reference: https://helm.sh/docs/topics/registries/#enabling-oci-support-prior-to-v380

* revert reintroducing support of helm < 3.8.0

reason: didn't find a quick way to deal with tests

* update documentation with the recent module updates

* Update plugins/modules/helm_registry_auth.py

Co-authored-by: Bikouo Aubin <[email protected]>

* add test of logout impendency

Co-authored-by: Bikouo Aubin <[email protected]>

* fix linters

* fix intendations in the integration tests

* create tests/integration/targets/helm_registry_auth/aliases

* fix integration test (typo)

* fix integration tests (test wrong cred)

* add stderr when module fail

* another attempt to fix integration test

* fix assertion in integration test to be not affceted by the #830

---------

Co-authored-by: Bikouo Aubin <[email protected]>
(cherry picked from commit aee8474)

Co-authored-by: Yuriy Novostavskiy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-5 skip-changelog test-all-the-targets In order to tell to the integration test splitter to test all targets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants