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

Failed to load ext_pillar stack: no filter named 'unique' in 2018.3 #46926

Open
morgana2313 opened this issue Apr 6, 2018 · 17 comments
Open
Assignees
Labels
Bug broken, incorrect, or confusing behavior Confirmed Salt engineer has confirmed bug/feature - often including a MCVE Regression The issue is a bug that breaks functionality known to work in previous releases. severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@morgana2313
Copy link
Contributor

Description of Issue/Question

After upgrading to 2018.7 Saltstack doesn't know the Jinja filter 'unique' in the ext_pillar stack.
This worked ok before upgrading from 2017.7 and after downgrading back to 2017.7.

local:
    Data failed to compile:
----------
    Pillar failed to render with the following messages:
----------
    Failed to load ext_pillar stack: no filter named 'unique'

Setup

snippet from external pillar stack *.yml file:

{% for app in a_dict | unique %}
{% endfor %}

@Ch3LL
Copy link
Contributor

Ch3LL commented Apr 6, 2018

can you please share how you have your external pillar setup?

@Ch3LL Ch3LL added the info-needed waiting for more info label Apr 6, 2018
@Ch3LL Ch3LL added this to the Blocked milestone Apr 6, 2018
@morgana2313
Copy link
Contributor Author

the master.conf contains:

ext_pillar:
  - stack:
      - [somepath]/stack.cfg
      - [somepath]/stack2.cfg

the stack2.cfg file contains:

somefile.yml

the somefile.yml contains:

        {% for app in stack.something | unique %}  # This 'unique' jinja filter gives an error in saltstack 2018.03??
          {{ app }}: {{ app }}
        {% endfor %}

@Ch3LL
Copy link
Contributor

Ch3LL commented Apr 10, 2018

Thanks for adding teh configuration. Helped me to replicate it.

bisect shows: 494022d which is this PR.

ping @lorengordon any ideas here?

@Ch3LL Ch3LL added Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P4 Priority 4 and removed info-needed waiting for more info labels Apr 10, 2018
@Ch3LL Ch3LL modified the milestones: Blocked, Approved Apr 10, 2018
@lorengordon
Copy link
Contributor

Basically the same problem fixed by #46744. The utils modules were all shifted around... The modules containing the jinja filters are not getting imported, and so the decorator is not getting called, which means the filters in utils modules that are not imported are not getting injected into the jinja env.

@morgana2313 morgana2313 changed the title Failed to load ext_pillar stack: no filter named 'unique' in 2018.7 Failed to load ext_pillar stack: no filter named 'unique' in 2018.3 Aug 8, 2018
@morgana2313
Copy link
Contributor Author

This problem still exists in Saltstack 2018.3.2

@Oloremo
Copy link
Contributor

Oloremo commented Feb 25, 2019

Having a similar problem with pillarstack and to_bool Jinja filter at 2018.3.3. Any updates?

@Ch3LL
Copy link
Contributor

Ch3LL commented Feb 28, 2019

its not currently assigned out. If anyone wants to try to push a PR we would definitely appreciate it.

@Oloremo
Copy link
Contributor

Oloremo commented Jul 15, 2019

@Ch3LL Any updates? :-(

@Ch3LL
Copy link
Contributor

Ch3LL commented Jul 30, 2019

not any updates currently. does anyone from @saltstack/team-core have time to take a look at this one?

@stale
Copy link

stale bot commented Jan 8, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

@stale stale bot added the stale label Jan 8, 2020
@Oloremo
Copy link
Contributor

Oloremo commented Jan 8, 2020

still a very irritating issue.

@stale
Copy link

stale bot commented Jan 8, 2020

Thank you for updating this issue. It is no longer marked as stale.

@stale stale bot removed the stale label Jan 8, 2020
@waynew waynew added the Confirmed Salt engineer has confirmed bug/feature - often including a MCVE label Jan 8, 2020
@gbunt
Copy link

gbunt commented Mar 20, 2020

Does this affect any ext pillar? In any case, when using pillarstack it seems none of the filters are available, is there are a target release for this yet? This is 2019.2.0 anyway;

{% set string = 'test' %}
test:
- {{ string | md5 }}
- {{ string | base64_encode }}
- {{ ['foo', 'foo', 'bar'] | unique }}

Results:

Failed to load ext_pillar stack: no filter named 'md5'
Failed to load ext_pillar stack: no filter named 'base64_encode'
Failed to load ext_pillar stack: no filter named 'unique'

Seems to me this affects a whole lot of installs? Have to revert to cmd.shell now. Not too pretty :-/

@sagetherage
Copy link
Contributor

@Oloremo I don't know that this can get done for the Sodium release, but I will put it in the queue to see if we can get it assigned. Very likely it will need help from the community that does know this part of the code base, but I will try to find someone.

@Oloremo
Copy link
Contributor

Oloremo commented Apr 28, 2020

@sagetherage I have a hint that it could be pillarstack related and I try to validate this and maybe patch in pillarstack upstream

@sagetherage sagetherage added this to Considering in Sodium May 1, 2020
@sagetherage sagetherage removed this from Considering in Sodium May 1, 2020
@sagetherage sagetherage added this to Considering in Magnesium May 1, 2020
@daks
Copy link
Contributor

daks commented Sep 14, 2022

It seems that this problem still exists in pillarstack in Salt 3004.2

@derdeagle
Copy link

I think i just stumbled upon this issue in 3005.1.

Failed to load ext_pillar gitstack: No filter named 'regex_replace'.

The line in question is as follows where host is something like test01.example.com and I want to only have test.

{% set part = host|regex_replace("([a-zA-Z0-9-]+)[0-9]{2}\.", "\\1") %}

@twangboy twangboy modified the milestones: Approved, Argon v3008 Aug 31, 2023
@twangboy twangboy added the Regression The issue is a bug that breaks functionality known to work in previous releases. label Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Confirmed Salt engineer has confirmed bug/feature - often including a MCVE Regression The issue is a bug that breaks functionality known to work in previous releases. severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests