2618 Commits

Author SHA1 Message Date
AlanCoding
5e595caf5e
Add workflow node identifier
Generate new modules WFJT and WFJT node
Touch up generated syntax, test new modules

Add utility method in awxkit

Fix some issues with non-name identifier in
  AWX collection module_utils

Update workflow docs for workflow node identifier

Test and fix WFJT modules survey_spec
Plug in survey spec for the new module
Handle survey spec idempotency and test

add associations for node connections
Handle node credential prompts as well

Add indexes for new identifier field

Test with unicode dragon in name
2020-03-23 22:00:00 -04:00
chris meyers
b58c71bb74
remove broadcast websockets view 2020-03-18 16:10:20 -04:00
Ryan Petrello
1caa2e0287
work around a limitation in postgres notify to properly support copying
postgres has a limitation on its notify message size (8k), and the
messages we generate for deep copying functionality easily go over this
limit; instead of passing a giant nested data structure across the
message bus, this change makes it so that we temporarily store the JSON
structure in memcached, and look it up from *within* the task

see: https://github.com/ansible/tower/issues/4162
2020-03-18 16:10:20 -04:00
chris meyers
093d204d19
fix flake8 2020-03-18 16:10:19 -04:00
chris meyers
d6594ab602
add broadcast websocket metrics
* Gather brroadcast websocket metrics and push them into redis every
configurable seconds.
* Pop metrics from redis in web view layer to display via the api on
demand
2020-03-18 16:10:18 -04:00
softwarefactory-project-zuul[bot]
1e780aad38
Merge pull request #5726 from AlanCoding/jt_org_2020
Add read-only organization field to job templates

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-16 20:03:47 +00:00
Ryan Petrello
27b48fe55b
make User.last_login read_only=True in its serializer 2020-03-13 12:53:40 -04:00
AlanCoding
7d0b207571
Organization on JT as read-only field
Set JT.organization with value from its project

Remove validation requiring JT.organization

Undo some of the additional org definitions in tests

Revert some tests no longer needed for feature

exclude workflow approvals from unified organization field

revert awxkit changes for providing organization

Roll back additional JT creation permission requirement

Fix up more issues by persisting organization field when project is removed

Restrict project org editing, logging, and testing

Grant removed inventory org admin permissions in migration

Add special validate_unique for job templates
  this deals with enforcing name-organization uniqueness

Add back in special message where config is unknown
  when receiving 403 on job relaunch

Fix logical and performance bugs with data migration

within JT.inventory.organization make-permission-explicit migration

remove nested loops so we do .iterator() on JT queryset

in reverse migration, carefully remove execute role on JT
  held by org admins of inventory organization,
  as well as the execute_role holders

Use current state of Role model in logic, with 1 notable exception
  that is used to filter on ancestors
  the ancestor and descentent relationship in the migration model
    is not reliable
  output of this is saved as an integer list to avoid future
    compatibility errors

make the parents rebuilding logic skip over irrelevant models
  this is the largest performance gain for small resource numbers
2020-03-12 15:45:46 -04:00
AlanCoding
daa9282790
Initial (editable) pass of adding JT.organization
This is the old version of this feature from 2019
  this allows setting the organization in the data sent
  to the API when creating a JT, and exposes the field
  in the UI as well

Subsequent commit changes the field from editable
  to read-only, but as of this commit, the machinery
  is not hooked up to infer it from project
2020-03-12 15:45:46 -04:00
AlanCoding
5c331934e2
Fix server error creating smart inventories 2020-03-10 22:00:31 -04:00
Jeff Bradberry
d849e81891 Show API choice field metadata more correctly for null vs '' 2020-03-05 17:10:59 -05:00
softwarefactory-project-zuul[bot]
73b33e1435
Merge pull request #6116 from AlanCoding/early_error
Fail on launch for scenario where job cannot run

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-03-04 15:19:22 +00:00
Ryan Petrello
6207dad226
fix broken grafana notifications
since the custom notification template refactor, grafana notification
support has been broken; this is largely because grafana functions more
like the webhooks, and needs to send JSON in its notification body

