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

Web UI errors when loading workflow node without skip_tags #746

Closed
kbreit opened this issue Jan 2, 2024 · 8 comments
Closed

Web UI errors when loading workflow node without skip_tags #746

kbreit opened this issue Jan 2, 2024 · 8 comments
Assignees
Labels
blocked - upstream bug Something isn't working help wanted Extra attention is needed

Comments

@kbreit
Copy link

kbreit commented Jan 2, 2024

Summary

I am creating workflow templates and it executes successfully. However, when I load the workflow visualizer and click the "i" button to see information about the node it fails with an error of TypeError: u.skip_tags is null. My node is defined as the following:

     - identifier: "New VM"
        workflow_job_template: "Create VM"
        unified_job_template: "Create VM"
        organization: "Default"
        all_parents_must_converge: "False"
        inventory: localhost
        job_tags: vm
        success_nodes:
        - "Refresh Inventory"

Issue Type

  • Bug Report

Ansible, Collection, Controller details

ansible --version
ansible [core 2.15.6]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/runner/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.9/site-packages/ansible
  ansible collection location = /home/runner/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.18 (main, Sep  7 2023, 00:00:00) [GCC 11.4.1 20230605 (Red Hat 11.4.1-2)] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True
# /usr/share/ansible/collections/ansible_collections
Collection                     Version
------------------------------ -----------
ansible.posix                  1.5.4
ansible.utils                  2.11.0
awx.awx                        23.3.1
community.general              8.0.2
galaxy.galaxy                  1.1.1-devel
infra.controller_configuration 2.5.2
ansible-galaxy collection list

Controller version
4.4.8
  • ansible installation method: EE

OS / ENVIRONMENT

Desired Behavior

I'd expect the collection to properly handle the situation where skip_tags aren't provided.

Actual Behavior

It executes successfully but because skip_tags is null, it's failing in the web UI.

@kbreit kbreit added bug Something isn't working new New issue, this should be removed once reviewed labels Jan 2, 2024
@ivarmu
Copy link
Contributor

ivarmu commented Jan 3, 2024

I've tried to reproduce the problem, with Controller 4.4.4 and 4.5.0, and all is working fine here, so maybe it's not related to the way of the Nodes creation. If you create the same workflow through the WUI... do you get the same behaviour?

@kbreit-insight
Copy link

I created a new workflow in the WUI and it worked fine. Here's the output from the filetree_create role.

controller_workflows:
  - name: "Test"
    description: ""
    organization: "Default"
    state: "present"
    simplified_workflow_nodes:
      - identifier: "a1f3bcaa-4b5e-4f8e-85ad-e20a875547ee"
        workflow_job_template: "Test"
        unified_job_template: "Conway"
        organization: "Default"
        all_parents_must_converge: "False"
      - identifier: "9580173a-dfcc-420e-9622-8562e88e9f3b"
        workflow_job_template: "Test"
        unified_job_template: "New VM"
        organization: "Default"
        all_parents_must_converge: "False"
        success_nodes:
          - a1f3bcaa-4b5e-4f8e-85ad-e20a875547ee
    survey_enabled: "False"
    ask_variables_on_launch: "False"
    allow_simultaneous: "False"
    scm_branch: ""
    webhook_service: ""
    survey_enabled: False
    survey_spec: {}

@ivarmu ivarmu added the help wanted Extra attention is needed label Jan 4, 2024
@ivarmu
Copy link
Contributor

ivarmu commented Jan 4, 2024

Can you please test creating the original problematic workflow, but specifying the extra variable controller_configuration_workflows_enforce_defaults: true? I hope it should fix the issue, as by this way, the skip_tags parameter won't be null:

https://github.com/redhat-cop/controller_configuration/blob/82abc5060fed9058264adc006226159bafdde58b/roles/workflow_job_templates/tasks/main.yml#L24C8-L24C8

@kbreit-insight
Copy link

I deleted the workflow in the WUI and re-ran the playbook. It is now giving a different error.

TypeError: Cannot read properties of null (reading 'length')

If you would like, we can do some screen sharing for troubleshooting.

@ivarmu
Copy link
Contributor

ivarmu commented Jan 5, 2024

I believe it's a known UI bug related to have it checked the option ask_skip_tags_on_launch when is set to true at the Workflow object (not the node itself).

Could you check your environment?

@kbreit-insight
Copy link

Great news. It does appear to be a similar bug to what you're describing. I don't have ask_skip_tags_on_launch enabled on the workflow but I do have it set to true on each of the workflow node's respective job templates. If I set the setting to False on each one it works. If I enable it on one of the nodes, I reproduce the bug when clicking on the node but other nodes (with it disabled) work as expected.

Are you able to provide the bug information and do you know when it's expected to be resolved? Also, if there are workarounds, I'll need those in the meantime.

@ivarmu
Copy link
Contributor

ivarmu commented Jan 8, 2024

I'm not aware of any public information related to this bug. The only workaround I can think of is de-selecting this problematic fields from the Job Templates: ask_skip_tags_on_launch, ask_job_tags_on_launch and ask_verbosity_on_launch, as all of them are causing the same issue. If it is needed to have them enabled... just avoid clicking at the information icon in the workflow nodes. I know it's not the best situation, but nothing better by now :-(.

@djdanielsson djdanielsson removed the new New issue, this should be removed once reviewed label Jan 9, 2024
@ivarmu ivarmu self-assigned this Jan 12, 2024
@ivarmu
Copy link
Contributor

ivarmu commented Feb 20, 2024

ansible/awx#14759 has been merged and this issue should be solved in the near feature.

Closing the issue.

@ivarmu ivarmu closed this as completed Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked - upstream bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants