Skip to content

In UI all project copies indicate branch override actions #16029

@2and3makes23

Description

@2and3makes23

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.
  • I am NOT reporting a (potential) security vulnerability. (These should be emailed to [email protected] instead.)

Bug Summary

Looking only at UI, multiple projects pointing at the same Git repo seem to be affected by branch override settings of one another.

If one project instance has "Allow branch override" option checked and a job template (with SCM branch set) starts running, all projects pointing ath the same Git Repo start indicating project update activity.

This does not actually seem to affect job launch behavior on project copies (See additional info).

AWX version

24.6.1

Select the relevant components

  • UI
  • UI (tech preview)
  • API
  • Docs
  • Collection
  • CLI
  • Other

Installation method

openshift

Modifications

no

Ansible version

2.17.5

Operating system

RHEL9

Web browser

Firefox

Steps to reproduce

  1. Create two or more projects pointing to the same Git repo (it is not important if copying the first project or creating them manually):
    Minimal settings:

    • Name
    • Organization
    • Source Control Type: Git
    • Source Control Credential
  2. Set one of the projects to "Allow branch override" and add a job template to this project

    • Any minimal playbook running on localhost will do
    • Minimal Job Template settings: Name, Job Type, Inventory, Project, Playbook
    • Set "Source Control Branch" to any existing branch (e.g. "main")
  3. Launch the job template

Expected results

Only the one project instance where "Allow branch override" has been set to true should indicate "project update"/branch switch activity.

The other projects should remain ready and unaffected since they point to individual project directories on AWX-side and they don´t have any (running) job templates or other events/settings justifying any project related branch/sync activity.

Actual results

Once the job template is launched not only its project starts indicating a running project update/branch switch activity, but all projects pointing to the same Git URL.

Image

Image

Image

Additional information

To check if project copies really start performing branch switches as well, I pushed a "new_feature" branch and set the first project´s job template to using that.

Looking at AWX´s project directory while launching the job template, only the first project really checks out the new_feature branch:

$ ls -l *light*
-rwxr-xr-x. 1 awx root    0 Jun 11 10:22 _567__light_ansible_project.lock
-rwxr-xr-x. 1 awx root    0 Jun 12 09:26 _570__light_ansible_project_112601261_am.lock
-rwxr-xr-x. 1 awx root    0 Jun 12 09:39 _571__light_ansible_project_112601261_am_113905395_am.lock
-rwxr-xr-x. 1 awx root    0 Jun 12 09:44 _572__light_ansible_project_manual_copy.lock

_567__light_ansible_project:
total 16
-rw-r--r--. 1 awx root  613 Jun 11 15:15 light_launch.yml
-rw-r--r--. 1 awx root    0 Jun 12 10:25 new_feature_file      <--------------------------- file only on "new_feature" branch
-rw-r--r--. 1 awx root  114 Jun 11 10:22 playbook.yml
-rw-r--r--. 1 awx root 6183 Jun 11 10:22 README.md

_570__light_ansible_project_112601261_am:
total 16
-rw-r--r--. 1 awx root  613 Jun 12 09:26 light_launch.yml
-rw-r--r--. 1 awx root  114 Jun 12 09:26 playbook.yml
-rw-r--r--. 1 awx root 6183 Jun 12 09:26 README.md

_571__light_ansible_project_112601261_am_113905395_am:
total 16
-rw-r--r--. 1 awx root  613 Jun 12 09:39 light_launch.yml
-rw-r--r--. 1 awx root  114 Jun 12 09:39 playbook.yml
-rw-r--r--. 1 awx root 6183 Jun 12 09:39 README.md

_572__light_ansible_project_manual_copy:
total 16
-rw-r--r--. 1 awx root  613 Jun 12 09:45 light_launch.yml
-rw-r--r--. 1 awx root  114 Jun 12 09:45 playbook.yml
-rw-r--r--. 1 awx root 6183 Jun 12 09:45 README.md

This can be confirmed by looking at each project directory and checking which knows which branches:

$ for proj_dir in $(ls -d *light* | grep -v .lock); do echo $proj_dir; cd $proj_dir; git branch; cd - >/dev/null; done
_567__light_ansible_project
* main
  new_feature
_570__light_ansible_project_112601261_am
* main
_571__light_ansible_project_112601261_am_113905395_am
* main
_572__light_ansible_project_manual_copy
* main

When launching a job template of the first project (with branch override) and one from a copy in quick succession, both job templates start unaffected of each other:

  • No waiting time for the second one while both projects indicate sync activity in UI
  • No log entries with job A is blocked by job B or similar

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions