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

Allow modification of schedule if there are two of the same name #12407

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

Tompage1994
Copy link
Contributor

SUMMARY

Fixes issue where you couldn't modify or delete a schedule if two schedules of the same name exist.
related #12406

ISSUE TYPE
  • Bug or Docs Fix
COMPONENT NAME
  • Collection
AWX VERSION
21.2.0
ADDITIONAL INFORMATION

@github-actions github-actions bot added the component:awx_collection issues related to the collection for controlling AWX label Jun 22, 2022
Copy link
Member

@john-westcott-iv john-westcott-iv left a comment

Choose a reason for hiding this comment

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

Thanks for finding and fixing this issue!

Could we also add a test in awx/awx_collection/tests/integration/targets/schedule/tasks where you create two schedules with the same name and then try to delete one by name and assert that fails and then delete by name/unified_job_template and assert that works?

awx_collection/plugins/modules/schedule.py Show resolved Hide resolved
@Tompage1994
Copy link
Contributor Author

I can do, however that wouldn't necessarily have failed in the way you expect with the current code.

Right now what happens if you create two of the same name using the modules it will just override the first with the second. Obviously the checking for a failure when no UJT is set will help us detect regression here though.

Copy link
Member

@john-westcott-iv john-westcott-iv left a comment

Choose a reason for hiding this comment

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

Looks good from a code perspective, will wait for QE to add coverage before merging

@Tompage1994
Copy link
Contributor Author

@john-westcott-iv I managed to get my pytest working properly and have added a unit test which captures the issue and should prevent regression

@jay-steurer jay-steurer self-assigned this Jun 27, 2022
@cypress
Copy link

cypress bot commented Jun 27, 2022



Test summary

648 0 795 0Flakiness 4


Run details

Project AWX - Functional
Status Passed
Commit 64b90d6
Started Jun 28, 2022 4:23 PM
Ended Jun 28, 2022 6:22 PM
Duration 59:05 💡
OS Linux Debian - 11.3
Browser Chrome 99

View run in Cypress Dashboard ➡️


Flakiness

credentials/credential-crud.spec.js Flakiness
1 Credentials- Upload > can upload a json file that will clear out current values of all 3 fields and then add values from the file
job-templates/job-template-crud.spec.js Flakiness
1 Job Templates- Create > can create a job template from project job template tab and see the template appear in that list
hosts/hosts-lists.spec.js Flakiness
1 Host list > can sort hosts by name
workflows/workflow-visualizer/workflow-viz-wfjt-node-prompt-and-survey.spec.js Flakiness
1 Workflow node within a workflow > can prompt and survey against a workflow node with empty visualizer and save

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@jay-steurer jay-steurer merged commit b70231f into ansible:devel Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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