30179 Commits

Author SHA1 Message Date
Jim Ladd
1af1a5e9da Convert job_created to string for serialization 2021-06-04 09:17:06 -07:00
Jim Ladd
c0d38e91f5 When saving JobEvents, include job_created
* this is the partition key
* .. used to determine which partition job event rows are sent to
2021-06-04 09:17:06 -07:00
Jim Ladd
2f737f644f Drop primary key index before creating partition table
* Partition tables require unique contstraints to include the
  partition key (uniqueness can only be enforced _inside_
  of a given partition table)
2021-06-04 09:17:06 -07:00
Jim Ladd
0574baf7f7 Create fake partition
* Just to get things working
* Will implement dynamic creation of partitions later
2021-06-04 09:17:06 -07:00
Jim Ladd
f70473dc0b When copying main_jobevent, include all table metadata
* copy the table just like we do in the bigint migration
* without this we lose sequences and very likely other things
  as well
* we want the new table to be identical to the old table,
  so 'including all' makes sense
2021-06-04 09:17:06 -07:00
Jim Ladd
de0b25862b By default, save job_created as null in db
* Want to avoid saving date as empty string
* Should default to null so that it's obvious the field is empty
2021-06-04 09:17:06 -07:00
Jim Ladd
6ff15a928a Register new column created by SQL
* .. using FakeAddField model type
* .. without doing this, Django won't know
     about the field we created using raw SQL
2021-06-04 09:17:06 -07:00
Jim Ladd
d10d1963c1 Rename / remove old main_jobevent table 2021-06-04 09:17:06 -07:00
Jim Ladd
c6acca08d5 first draft of db partitioning 2021-06-04 09:17:06 -07:00
Chris Meyers
9946959599 clarify reference to code to be pasted 2021-06-04 12:10:10 -04:00
Chris Meyers
9ce171d349
Merge pull request #8 from beeankha/doc_edits
Doc Edits
2021-06-04 11:12:47 -04:00
softwarefactory-project-zuul[bot]
12f2975809
Merge pull request #10358 from jakemcdermott/fix-credlink
Make IG credential linkable

SUMMARY
Make the instance group credential detail link to the cred

Reviewed-by: Kersom <None>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-06-04 15:12:03 +00:00
softwarefactory-project-zuul[bot]
945125454b
Merge pull request #10357 from jakemcdermott/fix-inventory-host-search-config
Add search config for inventory hosts

SUMMARY
Adds search config for inventory hosts.
(includes default icontains, etc.)

Reviewed-by: Kersom <None>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-06-04 15:05:25 +00:00
softwarefactory-project-zuul[bot]
ea67c70437
Merge pull request #10257 from mabashian/6073-typeahead-lookup
Adds support for typing values into single select lookups

SUMMARY
link #6073
This adds support for typing values into single select lookups.  Multi-select lookups (credentials on the JT form, instance groups, etc) will remain unchanged.
An input is now rendered next to the lookup button which will allow users to type a value in.
Here's the button (which opens the modal):

Here's the input (which lets users type a value in):

There's a debounce on the input so that we only make a request to check to see if the name is valid after a second of no typing.
The tricky part of this implementation was handling validation on the lookup fields.  If a user types in a string that does not exactly match a value that they can use then we want to show an error indicating that no matching value was found:

but this was tricky because some of these fields are required so the validation functions would need to change a bit.
Since the typed text and the actual underlying value of the lookup are different the validation function would need to have access to both values whenever it runs for this to work.  This meant either storing the typed text up at the form level or pushing the validation down into the lookup(s).  After talking with @keithjgrant we decided to go down the route of pushing the validation down to the lookups.
You can now pass an optional validation function down to the various lookups that will get combined with the typeahead validation via the useField hook.
Here's the whole thing in action:

ISSUE TYPE

Feature Pull Request

COMPONENT NAME

UI

Reviewed-by: Kersom <None>
Reviewed-by: Keith Grant <keithjgrant@gmail.com>
Reviewed-by: Michael Abashian <None>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-06-04 15:03:53 +00:00
beeankha
f2f2483708 Doc edits 2021-06-04 11:01:06 -04:00
Alex Corey
8c61a49e01 prevents dashboard counts from reloading with line chart filters change 2021-06-04 10:55:40 -04:00
Jake McDermott
88ff68295b
Make IG credential linkable 2021-06-04 10:27:14 -04:00
Jake McDermott
d93f62c030
Add search config for inventory hosts 2021-06-04 09:51:43 -04:00
Chris Meyers
ae5b11a2a9 add docs on debugging job event perf 2021-06-04 09:12:23 -04:00
Rebeccah
baade775ab
remove changes to root.py to keep the custom virtualenvs listed in api/config 2021-06-04 09:11:23 -04:00
Rebeccah
bd2da80cea
restructure so the -q is actually completely quiet 2021-06-04 09:11:22 -04:00
Rebeccah
550ab82f63
add the conditionals for incorrect paths and helpful info for if a user does that
and remove unused import
2021-06-04 09:11:22 -04:00
Rebeccah
cece7ff741
add a -q flag to make scripting easier and general improvements for readability 2021-06-04 09:11:22 -04:00
Rebeccah
c0b812c47a
split unified job templates out into jts and projects because workflows
don't have custom virtualenvs & rename file so the command is shorter