see: https://github.com/ansible/awx/issues/6137
2020-03-03 12:44:28 -05:00
AlanCoding
07807c2dec
Fail on launch for scenario where job cannot run 2020-03-02 13:14:03 -05:00
Alan Rominger
768280c9ba [last PR stuff] + Add warning if configs specified in 2 params (#5)
* Lean on API validation for tower_inventory_source arg errors

used for
 - validating needed credential is given
 - missing source_project for scm sources

* Add warning when config is specified in 2 places

Fix up unit tests, address multiple comments re: backwards compatibility, redundant methods, etc.

Update new_name and variables parameters, update unit tests
2020-02-26 09:26:55 -05:00
Jeff Bradberry
d0bec97bbb Adjust the logic that renders fields with choices on an API Options call
accounting for the case where blank or null is allowed.

Refs #5099
2020-02-24 10:17:38 -05:00
Ryan Petrello
487343a022
include credential type details in the webhook credential summary field
see: https://github.com/ansible/awx/issues/5882
2020-02-11 10:51:07 -05:00
AlanCoding
519956f779
Remove argument no longer accepted by computed fields task 2020-02-11 08:55:56 -05:00
Nikhil Jain
e530adde67
fix the sliced job relaunch 2020-02-10 17:35:50 -05:00
Bill Nottingham
71ef7cdec1 Use AWX_TASK_ENV when connecting to Red Hat services 2020-02-07 14:29:42 -05:00
Rebeccah
f7f648b956 included all_parents_must_converge in the get_workflow_job_fieldnames so that the true/false is copied into the job node and not just in the template node. Also added in the migration for the DB, also relocated logic from bfs_nodes_to_run down into mark_dnr_nodes to prevent nodes not being marked as DNR but not being marked to run, causing them to run anyways 2020-02-05 14:28:34 -05:00
Ryan Petrello
c7c899375b
when a license is installed, only set TOWER_URL_BASE if necessary
it's possible for users to set this manually in /etc/tower/conf.d
prior to license application
2020-01-30 16:23:25 -05:00
Ryan Petrello
256404ba03
fix a bug that causes __search filters to not properly call .distinct() 2020-01-23 13:40:22 -05:00
Ryan Petrello
dfc769b8fe
drastically speed up /api/v2/jobs/N/job_events/ with large counts 2020-01-20 13:24:39 -05:00
softwarefactory-project-zuul[bot]
03cfb7bf9a
Merge pull request #5669 from AlanCoding/no_parent_or_host
Remove two unused parent relationships from JobEvent model

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2020-01-20 16:58:46 +00:00
AlanCoding
b0722311e8
dDo not apply distinct for series of only static fields 2020-01-16 14:36:38 -05:00
AlanCoding
9a420820eb
Remove event hosts relationship
and parent event-event ForeignKey relationship
2020-01-16 08:44:36 -05:00
Ryan Petrello
568606d2c8
remove computed inventory fields from Host and Group 2020-01-14 16:37:16 -05:00
Jake Jackson
d72896f9a6
Added canceled_on field to unified_jobs model
- When a job is canceled, the canceled_on field will populate with date/time
2020-01-14 15:56:30 -05:00
Ryan Petrello
306f504fb7
optimize the callback receiver to buffer writes on high throughput
additionaly, optimize away several per-event host lookups and
changed/failed propagation lookups

we've always performed these (fairly expensive) queries *on every event
save* - if you're processing tens of thousands of events in short
bursts, this is way too slow

this commit also introduces a new command for profiling the insertion
rate of events, `awx-manage callback_stats`

see: https://github.com/ansible/awx/issues/5514
2020-01-14 12:04:26 -05:00
Bill Nottingham
3ba1ba1c9d Fix survey validation to always retun an error code if erroring 2019-12-20 11:38:22 -05:00
Jake McDermott
23914182c4
Add credential_type summarizable fk field 2019-12-18 18:31:24 -05:00
Graham Mainwaring
3c0fd37a4d Set a default value for LOGIN_REDIRECT_URL 2019-12-17 14:39:35 -05:00
Graham Mainwaring
9c9496a683 Expose login redirect URL in unauthenticated /api view 2019-12-11 17:21:02 -05:00
Graham Mainwaring
a8d34b46fb Add setting for configurable login redirect URL 2019-12-11 17:21:02 -05:00
Jake McDermott
63fd546f44
Let cred admins and users test credential plugins 2019-12-03 13:36:18 -05:00
softwarefactory-project-zuul[bot]
3b49dd78bf
Merge pull request #5392 from ryanpetrello/fix-system-jobs
fix a few bugs with the session and oauth2 cleanup scheduled jobs

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2019-11-27 17:25:56 +00:00
softwarefactory-project-zuul[bot]
8612bf79e8
Merge pull request #5295 from rooftopcellist/analytics_user_agent
Add User-Agent to analytics upload POST

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
2019-11-26 20:04:17 +00:00
Ryan Petrello
632810f3a8
fix a few bugs with the session and oauth2 cleanup scheduled jobs
see: https://github.com/ansible/tower/issues/3940
2019-11-26 13:17:46 -05:00
Christian Adams
4f8b624b96 Make spelling of canceled consistent 2019-11-26 00:31:15 -05:00
Christian Adams
05e6f4ab3c Add User-Agent to analytics upload POST 2019-11-25 22:22:05 -05:00
AlanCoding
1c74773eac
Delay inputs comparision to after field validation 2019-11-14 20:28:33 -05:00
AlanCoding
f64d0dde5a
Use tags to reduce project update output
Handle folder deletion as tag

remove -v use by default

Change meaning of roles_enabled playbook var to
 value of AWX global setting
2019-11-12 12:52:39 -05:00
Ryan Petrello
0dcf6a2b1f
Merge pull request #5156 from ryanpetrello/cli-launch-args
properly parse CLI arguments for launch endpoints
2019-10-30 14:52:32 -04:00
Ryan Petrello
c882cda586
properly parse CLI arguments for launch endpoints
see: https://github.com/ansible/awx/issues/5093
2019-10-30 13:49:37 -04:00
AlanCoding
cf168b27d2
apply username ordering to more views 2019-10-29 14:20:33 -04:00
Ryan Petrello
171f0d6340
Merge branch 'downstream' into devel 2019-10-29 13:02:17 -04:00
Jeff Bradberry
aff31ac02f
Add the no_truncate parameter to the job and adhoc event sublist views
which are the ones that the CLI actually uses.
2019-10-29 11:24:17 -04:00
Ryan Petrello
52336c0fe8
fix a syntax error
whoopsie
2019-10-29 11:24:15 -04:00
Rebeccah
220354241b
added in check to see if the the current check has an instance or not to prevent nonetype errors 2019-10-29 11:24:15 -04:00