30353 Commits

Author SHA1 Message Date
Jim Ladd
f9b439ae82 include job_created field in all job event types 2021-06-04 09:17:07 -07:00
Jim Ladd
80b08d17e3 Continue updating job event views 2021-06-04 09:17:07 -07:00
Jim Ladd
f642c520bd Update fields for job event models to match raw sql operations
* raw sql commands were in migration to partition table
* .. just needed to add FakeAddField entries for the new
     job_created field added to each job event model
* .. and also needed to actually list the new field on the model classes
2021-06-04 09:17:07 -07:00
Jim Ladd
221ddeb915 Fix migration for _all_ job event tables
- each job event table has a different name for the
  fk referencing the unified job id
- create a mapping so that we get the col name correct
  for each table
2021-06-04 09:17:07 -07:00
Jim Ladd
d90d0fb503 fix initial partition creation
* call create_partition correctly (include tblname)
* reference 'awx_epoch'
2021-06-04 09:17:07 -07:00
Jim Ladd
2c529f50af Update querysets for remaining job event views
- search should use job creation date
  so that only the table partition with the relevant job events
  is searched
2021-06-04 09:17:07 -07:00
Jim Ladd
acfa1c4d1d Drop todo / question / conditional
* can safely assume job_created is set
* .. and if it isn't, we want to expose that bug
2021-06-04 09:17:07 -07:00
Jim Ladd
ea2afeec1f Drop todo / answered question 2021-06-04 09:17:07 -07:00
Jim Ladd
a5cfc3036f create_partition needs tblname 2021-06-04 09:17:07 -07:00
Jim Ladd
ec484f81cf Partition *all* job event tables 2021-06-04 09:17:06 -07:00
Jim Ladd
2ffa22e38f Misc doc clean-up 2021-06-04 09:17:06 -07:00
Jim Ladd
8fb313638c get job events based on job creation date 2021-06-04 09:17:06 -07:00
Jim Ladd
0eb1984b22 Only create partitions for regular jobs 2021-06-04 09:17:06 -07:00
Jim Ladd
f259b0a71b Move partition start date to 2000 2021-06-04 09:17:06 -07:00
Jim Ladd
82df3ebddb add option to create partitions that span a single minute
* turned on by default currently for testing
2021-06-04 09:17:06 -07:00
Jim Ladd
c87d7b0d79 fix import 2021-06-04 09:17:06 -07:00
Jim Ladd
612e91263c auto-create partition 2021-06-04 09:17:06 -07:00
Jim Ladd
445042c0f4 Create partition only if it doesn't exist 2021-06-04 09:17:06 -07:00
Jim Ladd
0c289205de Give new primary key constraint unique name, create first live partition 2021-06-04 09:17:06 -07:00
Jim Ladd
ba45592d93 create helper method to create partitions
* create_partition()
2021-06-04 09:17:06 -07:00
Jim Ladd
7e0f2b0f08 first partition is _not_ a special case after all 2021-06-04 09:17:06 -07:00
Jim Ladd
fb30528197 Dynamically create initial partitions
* First partition holds all events up to this very moment
* And second partition starts where first left off and runs
  .. through rest of current hour
* From there, dynamically generated partitions will cover
  one hour at a time
2021-06-04 09:17:06 -07:00
Jim Ladd
48f1910075 Remove temporary catch-all partition 2021-06-04 09:17:06 -07:00
Jim Ladd
0cb2d79889 Only save job_created field on JobEvent for the time being
* Once other job event tables are migrated, remove this
2021-06-04 09:17:06 -07:00
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