update copypasta and add sanity check
2021-06-04 09:11:22 -04:00
Rebeccah
b256e5b79d
adding in a 3rd command that shows the associated templates, orgs, and invs the venv is tied to 2021-06-04 09:11:22 -04:00
Rebeccah
2ed3038a5c
fixed what would be a rather embarrassing misspeeeling 2021-06-04 09:11:21 -04:00
Rebeccah
779ca8b260
split the one command into two for clarity and remove unused imports 2021-06-04 09:11:21 -04:00
Shane McDonald
137fedfc9b
Rename custom venv export command and add usability tweaks
- Uses a positional argument instead of a named arg
- More helpful output
2021-06-04 09:11:21 -04:00
Shane McDonald
256a47618f
Ignore awx venv
- General usability / readibility improvements
2021-06-04 09:11:20 -04:00
Rebeccah
dfaa69be51
add an awx-manage command that gets pip freeze data from custom_venvs and outputs to command line stdout
remove analytics tests for counts of custom venvs, bump collector version, and remove list of custom venvs from API
2021-06-04 09:11:16 -04:00
softwarefactory-project-zuul[bot]
c34fa30ea7
Merge pull request #10342 from mabashian/10338-checkbox-double-select
Fixes bug where checkbox list item was selecting things twice

SUMMARY
Resolves #10338
There was a click event on the row and the underlying checkbox.  I got rid of the underlying click event so now its only handled at the row level.

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

UI

Reviewed-by: Alex Corey <Alex.swansboro@gmail.com>
Reviewed-by: Tiago Góes <tiago.goes2009@gmail.com>
2021-06-03 21:37:05 +00:00
softwarefactory-project-zuul[bot]
3e5ee9d57a
Merge pull request #10322 from jbradberry/show-ee-resolver
Expose the EE resolver to the API

SUMMARY
This change exposes the output of .resolve_execution_environment() for job templates as a new summary field in the API.  Note that this is only exposed for the detail views, not the list views.  Also, there is the caveat for job templates that may be run under workflows that the workflow EE might override the results of this value.
related #10210
ISSUE TYPE

Feature Pull Request

COMPONENT NAME


API

AWX VERSION

Reviewed-by: Shane McDonald <me@shanemcd.com>
Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
Reviewed-by: Chris Meyers <None>
Reviewed-by: Jeff Bradberry <None>
2021-06-03 21:11:33 +00:00
softwarefactory-project-zuul[bot]
c7dd3996df
Merge pull request #10351 from AlanCoding/sliced_ee
Skip sliced jobs from the workflow EE logic

