29054 Commits

Author SHA1 Message Date
softwarefactory-project-zuul[bot]
cd489262bc
Merge pull request #9726 from shanemcd/nicer-black-output
Hide commands that are being run for `make black`

Before:
$ make black
command -v black >/dev/null 2>&1 || { echo "could not find black on your PATH, you may need to \`pip install black\`, or set AWX_IGNORE_BLACK=1" && exit 1; }
could not find black on your PATH, you may need to `pip install black`, or set AWX_IGNORE_BLACK=1
make: *** [Makefile:275: black] Error 1

After:
$ make black
could not find black on your PATH, you may need to `pip install black`, or set AWX_IGNORE_BLACK=1
make: *** [Makefile:275: black] Error 1

Reviewed-by: Ryan Petrello <None>
2021-03-26 21:47:43 +00:00
softwarefactory-project-zuul[bot]
950f772b49
Merge pull request #9722 from beeankha/remove_tower_cli
Remove/Modify Usage of tower-cli (Deprecated) in Collections Test

tower-cli is no longer being maintained; this PR removes three test tasks that are no longer necessary from awx_collection/tests/integration/targets/tower_project_manual/tasks/create_project_dir.yml, and it modifies the last task in that test file to use awx-cli instead.

I also noticed this warning while running Collections tests:
awx/main/tasks.py:2109
  /awx_devel/awx/main/tasks.py:2109: DeprecationWarning: invalid escape sequence \s
    d['Password:\s*?$'] = 'scm_password'  # noqa

This PR modifies that part of /awx_devel/awx/main/tasks.py into a raw string to fix this issue.

FYI, some deprecated Collections modules depend on the usage of tower-cli, but those tests are currently getting skipped:
awx_collection/test/awx/test_send_receive.py::test_receive_send_jt SKIPPED (The tower-cli library is needed to run th...) [ 56%]
awx_collection/test/awx/test_workflow_template.py::test_create_workflow_job_template SKIPPED (The tower-cli library i...) [ 73%]
awx_collection/test/awx/test_workflow_template.py::test_with_nested_workflow SKIPPED (The tower-cli library is needed...) [ 74%]
awx_collection/test/awx/test_workflow_template.py::test_schema_with_branches SKIPPED (The tower-cli library is needed...) [ 74%]
awx_collection/test/awx/test_workflow_template.py::test_with_missing_ujt SKIPPED (The tower-cli library is needed to ...) [ 75%]

Reviewed-by: Bianca Henderson <beeankha@gmail.com>
Reviewed-by: Ryan Petrello <None>
2021-03-26 21:24:37 +00:00
Shane McDonald
eac7c409d1
Hide commands that are being run for make black 2021-03-26 17:11:04 -04:00
softwarefactory-project-zuul[bot]
ffdce7b1d0
Merge pull request #9724 from ryanpetrello/timey-whimey
fix up a bug in rsyslogd error handling

@kdelee I'm unclear on why this is actually happening, so I'm just gonna cheat and generate a datestring

Reviewed-by: Elijah DeLee <kdelee@redhat.com>
2021-03-26 21:02:18 +00:00
Ryan Petrello
4eb85ad23e
fix up a bug in rsyslogd error handling
see: https://github.com/ansible/tower/issues/4915
2021-03-26 16:27:53 -04:00
beeankha
b681d1078f Update unit test to pull in product names that are no longer hardcoded 2021-03-26 16:17:14 -04:00
beeankha
f38c9e7478 Update manual project Collection integration test to be compatible with EEs 2021-03-26 15:35:52 -04:00
softwarefactory-project-zuul[bot]
f75a0ca1b6
Merge pull request #9713 from jakemcdermott/fix-9701
Don't append a slash to file paths

for #9701

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
Reviewed-by: Shane McDonald <me@shanemcd.com>
Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
2021-03-26 18:38:29 +00:00
beeankha
81024f8dfe Remove/modify usage of tower-cli in Collections tests 2021-03-26 11:46:08 -04:00
Jake McDermott
93d1df4e4b
Use custom text for setting source path 2021-03-26 11:34:29 -04:00
Jake McDermott
a86196cfa3
Don't append a slash to file paths 2021-03-26 11:34:20 -04:00
softwarefactory-project-zuul[bot]
499d80c4b0
Merge pull request #9653 from nixocio/ui_issue_9088
Add EE to the settings page

Allow a system admin to set the global default execution environment.
See: #9088
This PR is also addressing the issue: #9669
Edit:


Details

Reviewed-by: Kersom <None>
Reviewed-by: Marliana Lara <marliana.lara@gmail.com>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-03-26 14:40:56 +00:00
softwarefactory-project-zuul[bot]
6aff5d9b5a
Merge pull request #9697 from ryanpetrello/ansible-version
remove ansible_version from the API config and metrics endpoints

AWX no longer includes Ansible on the control plane and there is no
"global" version of Ansible aside from what's configured at the
Execution Environment level
see: #9472

