Skip to content

Remove warning when rendering non-SLS files#67067

Open
amendlik wants to merge 1 commit intosaltstack:masterfrom
amendlik:sls-context
Open

Remove warning when rendering non-SLS files#67067
amendlik wants to merge 1 commit intosaltstack:masterfrom
amendlik:sls-context

Conversation

@amendlik
Copy link
Contributor

What does this PR do?

My Salt states contain code to render Jinja in YAML files using the slsutil.renderer function, such as:

{% set defaults = salt["slsutil.renderer"]("salt://defaults.yaml", sls="defaults.yaml") %}

This works fine, but it always produces the error message: "Failed to determine proper template path"

What issues does this PR fix or reference?

None

Previous Behavior

Running slsutil.renderer on any file other than an SLS file would work, but produce a superfluous warning.

New Behavior

Running slsutil.renderer on non-SLS files succeeds without a warning, and populates the following context variables:

  • tplpath
  • tplfile
  • tpldir

Merge requirements satisfied?

Commits signed with GPG?

Yes

@amendlik amendlik requested a review from a team as a code owner November 25, 2024 15:21
twangboy
twangboy previously approved these changes Feb 12, 2025
@twangboy twangboy added this to the Argon v3008.0 milestone Feb 12, 2025
@dwoz dwoz added the test:full Run the full test suite label Jun 26, 2025
@twangboy
Copy link
Contributor

Please rebase this PR

Rather than logging a warning, just populate some of the context
variables with appropriate values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants