Loosen Collections vs Tower Version Check
SUMMARY
Connecting issue #9532
This change will make it so that if the major version numbers of Collections + Tower matches, a warning will not get activated.
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
Collections
AWX VERSION
awx: 17.0.1
Reviewed-by: Ryan Petrello <None>
Reviewed-by: Jeff Bradberry <None>
Reviewed-by: John Westcott IV <None>
Fix api/v2/metrics data displaying incorrect value
SUMMARY
How to reproduce bug
Disable all instances
Queue up 5 jobs, (if using same JT, enable concurrent jobs)
Enable instance so jobs will start running
Refresh /api/v2/metrics endpoint. You should see a metric that says awx_status_total{status="pending"} 5.0. Once you see this, don't refresh again.
Wait for all jobs to finish.
Now start refreshing the api/v2/metrics endpoint. Every once in a while you will see this pending jobs metric show (awx_status_total{status="pending"} 5.0) even though there are no jobs in pending state
Fix
Use a locally defined prometheus registry instead of a global registry. Each time the endpoint is refreshed, a new, local registry is set up with prometheus objects (Gauge, Info). Since we aren't actually incrementing these metrics across api calls, we should be safe. That is to say, we just lookup the values from the database and set the prometheus values explicitly.
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
API
AWX VERSION
awx: 18.0.0
Reviewed-by: Ryan Petrello <None>
only run black on files added or modified in the commit
git rm <somefile>
git commit
black will attempt to lint the file path to the deleted file (and will fail, because the file is gone)
--diff-filter will limit what we run listing against to files in the changes that are added or modified
https://git-scm.com/docs/git-diff#Documentation/git-diff.txt---diff-filterACDMRTUXB82308203
Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
Fixes a bug with ResourceAccess Add
SUMMARY
This addresses #9456 and #9466
The user can now properly add roles to a resource.
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
UI
ADDITIONAL INFORMATION
Reviewed-by: Kersom <None>
Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
Support job cancellation through details panel
SUMMARY
for #7657
edit: also addresses #8838 cc @nixocio
Reviewed-by: Kersom <None>
Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
Adds delete warnings on lists
SUMMARY
This addresses #5546.
ISSUE TYPE
Feature Pull Request
COMPONENT NAME
UI
AWX VERSION
ADDITIONAL INFORMATION
Reviewed-by: Keith Grant <None>
Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
Reviewed-by: Kersom <None>
Python: Bump to python 3.8
SUMMARY
Bumping default python used in awx and ansible venv to python 3.8
ISSUE TYPE
Feature Pull Request
COMPONENT NAME
API
AWX VERSION
devel
ADDITIONAL INFORMATION
N/A
Reviewed-by: Ryan Petrello <None>
Reviewed-by: Bill Nottingham <None>
Reviewed-by: Yanis Guenane <None>
Properly set launched_by for jobs launched by scheduled workflows : Issue 5057
SUMMARY
with respect to the issue 5057, there should be a way by which the UI should know , if a job was launched from a workflow , and that workflow was launched from a schedule.
ISSUE TYPE
Feature Pull Request
COMPONENT NAME
API
AWX VERSION
awx: 17.0.1
ADDITIONAL INFORMATION
This PR tries to solve the issue 5057.
There is an edge case , where the API response is not very clear. When a JT is invoked from a workflow , and that workflow is invoked from a schedule, the API response does not convey how the job was launched.
So, I have added the schedule id of the schedule that invoked the workflow and which in turn invokes the JT. The new key in API response is 'launched_by', and it has the schedule id. In all the 5 previous cases mentioned in the initial issue , the 'launched_by' field is blank ( that is empty string ( "" )).
Reviewed-by: Jeff Bradberry <None>
Reviewed-by: Ryan Petrello <None>
Reviewed-by: Elijah DeLee <kdelee@redhat.com>
Reviewed-by: Amol Gautam <amol_gautam25@yahoo.co.in>
Reviewed-by: Nana <natr@hey.com>
'launched_by’ property returns summary { id,type,name,url } of object that launched the current UnifiedJob
'ancestor_job’ property returns summary { id,type,name,url } of the first workflow in case the current UnifiedJob was started by a workflow or a workflow chain
Added ‘launched_by’ field and ‘get_launched_by’ function in ‘UnifiedJobSerializer’ , to expose the ‘launched_by’ field in GET ‘api/v2/unified_job/id’ response
Added ‘ancestor_job’ field in the summary field of UnifiedJob in the GET ‘api/v2/unified_job/id’ response
fix the large file parsing in project sync
SUMMARY
Fixes the issue of scm update stuck on reading large files because of islice trying to read the whole file.
ISSUE TYPE
Bugfix Pull Request
COMPONENT NAME
API
Reviewed-by: Ryan Petrello <None>
Reviewed-by: None <None>
Add the expected launch and run methods to the different job type
models. Include a new helper function to look up the right model
given a job type and use it in place of switch statements or
passing the type in to build a url.
Filter credential type by Container Registry for EE
Filter credential type by Container Registry for EE form.
See: #9628
Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
Reviewed-by: Kersom <None>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
Add EE as one activity stream option
Add EE as one activity stream option.
See: #9308
Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
Fix service reference error for cred plugin dev env
SUMMARY
Intended to fix the error I see when running COMPOSE_TAG=devel make docker-compose-credential-plugins:
Reviewed-by: Ryan Petrello <None>
move code linting to a stricter pep8-esque auto-formatting tool, black
black (https://pypi.org/project/black/#description) is a strict superset of PEP8
It's also a tool that auto-formats your code on the fly for you based on its ruleset.
With this PR, you can run make check, and any style issues will automatically be applied.
Additionally, with this PR, if you spin up the development environment using our make targets, you'll automatically get a pre-commit hook installed that automatically runs linting prior to commit.
If you don't like this behavior, or don't want it locally, you can:
~ export AWX_IGNORE_BLACK=1
...but it's important to note that we won't merge your PR if it doesn't adhere to our style guidelines (which will run automatically as part of pre-merge CI).
Reviewed-by: Jeff Bradberry <None>
Reviewed-by: Ryan Petrello <None>
Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
Reviewed-by: Seth Foster <None>
Reviewed-by: Shane McDonald <me@shanemcd.com>
Reviewed-by: Rebeccah Hunter <rhunter@redhat.com>