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

opensearch: avoid a KeyError during the DomainConfig reading #1910

Conversation

goneri
Copy link
Member

@goneri goneri commented Aug 10, 2023

This commit avoids a KeyError exception in get_domain_config().
Some entries from DomainConfig don't have any Options key. For instance, ChangeProgressDetails.

See:

Closes: #1907

@goneri goneri force-pushed the opensearch-avoid-a-KeyError-during-the-DomainConfig-reading_30168 branch from 4cc3011 to b2da543 Compare August 10, 2023 10:42
@ansibullbot
Copy link

@goneri: Greetings! Thanks for taking the time to open this pullrequest. In order for the community to handle your pullrequest effectively, we need a bit more information.

Here are the items we could not find in your description:

  • issue type

Please set the description of this pullrequest with this template:
https://raw.githubusercontent.com/ansible/ansible/devel/.github/PULL_REQUEST_TEMPLATE.md

click here for bot help

@ansibullbot ansibullbot added needs_info This issue requires further information. Please answer any outstanding questions needs_template This issue/PR has an incomplete description. Please fill in the proposed template correctly needs_triage small_patch Hopefully easy to review labels Aug 10, 2023
@softwarefactory-project-zuul
Copy link
Contributor

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

ansible-galaxy-importer FAILURE in 4m 32s (non-voting)
✔️ build-ansible-collection SUCCESS in 13m 23s
✔️ ansible-test-splitter SUCCESS in 5m 15s
Skipped 22 jobs

@alinabuzachis alinabuzachis added backport-6 PR should be backported to the stable-6 branch backport-5 PR should be backported to the stable-5 branch mergeit Merge the PR (SoftwareFactory) labels Aug 31, 2023
@softwarefactory-project-zuul
Copy link
Contributor

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

✔️ ansible-galaxy-importer SUCCESS in 3m 43s (non-voting)
✔️ build-ansible-collection SUCCESS in 12m 29s
✔️ ansible-test-splitter SUCCESS in 4m 54s
Skipped 22 jobs

@softwarefactory-project-zuul
Copy link
Contributor

Pull request merge failed: Resource not accessible by integration, You may need to manually rebase your PR and retry.

@alinabuzachis
Copy link
Contributor

@goneri Can you please rebase?

This commit avoids a KeyError exception in `get_domain_config()`.
Some entries from DomainConfig don't have any `Options` key. For instance, `ChangeProgressDetails`.

See:
- https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_DomainConfig.html
- https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_ChangeProgressDetails.html
@goneri goneri force-pushed the opensearch-avoid-a-KeyError-during-the-DomainConfig-reading_30168 branch from b2da543 to 1aab201 Compare August 31, 2023 17:29
@softwarefactory-project-zuul
Copy link
Contributor

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

✔️ ansible-galaxy-importer SUCCESS in 4m 31s (non-voting)
✔️ build-ansible-collection SUCCESS in 12m 57s
✔️ ansible-test-splitter SUCCESS in 4m 59s
Skipped 22 jobs

@softwarefactory-project-zuul
Copy link
Contributor

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

✔️ ansible-galaxy-importer SUCCESS in 3m 45s (non-voting)
✔️ build-ansible-collection SUCCESS in 14m 02s
✔️ ansible-test-splitter SUCCESS in 5m 07s
Skipped 22 jobs

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 9a9c8c5 into ansible-collections:main Aug 31, 2023
30 checks passed
@patchback
Copy link

patchback bot commented Aug 31, 2023

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/9a9c8c58b3120d3f1988030cf8a31662a992c335/pr-1910

Backported as #1922

🤖 @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 Aug 31, 2023
opensearch: avoid a KeyError during the DomainConfig reading

This commit avoids a KeyError exception in get_domain_config().
Some entries from DomainConfig don't have any Options key. For instance, ChangeProgressDetails.
See:

https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_DomainConfig.html
https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_ChangeProgressDetails.html

Closes: #1907

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Alina Buzachis
(cherry picked from commit 9a9c8c5)
@patchback
Copy link

patchback bot commented Aug 31, 2023

Backport to stable-6: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-6/9a9c8c58b3120d3f1988030cf8a31662a992c335/pr-1910

Backported as #1923

🤖 @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 Aug 31, 2023
opensearch: avoid a KeyError during the DomainConfig reading

This commit avoids a KeyError exception in get_domain_config().
Some entries from DomainConfig don't have any Options key. For instance, ChangeProgressDetails.
See:

https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_DomainConfig.html
https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_ChangeProgressDetails.html

Closes: #1907

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Alina Buzachis
(cherry picked from commit 9a9c8c5)
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Sep 1, 2023
…1923)

[PR #1910/9a9c8c58 backport][stable-6] opensearch: avoid a KeyError during the DomainConfig reading

This is a backport of PR #1910 as merged into main (9a9c8c5).
This commit avoids a KeyError exception in get_domain_config().
Some entries from DomainConfig don't have any Options key. For instance, ChangeProgressDetails.
See:

https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_DomainConfig.html
https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_ChangeProgressDetails.html

Closes: #1907

Reviewed-by: Alina Buzachis
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Sep 1, 2023
…1922)

[PR #1910/9a9c8c58 backport][stable-5] opensearch: avoid a KeyError during the DomainConfig reading

This is a backport of PR #1910 as merged into main (9a9c8c5).
This commit avoids a KeyError exception in get_domain_config().
Some entries from DomainConfig don't have any Options key. For instance, ChangeProgressDetails.
See:

https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_DomainConfig.html
https://docs.aws.amazon.com/opensearch-service/latest/APIReference/API_ChangeProgressDetails.html

Closes: #1907

Reviewed-by: Alina Buzachis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-5 PR should be backported to the stable-5 branch backport-6 PR should be backported to the stable-6 branch has_issue mergeit Merge the PR (SoftwareFactory) needs_info This issue requires further information. Please answer any outstanding questions needs_template This issue/PR has an incomplete description. Please fill in the proposed template correctly needs_triage small_patch Hopefully easy to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KeyError 'Options' from opensearch module_utils
4 participants