-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix and rework gitlab_project_variable #4038
Fix and rework gitlab_project_variable #4038
Conversation
Integration test pass for me
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution! Some first comments:
plugins/modules/source_control/gitlab/gitlab_project_variable.py
Outdated
Show resolved
Hide resolved
plugins/modules/source_control/gitlab/gitlab_project_variable.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
All integration tests still pass here
|
plugins/modules/source_control/gitlab/gitlab_project_variable.py
Outdated
Show resolved
Hide resolved
plugins/modules/source_control/gitlab/gitlab_project_variable.py
Outdated
Show resolved
Hide resolved
Still no failures
FYI, the |
hm codespace put the changes somewhere else ... |
…compare, because values always exists (prebuild)
Backport to stable-4: 💚 backport PR created✅ Backport PR branch: Backported as #4133 🤖 @patchback |
* rework-and-fix * fix delete bug and change report * delete the requested variables based on env scope * fix absent logic when not purge: remove what is requested * change code to current behaviour * complete implementation * fix delete * restore origin return structure * reorder * add test for origin bug * add changelog fragment * Update plugins/modules/source_control/gitlab/gitlab_project_variable.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/source_control/gitlab/gitlab_project_variable.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/source_control/gitlab/gitlab_project_variable.py Co-authored-by: Felix Fontein <felix@fontein.de> * remove yaml * apply suggestions * readd accidental removed line * improve the truth of return value 'project_variable' in check mode * fix pep8, over-indented * fix typos and add subelement options * Update changelogs/fragments/4038-fix-and-rework-gitlb-project-variable.yml Co-authored-by: Felix Fontein <felix@fontein.de> * Update changelogs/fragments/4038-fix-and-rework-gitlb-project-variable.yml Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/source_control/gitlab/gitlab_project_variable.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/source_control/gitlab/gitlab_project_variable.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/source_control/gitlab/gitlab_project_variable.py Co-authored-by: Felix Fontein <felix@fontein.de> * remove diff feature * resolve all recommentdations * resolve change requests, improve doc and remove default value before compare, because values always exists (prebuild) Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 33a65ae)
* rework-and-fix * fix delete bug and change report * delete the requested variables based on env scope * fix absent logic when not purge: remove what is requested * change code to current behaviour * complete implementation * fix delete * restore origin return structure * reorder * add test for origin bug * add changelog fragment * Update plugins/modules/source_control/gitlab/gitlab_project_variable.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/source_control/gitlab/gitlab_project_variable.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/source_control/gitlab/gitlab_project_variable.py Co-authored-by: Felix Fontein <felix@fontein.de> * remove yaml * apply suggestions * readd accidental removed line * improve the truth of return value 'project_variable' in check mode * fix pep8, over-indented * fix typos and add subelement options * Update changelogs/fragments/4038-fix-and-rework-gitlb-project-variable.yml Co-authored-by: Felix Fontein <felix@fontein.de> * Update changelogs/fragments/4038-fix-and-rework-gitlb-project-variable.yml Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/source_control/gitlab/gitlab_project_variable.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/source_control/gitlab/gitlab_project_variable.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/source_control/gitlab/gitlab_project_variable.py Co-authored-by: Felix Fontein <felix@fontein.de> * remove diff feature * resolve all recommentdations * resolve change requests, improve doc and remove default value before compare, because values always exists (prebuild) Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 33a65ae) Co-authored-by: Markus Bergholz <git@osuv.de>
* Rework of gitlab_project_variable over gitlab_group_variable * Linting and removed unused example * Fix test 2 * Sync from review of gitlab_project_variable #4038 * Linting, default protected True, value optional * Next version is 4.5.0 * Roll back protected default true, and value not required * Apply suggestions from code review Missing check_mode Co-authored-by: Markus Bergholz <git@osuv.de> * Fix one unit test, comment test that requires premium gitlab * Add changelog * Update plugins/modules/source_control/gitlab/gitlab_group_variable.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update changelogs/fragments/4086-rework_of_gitlab_proyect_variable_over_gitlab_group_variable.yml Co-authored-by: Felix Fontein <felix@fontein.de> * Added conditional gitlab_premium_tests variable when required * Allow delete without value * Fix variable name * Linting * Value should not be required in doc * Linting missing new-line * Update changelogs/fragments/4086-rework_of_gitlab_proyect_variable_over_gitlab_group_variable.yml Co-authored-by: Markus Bergholz <git@osuv.de> Co-authored-by: Markus Bergholz <git@osuv.de> Co-authored-by: Felix Fontein <felix@fontein.de>
* Rework of gitlab_project_variable over gitlab_group_variable * Linting and removed unused example * Fix test 2 * Sync from review of gitlab_project_variable #4038 * Linting, default protected True, value optional * Next version is 4.5.0 * Roll back protected default true, and value not required * Apply suggestions from code review Missing check_mode Co-authored-by: Markus Bergholz <git@osuv.de> * Fix one unit test, comment test that requires premium gitlab * Add changelog * Update plugins/modules/source_control/gitlab/gitlab_group_variable.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update changelogs/fragments/4086-rework_of_gitlab_proyect_variable_over_gitlab_group_variable.yml Co-authored-by: Felix Fontein <felix@fontein.de> * Added conditional gitlab_premium_tests variable when required * Allow delete without value * Fix variable name * Linting * Value should not be required in doc * Linting missing new-line * Update changelogs/fragments/4086-rework_of_gitlab_proyect_variable_over_gitlab_group_variable.yml Co-authored-by: Markus Bergholz <git@osuv.de> Co-authored-by: Markus Bergholz <git@osuv.de> Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 44f9bf5)
…4226) * Rework of gitlab_project_variable over gitlab_group_variable * Linting and removed unused example * Fix test 2 * Sync from review of gitlab_project_variable #4038 * Linting, default protected True, value optional * Next version is 4.5.0 * Roll back protected default true, and value not required * Apply suggestions from code review Missing check_mode Co-authored-by: Markus Bergholz <git@osuv.de> * Fix one unit test, comment test that requires premium gitlab * Add changelog * Update plugins/modules/source_control/gitlab/gitlab_group_variable.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update changelogs/fragments/4086-rework_of_gitlab_proyect_variable_over_gitlab_group_variable.yml Co-authored-by: Felix Fontein <felix@fontein.de> * Added conditional gitlab_premium_tests variable when required * Allow delete without value * Fix variable name * Linting * Value should not be required in doc * Linting missing new-line * Update changelogs/fragments/4086-rework_of_gitlab_proyect_variable_over_gitlab_group_variable.yml Co-authored-by: Markus Bergholz <git@osuv.de> Co-authored-by: Markus Bergholz <git@osuv.de> Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit 44f9bf5) Co-authored-by: Sebastian Guarino <sebastian.guarino@gmail.com>
SUMMARY
Closes: #1952
Closes: #4074
ISSUE TYPE
COMPONENT NAME
gitlab_project_variable
ADDITIONAL INFORMATION
First tests looks promising.
What's left is
return_value[untouched]
is not handled