Skip to content

Acme state fixup 2019.2#54007

Closed
github-abcde wants to merge 9 commits intosaltstack:2019.2from
basisbeeld:acme_state_fixup-2019.2
Closed

Acme state fixup 2019.2#54007
github-abcde wants to merge 9 commits intosaltstack:2019.2from
basisbeeld:acme_state_fixup-2019.2

Conversation

@github-abcde
Copy link
Copy Markdown
Contributor

What does this PR do?

(2019.2 version of #53366)
It provides an alternative to loop.until that does not use eval.
Added example for using this in the faq. Made some pylint-inspired changes.
I'm not entirely sure that the name of the new state until_no_eval is good enough (even though it is accurate), since it feels wrong to name a function with something that it does not have. I'm open to suggestions on this.

What issues does this PR fix or reference?

None

Previous Behavior

The generic state that allows you to (blockingly) execute a salt function until it produces a desired output hinged on using eval with user-input. Since this is potentially very dangerous, an alternative has been supplied.

New Behavior

A state exists (loop.until_no_eval) that will block execution until a specific salt execution module function returns an expected result. This produced result is passed together with the expected result to a function (either a method of python's operator, a function from __salt__ or __utils__) to produce a boolean indicating success (or failure).
Additionally, a parameter init_wait is available to configure a waiting period before the 1st call of the salt function is made.

Tests written?

Yes

Commits signed with GPG?

Yes

@github-abcde github-abcde requested a review from a team as a code owner July 25, 2019 08:44
@ghost ghost requested a review from garethgreenaway July 25, 2019 08:44
@github-abcde
Copy link
Copy Markdown
Contributor Author

Requires #52455. Should I create a PR for that for the 2019.2 branch?

@github-abcde
Copy link
Copy Markdown
Contributor Author

I don't know what to do to fix the currently failing tests. Tests either fail because of roo.fs not being loaded (which does not happen locally), and there's unit.utils.test_jinja.TestCustomExtensions.test_http_query that is (also locally) failing but decorated as @flaky.
Please advise :)

@waynew
Copy link
Copy Markdown
Contributor

waynew commented Jul 26, 2019

Hey @github-abcde thanks for the PR!

We're currently focusing on getting our test suites stable - we've got some tech debt around our test infrastructure that we're in the process of paying down.

If you're OK with waiting, it's fine to wait until we get this flakiness resolved. Or you can also feel free to investigate any of the flakiness :)

Our current focus is on the 2019.2.1 branch, as we're trying to get that released. Once we've got our pipeline stable it should significantly improve our PR process.

github-abcde and others added 9 commits December 9, 2019 15:54
…w" parameter in "needs_renewal". Pylint-inspired layout fixes.
…ction if nothing/fetch/renew is needed to be done.
…509.read_certificate as alternative method of getting certificate information if tls.cert_info is not available.
…o using x509.read_certificates. Fixed incorrect data placement in textwrap.dedent. Updated test for acme.info to expect dict when using openssl cli.
@github-abcde github-abcde force-pushed the acme_state_fixup-2019.2 branch from 6cd9e61 to 77efe38 Compare December 9, 2019 14:55
@github-abcde
Copy link
Copy Markdown
Contributor Author

Closing this in favor of #55589

@github-abcde github-abcde deleted the acme_state_fixup-2019.2 branch December 10, 2019 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants