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

Feature filter keep_keys #8456

Merged

Conversation

vbotka
Copy link
Contributor

@vbotka vbotka commented Jun 2, 2024

SUMMARY
ansible.utils.keep_keys does not work properly. Fixing is not efficient.

ISSUE TYPE
New Module/Plugin Pull Request

COMPONENT NAME
community.general.keep_keys

ADDITIONAL INFORMATION
This PR implements #8438

@ansibullbot
Copy link
Collaborator

@vbotka this PR contains the following merge commits:

Please rebase your branch to remove these commits.

click here for bot help

@ansibullbot ansibullbot added merge_commit This PR contains at least one merge commit. Please resolve! needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html labels Jun 2, 2024
@vbotka vbotka force-pushed the feature-filter-keep_key-v2 branch from 6714409 to c97fc2d Compare June 2, 2024 16:13
@ansibullbot ansibullbot added integration tests/integration plugins plugin (any type) tests tests and removed merge_commit This PR contains at least one merge commit. Please resolve! needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html labels Jun 2, 2024
@ansibullbot

This comment was marked as outdated.

@ansibullbot ansibullbot added ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Jun 2, 2024
@ansibullbot ansibullbot removed ci_verified Push fixes to PR branch to re-run CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Jun 2, 2024
@vbotka vbotka mentioned this pull request Jun 2, 2024
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-9 Automatically create a backport for the stable-9 branch labels Jun 2, 2024
plugins/plugin_utils/keys_filter.py Outdated Show resolved Hide resolved
plugins/plugin_utils/keys_filter.py Outdated Show resolved Hide resolved
plugins/plugin_utils/keys_filter.py Outdated Show resolved Hide resolved
plugins/plugin_utils/keys_filter.py Outdated Show resolved Hide resolved
plugins/filter/keep_keys.py Outdated Show resolved Hide resolved
@ansibullbot ansibullbot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Jun 2, 2024
@vbotka vbotka changed the title Feature filter keep key v2 Feature filter keep_key Jun 3, 2024
@vbotka vbotka changed the title Feature filter keep_key Feature filter keep_keys Jun 3, 2024
@vbotka vbotka mentioned this pull request Jun 3, 2024
1 task
@felixfontein felixfontein linked an issue Jun 3, 2024 that may be closed by this pull request
1 task
.github/BOTMETA.yml Outdated Show resolved Hide resolved
.github/BOTMETA.yml Show resolved Hide resolved
plugins/filter/keep_keys.py Outdated Show resolved Hide resolved
vbotka and others added 3 commits June 3, 2024 07:47
target is list. Update documentation, function comments, and error
messages.
vbotka added a commit to vbotka/community.general that referenced this pull request Jun 3, 2024
This was referenced Jun 3, 2024
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

If nobody objects, I'll merge this tomorrow morning so work can continue on the related PRs.

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Jun 4, 2024
@felixfontein felixfontein merged commit 6f8f12f into ansible-collections:main Jun 4, 2024
132 checks passed
Copy link

patchback bot commented Jun 4, 2024

Backport to stable-9: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-9/6f8f12f762365686e18ce4a2bb0847b1c8b79cc7/pr-8456

Backported as #8462

🤖 @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 Jun 4, 2024
* Add filter keep_keys. Implement feature request #8438

* Fix comment indentation.

* Fix regex reference.

* Fix indentation.

* Fix isinstance list.

* Update plugins/plugin_utils/keys_filter.py

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/plugin_utils/keys_filter.py

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/plugin_utils/keys_filter.py

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/plugin_utils/keys_filter.py

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/filter/keep_keys.py

Co-authored-by: Felix Fontein <[email protected]>

* Update documentation, examples, and integration tests.

* _keys_filter_target_str returns tuple of unique target strings if
target is list. Update documentation, function comments, and error
messages.

* Sort maintainers.

* Update plugins/filter/keep_keys.py

Co-authored-by: Felix Fontein <[email protected]>

* Update examples with explicit collection.

---------

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 6f8f12f)
@felixfontein
Copy link
Collaborator

Thanks for contributing this @vbotka!

felixfontein pushed a commit that referenced this pull request Jun 4, 2024
Feature filter keep_keys (#8456)

* Add filter keep_keys. Implement feature request #8438

* Fix comment indentation.

* Fix regex reference.

* Fix indentation.

* Fix isinstance list.

* Update plugins/plugin_utils/keys_filter.py

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/plugin_utils/keys_filter.py

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/plugin_utils/keys_filter.py

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/plugin_utils/keys_filter.py

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/filter/keep_keys.py

Co-authored-by: Felix Fontein <[email protected]>

* Update documentation, examples, and integration tests.

* _keys_filter_target_str returns tuple of unique target strings if
target is list. Update documentation, function comments, and error
messages.

* Sort maintainers.

* Update plugins/filter/keep_keys.py

Co-authored-by: Felix Fontein <[email protected]>

* Update examples with explicit collection.

---------

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 6f8f12f)

Co-authored-by: Vladimir Botka <[email protected]>
@vbotka
Copy link
Contributor Author

vbotka commented Jun 4, 2024

Thank you @felixfontein!

vbotka added a commit to vbotka/community.general that referenced this pull request Jun 4, 2024
felixfontein added a commit that referenced this pull request Jun 6, 2024
* Add filter remove_keys.

* Add filter remove_keys integration test, fragment, and maintainer.

* Update with plugins/plugin_utils/keys_filter.py

* Update according PR #8456

* Update maintainers.

* Fix typo in return doc.

* Remove local keys_filter.py. Then rebase.

* Add local keys_filter.py

* Update plugins/filter/remove_keys.py

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/filter/remove_keys.py

Co-authored-by: Felix Fontein <[email protected]>

---------

Co-authored-by: Felix Fontein <[email protected]>
patchback bot pushed a commit that referenced this pull request Jun 6, 2024
* Add filter remove_keys.

* Add filter remove_keys integration test, fragment, and maintainer.

* Update with plugins/plugin_utils/keys_filter.py

* Update according PR #8456

* Update maintainers.

* Fix typo in return doc.

* Remove local keys_filter.py. Then rebase.

* Add local keys_filter.py

* Update plugins/filter/remove_keys.py

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/filter/remove_keys.py

Co-authored-by: Felix Fontein <[email protected]>

---------

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 06f13e7)
felixfontein pushed a commit that referenced this pull request Jun 7, 2024
)

Feature filter remove_keys (#8443)

* Add filter remove_keys.

* Add filter remove_keys integration test, fragment, and maintainer.

* Update with plugins/plugin_utils/keys_filter.py

* Update according PR #8456

* Update maintainers.

* Fix typo in return doc.

* Remove local keys_filter.py. Then rebase.

* Add local keys_filter.py

* Update plugins/filter/remove_keys.py

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/filter/remove_keys.py

Co-authored-by: Felix Fontein <[email protected]>

---------

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit 06f13e7)

Co-authored-by: Vladimir Botka <[email protected]>
@vbotka vbotka deleted the feature-filter-keep_key-v2 branch June 12, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-9 Automatically create a backport for the stable-9 branch has_issue integration tests/integration plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add filter keep_keys
3 participants