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 parse parents attribute as list #545

Merged
merged 7 commits into from
Feb 14, 2024

Conversation

msekania
Copy link
Contributor

Improve Fix/Solve #515

Pull request type

if parents attribute is provided in attributes or update_attributes of host or folder module parses files as list

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

#515
if one provides parents: test it would be parsed as ['t', 'e', 's', 't'] (because parents awaits list as a parameter)
now it will be parsed as ['test']

What is the new behavior?

  • if parents gets a string (or some other type) as a parameter ansible utils will take care that it will be interpreted as a list

Other information

@msekania msekania requested a review from lgetwan as a code owner January 31, 2024 14:22
@github-actions github-actions bot added module:folder This affects the folder module module:host This affects the host module labels Jan 31, 2024
@msekania msekania changed the title Feature parents attribute Feature parse parents attribute as list Jan 31, 2024
@msekania
Copy link
Contributor Author

msekania commented Feb 4, 2024

@lgetwan, @robin-checkmk ,

this PR can be merged right away, before #536

@robin-checkmk
Copy link
Member

Thanks for the fix @msekania! I will leave it up to @lgetwan to review the actual code, but I am very happy, then we got a handle on this!

Copy link
Contributor

@lgetwan lgetwan left a comment

Choose a reason for hiding this comment

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

This change also seems to be picked into your other PR #539. I reviewed it there, but it looks slightly different, there: You're using a list FOLDER_PARENTS_PARSE, there, which even looks better.
I'm not sure how to solve this without messing with git.

@msekania
Copy link
Contributor Author

msekania commented Feb 9, 2024

This change also seems to be picked into your other PR #539. I reviewed it there, but it looks slightly different, there: You're using a list FOLDER_PARENTS_PARSE, there, which even looks better. I'm not sure how to solve this without messing with git.

@lgetwan,

I have modified it accordingly

@robin-checkmk robin-checkmk added the release:4.3.0 Affects the mentioned release. label Feb 9, 2024
@lgetwan
Copy link
Contributor

lgetwan commented Feb 9, 2024

This PR should be merged after #539. When doing this, we might get a minor merge conflict in the folder.py, but never mind.

Copy link
Contributor

@lgetwan lgetwan left a comment

Choose a reason for hiding this comment

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

Thanks for implementing this, Michael!

@robin-checkmk robin-checkmk mentioned this pull request Feb 13, 2024
7 tasks
@robin-checkmk robin-checkmk merged commit e31d1ae into Checkmk:devel Feb 14, 2024
21 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 14, 2024
@msekania msekania deleted the feature_parents_attribute branch February 14, 2024 15:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request module:folder This affects the folder module module:host This affects the host module release:4.3.0 Affects the mentioned release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Investigate behavior of the parent attribute when passed to the host or folder module
3 participants