-
Notifications
You must be signed in to change notification settings - Fork 142
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
Change default value for tags in workflows #824
Comments
I think this applies to even more fields such as |
To be clear are you saying that you have tags in your config that are being ignored or are you saying if tags have been set in UI that this removes them? |
When setting fields such as There is a good explanation in this comment in another issue: ansible/awx#12991 (comment)
So I guess what I'm saying is sort of "I have tags in my config that are being ignored". They are ignored since the enforcement of defaults sets empty field to "" instead of null, making it take precedence over the node prompt. |
if you do not have tags in your code it's self then yes that is what is supposed to happen, enforce defaults is to allow people to catch changes that are made in the UI that isn't in code and make it match the code. |
Yes, but the default value that should be enforced on the workflow template should be null and not an empty string, as an empty string in this case is actually a value that is applied on the nodes, which is not what we want. So the default value that is enforced should be changed for values such as |
@ephracis This is a limitation of the python modules that if we pass null it will ignore it, and keep any value set in the gui, and not enforce the defaults. This is by design in this iteration. The next iteration will move these out of the default value, and into the python of the modules, but its taken some time, and needs some tweaks to the API itself to work. So at the moment this is working as intended, functionally, while the default is technically null, it becomes tricky at the python level. |
Ok, I see. Too bad it is not possible to send in null since that is what the GUI sets and what is required to make it possible to have nodes with different tags in a workflow. An empty string breaks this functionality. I suggest keeping this issue open until the new approach is implemented since this is pretty obviously a bug as it breaks functionality which is expected to work. Until then the only workaround is to disable enforcing defaults for workflows by setting |
Summary
When enforcing defaults (ie
controller_configuration_workflows_enforce_defaults
is set totrue
), the value forskip_tags
andjob_tags
are set to empty strings. This causes these values to override whatever value is set on the individual nodes. The correct default value should instead be null as that value will not take precedence over the values on the nodes in the workflow.Issue Type
Ansible, Collection, Controller details
Desired Behavior
When enforcing defaults it should be possible to assign different tags on different nodes in workflows. This means that
job_tags
in the workflow must be set to null.Actual Behavior
When enforcing defaults, the value for
job_tags
in workflows are set to an empty string. This overrides whatever is set on the individual nodes in the workflow and causes them to run without any value forjob_tags
.STEPS TO REPRODUCE
The text was updated successfully, but these errors were encountered: