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

Add scm_branch to inventory source and inventory update #13644

Merged
merged 5 commits into from
Mar 11, 2023

Conversation

fosterseth
Copy link
Member

SUMMARY

Allows users to set scm_branch on inventory sources (if type is scm)

Aims to solve #5692

ISSUE TYPE
  • New or Enhanced Feature
COMPONENT NAME
  • API

awx/api/serializers.py Outdated Show resolved Hide resolved
@AlanCoding
Copy link
Member

This looks good, code is plausibly fully-functional on the API side.

  • the checks are complaining that the collection wasn't updated after a new field was added
  • UI needs this added to inventory source page, which is complicated by the source='scm' conditional in the edit field
  • UI also needs this added to inventory update page

@fosterseth
Copy link
Member Author

in UI, it does show source branch on the inventory update

image

we still need to add an editable field for the inventory source page itself

@github-actions github-actions bot added the component:awx_collection issues related to the collection for controlling AWX label Mar 3, 2023
@fosterseth
Copy link
Member Author

added scm_branch to the inventory_source collection module

@fosterseth fosterseth force-pushed the inv_source_scm_branch branch 2 times, most recently from 34cdb20 to bde1130 Compare March 3, 2023 21:56
@fosterseth
Copy link
Member Author

for testing: @CFSNM

  • create inventory source based on project
  • set inventory_source.scm_branch to non-default branch of project (e.g. foo)
  • launch inventory update, and assert that the revision matches foo, and that inventory contains hosts from foo
  • ideally the hosts on foo are different from the hosts on the default branch

@fosterseth
Copy link
Member Author

@gamuniz 's UI changes are shown below

inventory source form

image

inventory source detail

image

@cypress
Copy link

cypress bot commented Mar 10, 2023

5 failed tests on run #14644 ↗︎

5 127 13 0 Flakiness 0

Details:

fix ui lint
Project: AWX - Functional Commit: ab6511a833
Status: Failed Duration: 11:33 💡
Started: Mar 10, 2023 10:11 PM Ended: Mar 10, 2023 11:23 PM
Failed  execution-environments/execution-environment.cy.js • 1 failed test

View Output Video

Test Artifacts
Execution Environment - List, details and edit > EE list, details and edit Output Screenshots Video
Failed  inventories/smart-inventory.cy.js • 1 failed test

View Output Video

Test Artifacts
Smart Inventories > Smart Inventory add form Output Screenshots Video
Failed  projects/projects.cy.js • 1 failed test

View Output Video

Test Artifacts
Visual Testing - Project Page > Project tabs Output Screenshots Video
Failed  schedules/schedules.cy.js • 1 failed test

View Output Video

Test Artifacts
Visual Testing - Schedules > Schedules details and edit Output Screenshots Video
Failed  templates/job-templates.cy.js • 1 failed test

View Output Video

Test Artifacts
Job template list, details and edit > Templates list, template details, template edit Output Screenshots Video

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@akus062381
Copy link
Member

UI Tests are passing. the five failures are in the visual tests and are not actual defects in the UI itself.

@akus062381 akus062381 merged commit d2aa1b9 into ansible:devel Mar 11, 2023
@drdamour
Copy link

drdamour commented Apr 4, 2023

how do i know what version this enhancement makes it into?

@AlanCoding
Copy link
Member

Github will list the tags a commit is a part of

d2aa1b9

That shows 22.0.0 and 21.14.0

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

Successfully merging this pull request may close these issues.

None yet

6 participants