Reviewed-by: Ryan Petrello <None>
Reviewed-by: Ladislav Smola <lsmola@redhat.com>
Reviewed-by: Yanis Guenane <None>
Reviewed-by: Bianca Henderson <beeankha@gmail.com>
Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
2021-03-25 21:33:53 +00:00
softwarefactory-project-zuul[bot]
db21b17ccd
Merge pull request #9696 from dhoppe/patch-1
Set a custom name for Docker volumes

SUMMARY
This pull request is related to #9695 and will make sure that the command make docker-compose does not create additional Docker volumes with the wrong prefix.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

Installer

AWX VERSION
awx: 18.0.0

ADDITIONAL INFORMATION
The current version of docker-compose.yml.j2 does not care about the Docker volumes created during the execution of migrate.yml. This means new Docker volumes will be created with the wrong prefix, which only contain the preloaded data.
This does not make sense, because I want to keep my data and according to the docs, the following command is necessary to load the demo data.
$ docker exec tools_awx_1 awx-manage create_preload_data

Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-03-25 20:57:56 +00:00
softwarefactory-project-zuul[bot]
dee8ed70cd
Merge pull request #9711 from jladdjr/let_jupyter_install_ipython
let jupyter install ipython

running akit with ipython on py38:
In [1]: jt = v2.job_templates.create()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/usr/lib64/python3.8/codeop.py in __call__(self, source, filename, symbol)
    141
    142     def __call__(self, source, filename, symbol):
--> 143         codeob = compile(source, filename, symbol, self.flags, 1)
    144         for feature in _features:
    145             if codeob.co_flags & feature.compiler_flag:

TypeError: required field "type_ignores" missing from Module

Looks like we need a newer version of ipython:
ipython/ipython#12558 (comment)
.. because we pinned ipython in 2017
a39b1e8
If I try to install the newer ipython alongside jupyter, pip's dep resolver mentions a conflict
.. but if we just install jupyter there are no conflicts and a newer ipython (that avoids the original issue) gets installed.
pip freeze | grep "ipython\|jupyter"
ipython==7.21.0
ipython-genutils==0.2.0
jupyter==1.0.0
jupyter-client==6.1.12
jupyter-console==6.4.0
jupyter-core==4.7.1
jupyterlab-pygments==0.1.2
jupyterlab-widgets==1.0.0

In [1]: jt = v2.job_templates.create()

In [2]: jt
Out[2]:
{
    "id": 12,
    "type": "job_template",
    "url": "/api/v2/job_templates/12/",

Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-03-25 20:56:27 +00:00
Jim Ladd
a1aec29e48 let jupyter install ipython 2021-03-25 13:17:21 -07:00
softwarefactory-project-zuul[bot]
6087d5cb9c
Merge pull request #9461 from fosterseth/feat_metrics_via_redis
Add subsystem metrics that propagate through Redis

SUMMARY

#9019 -- list of metrics and their purpose / description
#9012
#9056
#8629
Use Redis to store metrics pertaining to the performance and health of subsystems such as the callback receiver and task manager. It is thread / multiprocess safe and should be fast enough to handle a high volume of data.
This data shows up at the /api/v2/metrics endpoint
You can filter down nodes using /api/v2/metrics/?subsystemonly=1&node=awx-1
You can also filter down to a specific metric,
/api/v2/metrics/?subsystemonly=1&metrics=callback_receiver_events_insert_db_seconds&node=awx-1

ISSUE TYPE


Feature Pull Request

COMPONENT NAME


API

AWX VERSION

awx: 17.0.1

Reviewed-by: Ryan Petrello <None>
Reviewed-by: Chris Meyers <None>
Reviewed-by: Seth Foster <None>
Reviewed-by: Elijah DeLee <kdelee@redhat.com>
2021-03-25 19:54:21 +00:00
Seth Foster
0c569c67fd
Add subsystem metrics
- Adds a Metrics() class that can track data such as number of
events the callback receiver inserted into database
- Exposes this metric data at the api/v2/metrics/ endpoint.
This data is prometheus-friendly
- Metric data is stored in memory, then periodically saved to Redis.
- Metric data is periodically broadcast to other nodes in the cluster,
so that each node has a copy of the most recent metric data collected.
2021-03-25 15:23:52 -04:00
Shane McDonald
f8a698d127
Update minikube.md 2021-03-25 15:21:01 -04:00
softwarefactory-project-zuul[bot]
b5c3857a63
Merge pull request #9551 from beeankha/loosen_collection_ver_check
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>
2021-03-25 19:10:07 +00:00
softwarefactory-project-zuul[bot]
690045c8e0
Merge pull request #9671 from fosterseth/fix_4602_pending_jobs_incorrect_metrics
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>
2021-03-25 19:10:04 +00:00
softwarefactory-project-zuul[bot]
874505e2a3
Merge pull request #9707 from shanemcd/quay
Devel images are now on Quay

Reviewed-by: Ryan Petrello <None>
Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
Reviewed-by: Jim Ladd <None>
2021-03-25 19:04:19 +00:00
Seth Foster
3f342feadd
Fix api/v2/metrics data displaying incorrect value
- Use a locally defined prometheus registry instead of global registry
2021-03-25 14:22:17 -04:00
softwarefactory-project-zuul[bot]
f46c968742
Merge pull request #9706 from ryanpetrello/black-deleted
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>
2021-03-25 18:00:05 +00:00
Shane McDonald
8bb90dde33
Devel images are now on Quay 2021-03-25 13:27:19 -04:00
softwarefactory-project-zuul[bot]
fa3e55be91
Merge pull request #9588 from AlexSCorey/9456-9466-UserAndTeamsAccessAdd
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>
2021-03-25 17:26:23 +00:00
Ryan Petrello
81266cf7a7
only run black on files added or modified in the commit 2021-03-25 13:26:14 -04:00
nixocio
b110a4a94e Add EE to the settings page
Allow a system admin to set the global default execution environment.

See: https://github.com/ansible/awx/issues/9088

This PR is also addressing the issue: https://github.com/ansible/awx/issues/9669
2021-03-25 13:07:01 -04:00
softwarefactory-project-zuul[bot]
d286a77010
Merge pull request #9699 from nixocio/ui_small_fixes
Small UI updates

Small UI updates

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
2021-03-25 17:04:50 +00:00
softwarefactory-project-zuul[bot]
a7992d06e3
Merge pull request #9659 from jakemcdermott/fix-7657
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>
2021-03-25 16:58:03 +00:00
softwarefactory-project-zuul[bot]
705881123c
Merge pull request #9345 from AlexSCorey/5546-DeleteWarnings
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>
2021-03-25 16:52:13 +00:00
Ryan Petrello
db20bbe682
remove ansible_version from the API config and metrics endpoints
AWX no longer includes Ansible on the control plane and there is no
"default" version of Ansible aside from what's configured at the
Execution Environment level

see: https://github.com/ansible/awx/issues/9472
2021-03-25 11:09:47 -04:00
John Westcott IV
75a99bb1d5 Fixing version check 2021-03-25 10:56:34 -04:00
John Westcott IV
aa9906ebae Fixing issues 2021-03-25 10:39:03 -04:00
John Westcott IV
bb43ecb0b5 Splitting out AWX and Tower versions 2021-03-25 10:39:03 -04:00
beeankha
e2b290ff99 Use distutils instead of semver, add/update unit tests 2021-03-25 10:39:03 -04:00
beeankha
b2665c084e Loosen Collections v Tower version check 2021-03-25 10:39:03 -04:00
nixocio
133b25d6ad Small UI updates
Small UI updates
2021-03-25 10:17:55 -04:00
softwarefactory-project-zuul[bot]
ecc839169a
Merge pull request #9670 from ryanpetrello/burst-your-bubble
remove unnecessary references to bwrap, bubblewrap, and proot

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
Reviewed-by: Ryan Petrello <None>
Reviewed-by: Bill Nottingham <None>
Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-03-25 13:55:22 +00:00
Dennis Hoppe
9390452f02
Set a custom name for Docker volumes 2021-03-25 12:51:05 +01:00
softwarefactory-project-zuul[bot]
ef691507b3
Merge pull request #9690 from ryanpetrello/relnotes-next
Add some release notes for the next major version of AWX

Reviewed-by: Yanis Guenane <None>
2021-03-25 08:43:52 +00:00
softwarefactory-project-zuul[bot]
11563e8333
Merge pull request #9691 from ryanpetrello/38-requirements
build requirements with python3.8

Reviewed-by: Ryan Petrello <None>
Reviewed-by: Yanis Guenane <None>
2021-03-25 08:41:37 +00:00
Ryan Petrello
4773c54bf2
build requirements with python3.8 2021-03-24 21:47:55 -04:00
Ryan Petrello
5d210a1063
remove unnecessary references to bwrap, bubblewrap, and proot 2021-03-24 21:20:08 -04:00
Ryan Petrello
97ae4ec250
Add some release notes for the next major version of AWX 2021-03-24 21:19:27 -04:00
softwarefactory-project-zuul[bot]
73cc9e7b35
Merge pull request #9688 from ryanpetrello/fix-busted-collection-pep8
fix busted pep8 collection tests

see: psf/black#1841

Reviewed-by: Elijah DeLee <kdelee@redhat.com>
Reviewed-by: Matt Clay <None>
2021-03-24 21:59:43 +00:00
softwarefactory-project-zuul[bot]
2b965e5523
Merge pull request #8778 from Spredzy/bump_to_python38
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>
2021-03-24 21:41:32 +00:00
Ryan Petrello
9d9b7a226d
fix busted pep8 collection tests
see: https://github.com/psf/black/issues/1841
2021-03-24 17:28:04 -04:00
Yanis Guenane
5544e84f79 Add missing license for distro 2021-03-24 22:10:53 +01:00
softwarefactory-project-zuul[bot]
41e2920211
Merge pull request #9682 from ryanpetrello/custom-cred-open-ssh-newline
fix a bug that improperly formats OpenSSH keys in custom credential types

cc @ghjm
see: #9361

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
2021-03-24 20:07:08 +00:00