Addressing some unanticipated fallout from #10305
Sliced jobs rely on creating a workflow job, but they do not have a workflow_job_template, so in those cases, that was causing a traceback.
2021-06-03 20:10:52,319 ERROR    [a17ebd7f] awx.main.dispatch Worker failed to run task awx.main.tasks.RunJob(*[341], **{}
Traceback (most recent call last):
  File "/awx_devel/awx/main/dispatch/worker/task.py", line 90, in perform_work
    result = self.run_callable(body)
  File "/awx_devel/awx/main/dispatch/worker/task.py", line 65, in run_callable
    return _call(*args, **kwargs)
  File "/awx_devel/awx/main/tasks.py", line 759, in _wrapped
    return f(self, *args, **kwargs)
  File "/awx_devel/awx/main/tasks.py", line 1264, in run
    self.instance = self.update_model(self.instance.pk, execution_environment=self.instance.resolve_execution_environment())
  File "/awx_devel/awx/main/models/mixins.py", line 477, in resolve_execution_environment
    if wf_template.execution_environment is not None:
AttributeError: 'NoneType' object has no attribute 'execution_environment'

that is fixed with this, at least for my one simple test case
This left jobs hanging out in "waiting" status, which is really not good.

Reviewed-by: Jeff Bradberry <None>
2021-06-03 21:02:01 +00:00
softwarefactory-project-zuul[bot]
e342919735
Merge pull request #10323 from wenottingham/look-over-there
Add additional controller directory for collections for inventory update

SUMMARY
This may be present in some scenarios with additional collections for inventory usage.

Reviewed-by: Alan Rominger <arominge@redhat.com>
2021-06-03 20:42:04 +00:00
Jeff Bradberry
d0991bab9e Expose the EE resolver to the job template detail API endpoints 2021-06-03 16:35:50 -04:00
Alan Rominger
efcbea1fc5
Skip sliced jobs from the workflow EE logic 2021-06-03 16:20:47 -04:00
Alex Corey
1537b84ec8 adds more filters to dashboard chart 2021-06-03 15:31:43 -04:00
softwarefactory-project-zuul[bot]
30b7535ca2
Merge pull request #10348 from rooftopcellist/container_groups_error
Fix error msg wording and sdb docs

SUMMARY

Fixes wording in container groups error message
Updates ports for sdb debugging docs

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME


API

Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-06-03 19:02:34 +00:00
Christian M. Adams
fe02c0b157
Fix error msg wording and sdb docs 2021-06-03 14:24:18 -04:00
mabashian
177901eca6 Adds assertion to ensure that only one chip is shown when a checkbox list item is selected 2021-06-03 14:01:04 -04:00
mabashian
c2c93e7a66 Fix unit test failures 2021-06-03 13:50:26 -04:00
Bill Nottingham
00e60d2698 Add additional controller directory for collections for inventory update 2021-06-03 13:26:23 -04:00
Jake McDermott
ec1408fbd1
Disable cancel button on http 405
When a 405 is received, it means the job is already cancelled. Treat the
request as a success and don't show an error modal.

We disable the button to handle a rare scenario where we receive the 405 long before
the job status is properly updated to "cancelled" over websockets. We want to prevent
more cancel requests when this happens. We're disabling instead of hiding the button
because, assuming the status hasn't changed over sockets, the buttons that usually
replace the cancel button on the toolbar won't be shown yet and we don't want to
needlessly flicker and shift button positions around by rapidly loading and unloading
a different number of buttons onto the bar.
2021-06-03 13:02:03 -04:00
softwarefactory-project-zuul[bot]
23c3e62211
Merge pull request #10345 from sarabrajsingh/bugfix/bump-ansible-runner-version
updated ansible-runner version from 2.0.0a2 -> 2.0.0a4 in requirement…

SUMMARY
version bump (ansible-runner 2.0.0a2 -> 2.0.0a4)
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

API

AWX VERSION

awx: 19.2.0

Reviewed-by: Shane McDonald <me@shanemcd.com>
2021-06-03 16:49:38 +00:00
Sarabraj Singh
383c2bba58
updated ansible-runner version from 2.0.0a2 -> 2.0.0a4 in requirements files 2021-06-03 11:53:57 -04:00
softwarefactory-project-zuul[bot]
8adb53b5a8
Merge pull request #10292 from mabashian/8824-role-modal
Fixes bug where user/team role add modal state is not cleared on close

SUMMARY
link #8824
I modeled these changes after the pattern that existed between ResourceAccessList and AddResourceRole.  The key to fixing this bug is that the component that renders the wizard needs to be unmounted when the wizard closes so that the state, etc get cleared out before the next time the wizard is opened.  In order to achieve that I needed to decouple the add button from the wizard.
The sort of weird part of this pattern (and this exists in the ResourceAccessList as well) is error handling.  We pass the error back and set that to state before rendering the modal which isn't quite as clean as having the request made out at the list level and leveraging our hooks for error handling but I decided to just get in and get out and not worry about trying to refactor too much.
Here it is in action:

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

UI

Reviewed-by: Kersom <None>
2021-06-03 15:52:40 +00:00
softwarefactory-project-zuul[bot]
92401e5328
Merge pull request #10301 from kdelee/unqualified_images
Force fully qualified image names

If we try and pull an unqualified image name, jobs hang on a podman
prompt.
I set the permissions as 644 because thats what worked for me because rootless podman needs to be able to read the file, but maybe there is another way to achieve that

Reviewed-by: Christian Adams <rooftopcellist@gmail.com>
2021-06-03 15:45:24 +00:00
softwarefactory-project-zuul[bot]
d360fb212e
Merge pull request #10258 from kdelee/ee_singular_awx_cli
allow singular execution_environment for cli

this makes "execution_environments" or "execution_environment" work
which is helpful
Now these both work:
awx execution_environments create --name foobar --image quay.io/ansible/awx-ee:latest

awx execution_environment create --name foobar1 --image quay.io/ansible/awx-ee:latest

Reviewed-by: Bianca Henderson <beeankha@gmail.com>
Reviewed-by: Jeff Bradberry <None>
2021-06-03 14:11:27 +00:00
mabashian
4c1b0297e7 Fixes bug where checkbox list item was selecting things twice 2021-06-03 09:48:20 -04:00
softwarefactory-project-zuul[bot]
a0b14b994d
Merge pull request #8763 from wenottingham/licenses-to-kill
Restore UI license checker

27219d3 removed the license checker for UI dependencies as part of removing the UI. We actually still need it, just pointed at the new UI.
This brings it back, and updates it to do so. It also removes no longer needed license files.
It doesn't pass yet, as I haven't added licenses for the new UI dependencies in this PR. Hi @jakemcdermott.

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
2021-06-02 23:48:52 +00:00