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

lookup/secretsmanager_secret - fix issue with missing nested secret and on_missing=warn #1972

Conversation

abikouo
Copy link
Contributor

@abikouo abikouo commented Feb 12, 2024

SUMMARY

Fixes #1781
The lookup was raising an error instead of a warning message

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lookup/secretsmanager_secret

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/1adcc9505d9c4520a48bede978e9f1da

✔️ ansible-galaxy-importer SUCCESS in 4m 54s
✔️ build-ansible-collection SUCCESS in 14m 08s
✔️ ansible-test-splitter SUCCESS in 5m 21s
✔️ integration-amazon.aws-1 SUCCESS in 19m 30s
Skipped 43 jobs

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/1b7ce22a896141e9934be8068759e8d0

✔️ ansible-galaxy-importer SUCCESS in 8m 51s
✔️ build-ansible-collection SUCCESS in 14m 51s
✔️ ansible-test-splitter SUCCESS in 5m 13s
✔️ integration-amazon.aws-1 SUCCESS in 7m 23s
Skipped 43 jobs

Copy link
Contributor

@mandar242 mandar242 left a comment

Choose a reason for hiding this comment

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

Tested PR changes locally, works as expected.

  • without PR code fix
TASK [Read missing secret variable using 'on_missing==warn'] ************************************************************************
fatal: [localhost]: FAILED! => {"msg": "Successfully retrieved secret but there exists no key missing_err_secret in the secret"}

PLAY RECAP **************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   
  • with PR code
TASK [Read missing secret variable using 'on_missing==warn'] ************************************************************************
[WARNING]: Skipping, Successfully retrieved secret but there exists no key missing_err_secret in the secret
ok: [localhost]

PLAY RECAP **************************************************************************************************************************
localhost                  : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0  

Copy link
Contributor

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/c0d4236ecf5d43558401a6835116fc75

⚠️ ansible-galaxy-importer SKIPPED Skipped due to failed job build-ansible-collection
build-ansible-collection POST_FAILURE in 16m 02s
✔️ ansible-test-splitter SUCCESS in 5m 31s
⚠️ integration-amazon.aws-1 SKIPPED Skipped due to failed job build-ansible-collection
Skipped 43 jobs

@abikouo
Copy link
Contributor Author

abikouo commented Feb 13, 2024

recheck

Copy link
Contributor

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/0c076ba42ebb4cfc8ab115305dd5b469

✔️ ansible-galaxy-importer SUCCESS in 4m 38s
✔️ build-ansible-collection SUCCESS in 14m 26s
✔️ ansible-test-splitter SUCCESS in 5m 55s
✔️ integration-amazon.aws-1 SUCCESS in 14m 22s
Skipped 43 jobs

@alinabuzachis alinabuzachis added backport-7 PR should be backported to the stable-7 branch backport-6 PR should be backported to the stable-6 branch labels Feb 13, 2024
@abikouo abikouo added the mergeit Merge the PR (SoftwareFactory) label Feb 14, 2024
Copy link
Contributor

Build succeeded (gate pipeline).
https://ansible.softwarefactory-project.io/zuul/buildset/7c3dd05b5e3347bbabf65102fd491059

✔️ ansible-galaxy-importer SUCCESS in 4m 33s
✔️ build-ansible-collection SUCCESS in 14m 13s
✔️ ansible-test-splitter SUCCESS in 5m 17s
✔️ integration-amazon.aws-1 SUCCESS in 14m 52s
Skipped 43 jobs

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 08e7d70 into ansible-collections:main Feb 14, 2024
39 of 42 checks passed
Copy link

patchback bot commented Feb 14, 2024

Backport to stable-6: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-6/08e7d70079a5e7dc4aa1e7ec55484ed22d341f7f/pr-1972

Backported as #1974

🤖 @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 Feb 14, 2024
…nd on_missing=warn (#1972)

lookup/secretsmanager_secret - fix issue with missing nested secret and on_missing=warn

SUMMARY

Fixes #1781
The lookup was raising an error instead of a warning message

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

lookup/secretsmanager_secret

Reviewed-by: Mandar Kulkarni <[email protected]>
Reviewed-by: Alina Buzachis
(cherry picked from commit 08e7d70)
Copy link

patchback bot commented Feb 14, 2024

Backport to stable-7: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-7/08e7d70079a5e7dc4aa1e7ec55484ed22d341f7f/pr-1972

Backported as #1975

🤖 @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 Feb 14, 2024
…nd on_missing=warn (#1972)

lookup/secretsmanager_secret - fix issue with missing nested secret and on_missing=warn

SUMMARY

Fixes #1781
The lookup was raising an error instead of a warning message

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

lookup/secretsmanager_secret

Reviewed-by: Mandar Kulkarni <[email protected]>
Reviewed-by: Alina Buzachis
(cherry picked from commit 08e7d70)
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Feb 28, 2024
…nd on_missing=warn (#1972) (#1975)

[PR #1972/08e7d700 backport][stable-7] lookup/secretsmanager_secret - fix issue with missing nested secret and on_missing=warn

This is a backport of PR #1972 as merged into main (08e7d70).
SUMMARY

Fixes #1781
The lookup was raising an error instead of a warning message

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

lookup/secretsmanager_secret

Reviewed-by: Alina Buzachis
Reviewed-by: Mark Chappell
alinabuzachis pushed a commit to alinabuzachis/amazon.aws that referenced this pull request Mar 1, 2024
…nd on_missing=warn (ansible-collections#1972)

lookup/secretsmanager_secret - fix issue with missing nested secret and on_missing=warn

SUMMARY

Fixes ansible-collections#1781
The lookup was raising an error instead of a warning message

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

lookup/secretsmanager_secret

Reviewed-by: Mandar Kulkarni <[email protected]>
Reviewed-by: Alina Buzachis
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Mar 1, 2024
Manual backport of PR #1972

SUMMARY

Manual backport of PR #1972 fixing indentation

ISSUE TYPE


Bugfix Pull Request
Docs Pull Request
Feature Pull Request
New Module Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Bikouo Aubin
Reviewed-by: Jill R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-6 PR should be backported to the stable-6 branch backport-7 PR should be backported to the stable-7 branch mergeit Merge the PR (SoftwareFactory)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_secret lookup doesn't honor on_missing when using nested
3 participants