27888 Commits

Author SHA1 Message Date
Alan Rominger
7734def856
Fix inventory log timestamp, organize logging code
The fixes and issue where the timestaps in the stdout for
inventory updates gave the time since the start of the dispatcher
instead of the time since the start of the update.

This commit also moves the handler into the utils module where
other custom AWX handlers live, instead of tasks.py
this is to keep tasks.py relatively clean, as best as possible
2020-11-30 11:36:16 -05:00
Alan Rominger
d6e84b54c9
Some fixes for line numbering, and fixes for license error handling (#8)
* Change handling of error cases to global post_run_hook
* handle license errors correctly again
* Fix some issues with line ordering from the custom logger thing
* Remove debug log statement
* Use PermissionDenied for license errors
* More elegant handling of line initialization

Update tests to new exception type

Catch all save errors, fix timing offset bug

Fix license error handling inside import command
2020-11-30 11:35:33 -05:00
Alan Rominger
ec93af4ba8
Not all license errors are caught, do not assume they are 2020-11-30 11:35:32 -05:00
Jim Ladd
197d50bc44
patch test_inventory_update_injected_content
* proot now enabled at task-level
  since tasks are no longer calling
  awx-manage (which would set up its own proot)
* dropping proot env var since it's not
  relevant to the test
2020-11-30 11:35:32 -05:00
Jim Ladd
5ad60a3ed4
use inventory_id to get advisory_lock 2020-11-30 11:35:32 -05:00
Jim Ladd
38638b4a6b
add note to remove private_dir when proot removed 2020-11-30 11:35:32 -05:00
Jim Ladd
232801e0ba
cache end_line for RunInventoryUpdate jobs 2020-11-30 11:35:32 -05:00
Jim Ladd
d55f36eb90
add clarifying comment
* noting that the inv update task only uses the
  inventory update management command to
  save the inv to the database
  (it doesn't do the work of fetching hosts / groups)
2020-11-30 11:35:31 -05:00
Jim Ladd
277c47ba4e
add TODO reminders to remove proot / venv code
* won't be needed once we move to container-based
  execution
2020-11-30 11:35:31 -05:00
Jim Ladd
12cbc9756b
inventory updates should use custom venv 2020-11-30 11:35:31 -05:00
Jim Ladd
72df8723f6
lint 2020-11-30 11:35:31 -05:00
Jim Ladd
a8710bf2f1
restore proot for inventory updates
- in the past, inv. update jobs called `awx-manage inventory_update`
  which took care of setting up process isolation
- at this point, though, inv. update jobs call runner / ansible-inventory
  directly, so we need another way to put process isolation in place
- thankfully, there was already support for providing process isolation
  for other types of jobs (namely JT Jobs, Project Updates and Ad Hoc
  commands)
- so, we do what those other jobs do and override the stub for should_use_proot
  (which by default returns false) so that it keys off of the
  `AWX_PROOT_ENABLED` setting
2020-11-30 11:35:31 -05:00
Jim Ladd
4bdc488fe7
restore proot code
* add TODOs to note where proot-related code
  can be removed in the future
  (after moving to container-based execution)
2020-11-30 11:35:31 -05:00
Jim Ladd
9633714c49
create lock for perform_update
* perform_update can be called from either awx-manage
  or the RunInventoryUpdate task
* need to make sure that the inventory updates
  that happen with perform_update are atomic
2020-11-30 11:35:31 -05:00
Shane McDonald
66bdcee854
Address rebase fallout 2020-11-30 11:35:31 -05:00
Shane McDonald
e61f79c8c3
Fix tests 2020-11-30 11:35:30 -05:00
Alan Rominger
96fc38d182
Swap in-memory logger to write stdout in post_save_hook
This commit makes the needed changes to inventory update
post_save_hook logic so that the historic log lines that
inventory updates write will be written to stdout,
but this hack bypasses the ansible-runner verbose event
logic and dispatches verbose events directly.

Fix the venv application with the ansible-inventory system
(note: much of this is undone in a later commit)

Deal with some minor test updates for
the ansible-inventory interface changes
2020-11-30 11:32:26 -05:00
Alan Rominger
ae9ae14e5a
Migrate inventory CLI options to programatic interface
POC, successfully importing with this commit

Attempt to surface saving related errors as a part of that
2020-11-30 11:31:38 -05:00
Alan Rominger
39fa70c58b
Start on refactor to hook in inventory programatic use 2020-11-30 11:28:49 -05:00
softwarefactory-project-zuul[bot]
a45f586599
Merge pull request #8655 from mabashian/8606-adhoc-detail-cred
Display machine credential in job details when present

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-11-30 14:09:28 +00:00
softwarefactory-project-zuul[bot]
170e64070b
Merge pull request #8659 from mabashian/7989-group-action-buttons
Hide edit/delete buttons on group details view for users that don't have permissions

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-11-30 13:37:35 +00:00
softwarefactory-project-zuul[bot]
ff3f5fd529
Merge pull request #8628 from nixocio/ui_issue_7681
Hide sync icon for smart inventory rows in Inventory List

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-11-27 21:21:30 +00:00
softwarefactory-project-zuul[bot]
1e66a977c7
Merge pull request #8375 from mabashian/workflow-approvals
Adds workflow approval list and details

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-11-25 21:09:04 +00:00
softwarefactory-project-zuul[bot]
1b233aa8cc
Merge pull request #8682 from jakemcdermott/fix-8669
Only display inventory file for scm sources

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-11-25 17:01:55 +00:00
Jake McDermott
294b9c8910
Only display inventory file for scm sources 2020-11-25 11:02:07 -05:00
softwarefactory-project-zuul[bot]
6f43784c47
Merge pull request #8671 from AlanCoding/weird_fail
Avoid copies made from failed updates

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-11-25 15:58:51 +00:00
softwarefactory-project-zuul[bot]
9921887ce8
Merge pull request #8679 from AlanCoding/text_soup
Apply more rigor to asserting text in stdout

Reviewed-by: awxbot
             https://github.com/awxbot
2020-11-25 15:49:29 +00:00
Alan Rominger
501cf297df
Apply more rigor to asserting text in stdout 2020-11-25 10:04:48 -05:00
softwarefactory-project-zuul[bot]
169f55c908
Merge pull request #8668 from jakemcdermott/zuul-updates-ship-ui-next
Remove *-next make targets

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-11-24 21:24:19 +00:00
Jake McDermott
c0d8474ac6
Undo staged locale changes after devel build 2020-11-24 15:39:54 -05:00
Alan Rominger
44949b73cf
Avoid copies made from failed updates 2020-11-24 15:33:44 -05:00
softwarefactory-project-zuul[bot]
b55c5f7de2
Merge pull request #8612 from fosterseth/fix-8501_delete_workflow_app_temp_500
Allow deletion of workflow approval template

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-11-24 19:07:10 +00:00
Jake McDermott
ef27ebfed8
Remove *-next make targets 2020-11-24 13:58:19 -05:00
Seth Foster
a66eca82c2
can delete approval node 2020-11-24 12:27:42 -05:00
softwarefactory-project-zuul[bot]
7248e2c6d0
Merge pull request #8607 from ansible/ship-ui-next
Ship the new ui

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-11-24 16:48:21 +00:00
mabashian
24f3499bd9 Hide edit/delete buttons on group details view for users that don't have permissions 2020-11-23 16:20:24 -05:00
softwarefactory-project-zuul[bot]
a50034be3c
Merge pull request #8651 from wenottingham/not-any-more
Clean up some old sourve var settings in unit tests

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-11-23 20:34:52 +00:00
softwarefactory-project-zuul[bot]
470db2bc91
Merge pull request #8588 from nixocio/ui_async
Update usage of useDeleteItems

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-11-23 20:27:53 +00:00
Jake McDermott
02021fe2c9
Source variables provided at build time 2020-11-23 15:14:55 -05:00
softwarefactory-project-zuul[bot]
4882ca0481
Merge pull request #8643 from AlexSCorey/8642-InventoryonWFJTForm
Inventory Lookup on WFJT Form should not be required

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-11-23 18:57:22 +00:00
Jake McDermott
526a4c303f
Include awx logos for official installs 2020-11-23 13:52:25 -05:00
softwarefactory-project-zuul[bot]
bb5f494fbd
Merge pull request #8626 from nixocio/ui_minor_strings_update
Add minor update to strings

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-11-23 18:24:21 +00:00
Jake McDermott
c81bc60a33
Source default login logo from static files 2020-11-23 13:22:45 -05:00
Jake McDermott
a28c44e509
Source header logo from static files 2020-11-23 13:22:38 -05:00
Jake McDermott
27219d34eb
Remove vestigal django stuff for old ui 2020-11-23 13:22:34 -05:00
Jake McDermott
f49e4a646f
Remove legacy make targets 2020-11-23 13:22:30 -05:00
Jake McDermott
b699864f00
remove classic ui 2020-11-23 13:22:25 -05:00
Jake McDermott
abaeec40ae
Ship the new ui with awx installation and builds 2020-11-23 13:22:12 -05:00
mabashian
f81f6cf114 Remove fullWidth prop from machine credential detail field as it's not needed 2020-11-23 11:45:59 -05:00
mabashian
81bccc1c7f Display machine credential in job details when present 2020-11-23 11:41:07 -05:00