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

fix inventory prompt on launch for workflow nodes #13595

Merged
merged 1 commit into from
Feb 22, 2023

Conversation

sean-m-sullivan
Copy link
Contributor

@sean-m-sullivan sean-m-sullivan commented Feb 19, 2023

SUMMARY

I was mistaken on the fix for #12721, The previous bugfix does not account for the form of the export output from the awx cli command. It also does not update the documentation, I've reverted the previous change and corrected it. I've also updated tests in regards to this. I should not have closed #13588, should have just left it open for the weekend and amended. As penance I've fixed the code to be backwards compatible with the previous fix.

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
COMPONENT NAME
  • Collection
AWX VERSION
21.12.0
ADDITIONAL INFORMATION

@AlanCoding I was wrong on the previous PR, was trying to do it quickly instead of well, While it Worked, it did not match the export output. I went and got a full workflow node output that I've provided below. While inventory: "inventory_name" did work, it was not export compatible which is what the schema was designed to match.

  workflow_job_templates:
    - name: testinventory
      related:
        workflow_nodes:
          - all_parents_must_converge: false
            diff_mode: true
            execution_environment:
              name: creator_ee
              type: execution_environment
            extra_data:
              stuff: foo
            forks: 2
            identifier: 5d8004c6-1e36-430e-93bb-dc2f3ba18636
            inventory:
              name: RHVM-01
              organization:
                name: Default
                type: organization
              type: inventory
            job_slice_count: 1
            job_tags: asdf
            job_type: run
            limit: '3'
            related:
              always_nodes:
                - identifier: 86d0c429-e4ba-4a07-925a-06dbda7eb415
                  type: workflow_job_template_node
                  workflow_job_template:
                    name: testinventory
                    organization: null
                    type: workflow_job_template
              credentials:
                - credential_type:
                    kind: ssh
                    name: Machine
                    type: credential_type
                  name: Demo Credential
                  organization: null
                  type: credential
              failure_nodes:
                - identifier: f2275ace-3981-4815-a7a2-5ecfdc8270e1
                  type: workflow_job_template_node
                  workflow_job_template:
                    name: testinventory
                    organization: null
                    type: workflow_job_template
              success_nodes:
                - identifier: f85d058b-6c05-4b80-aa66-f8cc9c23e1ad
                  type: workflow_job_template_node
                  workflow_job_template:
                    name: testinventory
                    organization: null
                    type: workflow_job_template
            scm_branch: asdf
            skip_tags: fdas
            timeout: 31
            unified_job_template:
              name: Demo Job Template
              organization:
                name: Default
                type: organization
              type: job_template
            verbosity: 2

@github-actions github-actions bot added component:awx_collection issues related to the collection for controlling AWX community labels Feb 19, 2023
Copy link
Member

@AlanCoding AlanCoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clearly fits the existing patterns there.

@AlanCoding
Copy link
Member

Is the proper issue for this #12720?

Could I get some meta summaries there? Is that issue solved completely by this patch?

@sean-m-sullivan
Copy link
Contributor Author

sean-m-sullivan commented Feb 20, 2023

This issue would be solved completely by this patch, It accepts both the previous, just

inventory: name

and the export form

inventory:
   name: name
   organization: name

as valid inputs for use in the workflow schema.

I don't think making this common across ALL options should be the case, but I implemented it so it would be a "breaking" change.

@AlanCoding
Copy link
Member

Okay, looks good to me. Is this ready to merge?

@sean-m-sullivan
Copy link
Contributor Author

yes, its good to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community component:awx_collection issues related to the collection for controlling AWX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants