Skip to content

Ignore config skip_tags when command line --tags is supplied #2565

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

Open
krisavi opened this issue May 12, 2025 · 0 comments
Open

Ignore config skip_tags when command line --tags is supplied #2565

krisavi opened this issue May 12, 2025 · 0 comments
Labels
enhancement New feature or enhancement

Comments

@krisavi
Copy link

krisavi commented May 12, 2025

Use Case

When I have set up skip_tags to skip specific manifests and code on regular runs and want to test it by running
puppet agent -t --tags myfeature then if that feature happens to have those skipped tags then they will be skipped still. It would make more sense to ignore skip_tags on runs where you initialize it manually or at least when --tags is provided.

Describe the Solution You Would Like

When puppet agent is started with --tags argument then it will ignore skip_tags config parameter.

Describe Alternatives You've Considered

Currently I have to add --skip_tags '' to the command to clear it.

Additional Context

Just wondering how you think it people should be using --tags parameter when it is running periodically. What is the point of running just one section of code when periodic one already ensured the code was run. It would make more sense to be able to invoke part of code that is normally skipped.

puppet agent --test --tags kris --debug
...
Debug: Logrotate::Rule[postgres]: Not tagged with kris
Debug: Logrotate::Rule[postgres]: Resource is being skipped, unscheduling all events
...
Debug: /Stage[main]/Profiles::Manage_user[kris]/Group[kris]: Skipping with skip tags test, onetime, initialize
Debug: /Stage[main]/Profiles::Manage_user[kris]/Group[kris]: Resource is being skipped, unscheduling all events
Debug: /Stage[main]/Profiles::Manage_user[kris]/User[kris]: Skipping with skip tags test, onetime, initialize
Debug: /Stage[main]/Profiles::Manage_user[kris]/User[kris]: Resource is being skipped, unscheduling all events
...

Plenty of resources report as not tagged and should not be run, however when it processes the ones that have correct tag then skip_tags parameter seems to block them.

PQL query like: resources [title, type, tags] {tags = 'dm' and title = 'kris'} brings such results

[
    {
        "tags": [
            "manage_user",
            "profiles::manage_user",
            "group",
...
            "kris",
            "test"
        ],
        "title": "kris",
        "type": "Group"
    },
    {
        "tags": [
            "manage_user",
            "profiles::manage_user",
            "user",
...
            "kris",
            "test"
        ],
        "title": "kris",
        "type": "User"
    }
]

The resources itself have correct flag to run and also flag to satisfy skip_tags condition.

@krisavi krisavi added the enhancement New feature or enhancement label May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant