29089 Commits

Author SHA1 Message Date
softwarefactory-project-zuul[bot]
16c18886e8
Merge pull request #9729 from sean-m-sullivan/project_update_changed
Update changed logic on project update

SUMMARY
Related to #8349
Found the inventory source does not have a way to track it, so did not do that part.
However scm revision is tracked for project update, as we already retrieve this data when looking for the existing item and waiting, put in logic to compare the two values when wait is true.
Also double checked the integration tests, and believe this should not change them, as its looking for result is success not changed in all but the first update.
ISSUE TYPE

Feature Pull Request

COMPONENT NAME

awx_collection

AWX VERSION
18.0.0

Reviewed-by: Bianca Henderson <beeankha@gmail.com>
2021-03-30 15:07:45 +00:00
softwarefactory-project-zuul[bot]
99e65300a2
Merge pull request #9686 from nixocio/ui_issue_9416
Update RBAC for EE

Update RBAC for EE details page.
See: #9416

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-03-30 14:59:47 +00:00
softwarefactory-project-zuul[bot]
c16079e5f8
Merge pull request #9741 from shanemcd/fix-project-inventories
Fix inventories-from-projects when running in Kubernetes

Related: #9704
Will also require a new release of the operator which will contain ansible/awx-operator#155

Reviewed-by: Elijah DeLee <kdelee@redhat.com>
Reviewed-by: Chris Meyers <None>
Reviewed-by: Bianca Henderson <beeankha@gmail.com>
2021-03-30 14:48:48 +00:00
sean-m-ssullivan
dde408ea1a update docs 2021-03-30 09:35:52 -05:00
softwarefactory-project-zuul[bot]
63798df06c
Merge pull request #9748 from shanemcd/runner-2-alpha-1
Use Ansible Runner 2.0 alpha 1

Reviewed-by: Yanis Guenane <None>
2021-03-30 13:47:30 +00:00
Shane McDonald
54308c5fa1
Use Ansible Runner 2.0 alpha 1 2021-03-30 09:08:39 -04:00
softwarefactory-project-zuul[bot]
657f366e21
Merge pull request #9744 from shanemcd/fix-k8s-ca
Fix k8s credentials that use a custom ca cert

Reviewed-by: Elijah DeLee <kdelee@redhat.com>
2021-03-30 13:00:03 +00:00
sean-m-ssullivan
fce544bb73 add test logic 2021-03-29 22:14:06 -05:00
Shane McDonald
4beeeae9f1
Fix k8s credentials that use a custom ca cert 2021-03-29 17:49:50 -04:00
softwarefactory-project-zuul[bot]
8673631e64
Merge pull request #9742 from nixocio/ui_improve_ee_details
Add managed by tower as part of the EE details page

Add managed by tower as part of the EE details page.
See: #8171

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-03-29 21:42:21 +00:00
softwarefactory-project-zuul[bot]
3de04d33c8
Merge pull request #9743 from beeankha/fix_collections_linting_issues
Fix Collections Linting Errors (Format String Specifications)

Reviewed-by: Rebeccah Hunter <rhunter@redhat.com>
Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
2021-03-29 20:50:18 +00:00
beeankha
b1119d2972 Fix format specification linting erros 2021-03-29 16:11:06 -04:00
nixocio
ac41af8a54 Add managed by tower as part of the EE details page
Add managed by tower as part of the EE details page.

See: https://github.com/ansible/awx/issues/8171
2021-03-29 15:08:54 -04:00
softwarefactory-project-zuul[bot]
94eeea6c33
Merge pull request #9738 from beeankha/update_schedule_sort
Enable ?page_size=1 to Fetch Correct Objects on JT Endpoint

SUMMARY

Problem:
When multiple schedules are made from a single JT and a URL sort is done via:
api/v2/job_templates/[id]/schedules/?page_size=1
... the first half of the results come back with the same ID. 🤔
Solution:
Implementing a backup sort via ID on the schedules model fixes this problem, and now all schedules on the job template endpoint are being fetched properly.

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME


API

AWX VERSION

awx: 18.0.0

ADDITIONAL INFORMATION

This might fix #9632

Reviewed-by: Seth Foster <None>
Reviewed-by: Rebeccah Hunter <rhunter@redhat.com>
2021-03-29 19:03:33 +00:00
Shane McDonald
b73759e380
Fix collection test 2021-03-29 15:03:28 -04:00
Shane McDonald
a5b29201a4
Update tests to use ee fixture 2021-03-29 14:45:21 -04:00
Shane McDonald
f80c2cbfc3
Delete test for unused code 2021-03-29 14:45:03 -04:00
Shane McDonald
3d533e5661
Fix container group OPTIONS request 2021-03-29 13:26:59 -04:00
Shane McDonald
91351f7e3b
Fix default setting for KEEP_POD 2021-03-29 13:13:05 -04:00
Shane McDonald
9bc0bf0ee7
Fix inventory updates when running inside of k8s 2021-03-29 13:09:56 -04:00
Shane McDonald
9d17d40b86
Add setting for keeping container group pod after job run
Helpful for debugging
2021-03-29 13:09:31 -04:00
Shane McDonald
eeb6aaaea9
Always use EE resolving logic 2021-03-29 13:09:13 -04:00
Shane McDonald
1e9b221486
Use revolved EE for Container Group tasks 2021-03-29 13:05:57 -04:00
softwarefactory-project-zuul[bot]
03ab9f4e2a
Merge pull request #9735 from jbradberry/update-docker-file-version
Update the versioning on the docker-compose template

SUMMARY
Some versions of docker-compose will break with the new addition of
name parameters without this.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

Installer

Reviewed-by: Shane McDonald <me@shanemcd.com>
Reviewed-by: Bianca Henderson <beeankha@gmail.com>
Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
2021-03-29 16:15:27 +00:00
beeankha
675286c1ac Enable ?page_size=1 in URL to fetch correct objects on schedules endpoint 2021-03-29 11:52:20 -04:00
Jeff Bradberry
b6ccd02f3d Update the versioning on the docker-compose template
Some versions of docker-compose will break with the new addition of
name parameters without this.
2021-03-29 10:39:22 -04:00
softwarefactory-project-zuul[bot]
a2e63bd1e2
Merge pull request #9732 from shanemcd/fix-pdd-detection
Fix awxkit function that detects private data directories in job args

Reviewed-by: Yago Marques <yagomarquesja@gmail.com>
2021-03-29 13:46:32 +00:00
Shane McDonald
8fb393c0a1
Fix awxkit function that detects private data directories in job args 2021-03-29 09:11:56 -04:00
sean-m-ssullivan
c2b5ffcc1c linting 2021-03-29 00:21:29 -05:00
sean-m-ssullivan
dbcdbe0770 add logic to changed status 2021-03-28 22:35:38 -05:00
Sean Sullivan
0b6acdbcc9
Merge pull request #62 from ansible/devel
Rebase
2021-03-28 22:19:59 -05:00
softwarefactory-project-zuul[bot]
ba2fd6f801
Merge pull request #9725 from ryanpetrello/500-unauth-wf-approval
fix an HTTP 500 error for unauthenticated users

see: #7243

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
2021-03-27 03:08:47 +00:00
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
6062d1ec9f
fix an HTTP 500 error for unauthenticated users
see: https://github.com/ansible/awx/issues/7243
2021-03-26 16:40:48 -04: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
nixocio
d3eb66b6fe Update RBAC for EE
Update RBAC for EE details page.

See: https://github.com/ansible/awx/issues/9416
2021-03-25 15:55:59 -04:00