-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Feature: Allow selecting project branch / tag on JT and WFJT #282
Comments
This is effectively an ad-hoc job-as-a-job-template (where everything is asked for at launch time) |
There's a good bit of work to do on projects for this:
As @wenottingham said... a lot of our very basic fallback RBAC relies on the certainty of having a project defined... otherwise we have to fall back to org-admins and those delegated the specific job template. |
+1 for this feature |
Hi, we are in the same situation here. Is this feature request in the roadmap now for short or middle term ? Thanks. |
+1 , looking for similar feature to ask for tag/branch while running job and sync project from SCM using that branch/tag |
UI Implications
There are several places in the UI where the user can "upload" files but most notably is probably the logo file picker. I don't see too much issue with using that as a starting point for this feature. Assumption: If a file is uploaded then the user shouldn't be able to select/prompt for a project. We may need to build in a mechanism for removing that uploaded playbook if the user decides to migrate that project to source control. Error handling may be important here - what happens when the user uploads something nonsensical.
|
Whoops, we're not going to do that. We can strike that part of the feature. |
Yeah lets not do that one ;) The rest of these on the UI side look good. There's some complexity on the backend side of making sure we have the tree indexed for presenting a playbook list. Right now that's based entirely on what's on the filesystem but the files could be different between branches. This might not be fully possible depending on the scm type. For Git it's important to point out that it's not just branches we're talking about... but anything that could be referenced as a point in the tree: branch, tag, individual commits, etc. So the wording needs to reflect that. |
Some notes from design meeting: Model semantics:
Playbook indexing and selecting
Workflows:
Job Execution:
|
UI notes
|
I'm planning to file this as a separate issue after I've gathered more details about the expectation. For now, this is a related card covered by this point: #3432 |
Created new issue to handle that point - #3903 |
Link another related issue: #2357 Projects have conventionally had an My current thinking is that a project with |
I have to strike "version" from this requirement, because otherwise it becomes self-contradictory. Very important to the completion of this feature: We have 2 options. Either Option 1: job syncs that updateThis sounds like "update on launch" behavior, but it would really be more like "update on sync". There's a difference in mechanics and user experience between the two. If a project has "update on launch", the project will reflect the updated version, but "update on sync" just pulls the remote to the execution instance, and there's no way to ever guarantee that code-state can ever be used again in a subsequent job. With that all said, I have accepted that some version of this is unavoidable (more on that later), and it is also the fastest route to having something that UI and QE can start working off of. I hope it's easy to get agreement that if some It would be easy enough to have the project's "Update on launch" button force-checked if the user clicked the "allow override" button. In this case, we update any branch on every run, and that's that. This goes further - updates would need to be disabled completely for the project, because they would be meaningless. However, I have found this can't be cleanly implemented because pull requests are part of the requirements, and those don't work in a one-off way of cloning ansible/ansible#57497 Option 2: recording branch revisionsThis is where I wanted to do bare clones, and peel off branches from those into the running directory. Downside is that it's much more complex. Upside is that offline runs might still be workable. Most obvious problem: this isn't known to be possible at all with hg and subversion. Even if I ignore those problems, the Ansible git module still can't remove stale branches and will not accurately reflect when something changed. We can still either ignore those issues (and note it in docs), or work around to some limited extent. Even if I ignore those omissions, there are still shortcomings for git itself. By default, github pull request type references will not be fetched. I can work around that for fetching the code, but not for recording the revision (cloning all references is not prohibitive for large repos, but inspecting head for them all is). That means that an implementation for this would be incomplete even for git. The only alternative is that we allow users to enter their own refspec for the project. This is almost certainly too advanced for most users. Current planFor expediency, I hope to get as much done of option 1 as I can. It won't be simple. Parts of its implementation will look like the messy option 2. |
@dsesami I am ready to close, are you? |
@kdelee there was one issue we found (seemingly only UI-side) that @jlmitch5 discussed with me (a field wasn't getting cleared out on the form backend call when swapping between two projects). I don't think that has been merged yet, so I'd like to keep it open until john has confirmed w/ me that he's pushed that + I have ran it once. I will close it afterwards. |
ISSUE TYPE
COMPONENT NAME
SUMMARY
Assorted requests we've received include items such as:
"allow the user to upload a playbook directly for a job template"All of these run afoul of the current underlying model in AWX:
This should be investigated to see if/how this linkage could be broken to enable use cases like above, and what that would entail.
ADDITIONAL INFORMATION
The text was updated successfully, but these errors were encountered: