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

no-changed-when: improve testing and documentation #1706

Merged
merged 7 commits into from Sep 7, 2021
Merged

no-changed-when: improve testing and documentation #1706

merged 7 commits into from Sep 7, 2021

Conversation

konstruktoid
Copy link
Contributor

@konstruktoid konstruktoid commented Aug 25, 2021

  • adds tests to the no-changed-when rule
  • improve documentation

Signed-off-by: Thomas Sjögren konstruktoid@users.noreply.github.com
Fixes: #1681

…r or args

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
@konstruktoid konstruktoid changed the title add tests and allow register and args no-changed-when: add tests and allow register and args Aug 25, 2021
@ssbarnea ssbarnea added the bug label Aug 26, 2021
Copy link
Member

@ssbarnea ssbarnea left a comment

Choose a reason for hiding this comment

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

The code looks really good but I am afraid that the problem is #1681 - I asked for extra feedback from others on community channel.

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
@konstruktoid konstruktoid changed the title no-changed-when: add tests and allow register and args no-changed-when: improve testing and documentation Aug 26, 2021
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
@konstruktoid
Copy link
Contributor Author

Updated, but the description probably need better wording.

@ssbarnea ssbarnea requested a review from acozine August 27, 2021 09:03
Copy link
Member

@ssbarnea ssbarnea left a comment

Choose a reason for hiding this comment

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

Looks ok to me but let's wait for @acozine to review the wording for the docs.

@konstruktoid
Copy link
Contributor Author

My bad, didn't mean to close. The mobile app played tricks on me.

Copy link
Contributor

@acozine acozine left a comment

Choose a reason for hiding this comment

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

Looks good overall. I put some suggestions for wording - accept the ones you like and ignore the ones you don't. I tried to think about the error message itself, whether there's a way to keep it short but make it more user-focused, but I haven't come up with any ideas yet.

src/ansiblelint/rules/CommandHasChangesCheckRule.py Outdated Show resolved Hide resolved
src/ansiblelint/rules/CommandHasChangesCheckRule.py Outdated Show resolved Hide resolved
Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
@MarkusTeufelberger
Copy link
Contributor

The existing when case is wrong by the way (the presence of when: true does not influence the idempotence of a task result), but that likely needs a separate PR to be fixed. It could need a test case though, if you're already writing tests.

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
@konstruktoid
Copy link
Contributor Author

The existing when case is wrong by the way (the presence of when: true does not influence the idempotence of a task result), but that likely needs a separate PR to be fixed. It could need a test case though, if you're already writing tests.

Yeah, but I believe that is out-of-scope for this PR.

@ssbarnea ssbarnea enabled auto-merge (squash) September 7, 2021 11:24
@ssbarnea ssbarnea merged commit 0d6762d into ansible:main Sep 7, 2021
@konstruktoid konstruktoid deleted the ISSUE1681 branch September 7, 2021 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no-changed-when: improve documentation and testing
4 participants