32325 Commits

Author SHA1 Message Date
Jeff Bradberry
24bfacb654 Check state when processing receptorctl advertisements
Nodes that show up and were in one of the unready states need to be
transitioned to ready, even if the logic in Instance.is_lost was not
met.
2022-09-23 09:46:11 -04:00
Jeff Bradberry
3bcd539b3d Make sure that the health checks handle the state transitions properly
- nodes with states Provisioning, Provisioning Fail, Deprovisioning,
  and Deprovisioning Fail should bypass health checks and should never
  transition due to the existing machinery
- nodes with states Unavailable and Installed can transition to Ready
  if they check out as healthy
- nodes in the Ready state should transition to Unavailable if they
  fail a check
2022-09-23 09:46:11 -04:00
Jeff Bradberry
81e68cb9bf Update node and link registration to put them in the right state
'Installed' for the nodes, 'Established' for the links.
2022-09-23 09:46:11 -04:00
Jeff Bradberry
a575f17db5 Add the state fields and the peer relationships to the serializers 2022-09-23 09:46:11 -04:00
Jeff Bradberry
2fba3db48f Add state fields to Instance and InstanceLink
Also, listener_port to Instance.
2022-09-23 09:46:11 -04:00
Alan Rominger
ff6fb32297
Merge pull request #12875 from ansible/feature-prompt-on-launch-on-templates
Feature prompt on launch on templates
2022-09-23 09:16:02 -04:00
Oleksii Baranov
4c64fb3323
Ensure schedule collection test has enough hosts for slices 2022-09-22 16:08:23 -04:00
John Westcott IV
1cfbc02d98
Collection test fixes from prompting changes
DNE can sometimes be dne depending on versions, fixing test to find either

Adding additional node to Demo Inventory for job slice counting
2022-09-22 16:08:23 -04:00
Alan Rominger
e231e08869
Fix bug with missing parent field and diff with parent
Remove corresponding views for job instance_groups

Validate job_slice_count in API

Remove defaults from some job launch view prompts
  the null default is preferable
2022-09-22 16:08:23 -04:00
mabashian
e069150fbf
Removes fetching of default instance groups in the UI on launch and schedule/node creation 2022-09-22 16:08:23 -04:00
Alan Rominger
61093b2532
Treat instance_groups prompt as template-less 2022-09-22 16:08:22 -04:00
mabashian
23f4f7bb00
Remove duplicate Limit detail on schedule
Bumps migration number from 0168 to 0169

Make labels and IGs requests synchronously when getting launch data

Moves label creation out to a util
2022-09-22 16:08:22 -04:00
Alan Rominger
816e491d17
Fix another bug applying extra_vars to incompatible job types 2022-09-22 16:08:22 -04:00
John Westcott IV
dca27b59c9
Fixing is_detached methods' filters 2022-09-22 16:08:22 -04:00
Sarabraj Singh
7de5f77262
adding test coverage to ensure that FIELDS_TO_PRESERVE_AT_COPY is behaving as expected for WFJTs 2022-09-22 16:08:22 -04:00
John Westcott IV
86e7151508
Get more specific as to which timeout caused the issue 2022-09-22 16:08:21 -04:00
John Westcott IV
75597cf29c
Altering --timeout from awxkit to --action-timeout to remove conflict with new launch timeout 2022-09-22 16:08:21 -04:00
Oleksii Baranov
d07177be9c
Add additional schedule fields for new prompts 2022-09-22 16:08:21 -04:00
Alan Rominger
b38e08174a
Write logic to combing workflow labels, IGs with nodes
Additionally, move the inventory-specific hacks of yesteryear
  into the prompts_dict method of the WorkflowJob model
  try to make it clear exactly what this is hacking and why

Correctly summarize label prompts, and add missing EE

Expand unit tests to apply more fields

adding missing fields to preserve during copy to workflow.py

Fix bug where empty workflow job vars blanked node vars (#12904)

* Fix bug where empty workflow job vars blanked node vars

* Fix bug where workflow job has no extra_vars, add test

* Add empty workflow job extra vars to assure fix
2022-09-22 16:08:07 -04:00
John Westcott IV
b501b30db4
Changing label functions to account for new relationships
Removing unreferenced get_orphaned_labels

Forcing forks and job_slice_count to be >=0
2022-09-22 16:08:06 -04:00
Alan Rominger
64dad61b29
Add support for instance_groups and labels on schedule create 2022-09-22 16:08:06 -04:00
Sarabraj Singh
2369dc9621
adding fix for labels pushdown on workflow job nodes 2022-09-22 16:08:06 -04:00
Alan Rominger
ef90adb67e
Complete consolidation of the label views 2022-09-22 16:08:06 -04:00
John Westcott IV
a528a78e0e
Fixing serializers per review
Removing try/except around instance_groups

Removing redefined execution_environment

Reordering labels/creds/igs/ee/etc

Removing special treatment for EEs when doing setattrs

Adding help_text to execution environments

Adding EE serializer on JobCreateScheduleSerializer
2022-09-22 16:07:53 -04:00
Oleksii Baranov
ffe970aee5
Added instance_groups method to the awxkit models
Also added additional payload fields to the wfjt model.
2022-09-22 15:58:16 -04:00
Oleksii Baranov
4579ab0d60
Add new add_label method to the wfjt node and schedules awxkit models 2022-09-22 15:58:16 -04:00
John Westcott IV
efeeeefd4c
Removing labels and instance_groups from the job serializer page as top level items (still in summary fields) 2022-09-22 15:58:16 -04:00
John Westcott IV
c1b20a8ba7
Removing non-functional lines 2022-09-22 15:58:15 -04:00
mabashian
2a30a9b10f
Add more ui unit test coverage for prompt changes
Flips default job/skip tags value from empty string to null on WF form
2022-09-22 15:58:15 -04:00
Alan Rominger
34e8087aee
DRY edits to access classes for new prompts
Remove if-not-data conditional from WFJTnode.can_change
  these are cannonical for can_add, but this looks like a bug

Change JTaccess.can_unattach to call same method in super()
  previously called can_attach, which is problematic

Better consolidate launch config m2m related checks

Test and fix pre-existing WFJT node RBAC bug

recognize not-provided instance group list on launch, avoiding bug where it fell back to default

fix bug where timeout field was saved on WFJT nodes after creating approval node

remove labels from schedule serializer summary_fields

remove unnecessary prefetch of credentials from WFJT node queryset
2022-09-22 15:58:15 -04:00
mabashian
ead56bfa1b
Adds elements and identifiers for cypress tests
Properly display instance groups and labels on node details view
2022-09-22 15:58:15 -04:00
John Westcott IV
d63c940e2f
Changing migration sfrom 0167 to 0168
Fixing linting error
2022-09-22 15:58:12 -04:00
mabashian
e05eaeccab
Fixes for various prompt related ui issues
Fixes bug where Forks showed up in both default values and prompted values in launch summary

Fixes prompting IGs with defaults on launch

Make job tags and skip tags full width on workflow form

Fixes bug where we attempted to fetch instance groups for workflows

Fetch default instance groups from jt/schedule for schedule form prompt

Grab default IGs when adding a node that prompts for them

Adds support for saving labels on a new wf node

Fix linting errors

Fixes for various prompt on launch related issues

Adds support for saving instance groups on a new node

Adds support for saving instance groups when editing an existing node

Fix workflowReducer test

Updates useSelected to handle a non-empty starting state

Fixes visualizerNode tests

Fix visualizer test

Second batch of prompt related ui issues:

Fixes bug saving existing node when instance groups is not promptable

Fixes bug removing newly added label

Adds onError function to label prompt

Fixes tooltips on the other prompts step

Properly fetch all labels to show on schedule details
2022-09-22 15:55:02 -04:00
John Westcott IV
e076f1ee2a
Making labels additive and not adding a many item to config if already in parent 2022-09-22 15:39:49 -04:00
Alan Rominger
68e11d2b81
Add WorkflowJob.instance_groups and distinguish from char_prompts
This removes a loop that ran on import
  the loop was giving the wrong behavior
  and it initialized too many fields as char_prompts fields

With this, we will now enumerate the char_prompts type fields manually
2022-09-22 15:39:49 -04:00
mabashian
697193d3d6
Extends LabelSelect to have a custom chip render. This allows us to disable labels that cannot be removed on job launch 2022-09-22 15:39:49 -04:00
John Westcott IV
4f5596eb0c
Adding unit/functional tests, fixing tests
Making common class for LabelList

Fixing related field name

Fixing get_effective_slice_ct to look for corerct field and also override _eager_field
2022-09-22 15:39:16 -04:00
mabashian
42a7866da9
Cleanup UI linting, tests, and import
Cleans up UI linting errors

Fix broken UI unit tests

Adds missing LabelsMixin import
2022-09-22 15:37:31 -04:00
John Westcott IV
809df74050
Adding EE/IG/labels/forks/timeout/job_slice_count to schedules
Modifying schedules to work with related fields

Updating awx.awx.workflow_job_template_node
2022-09-22 15:35:27 -04:00
Oleksii Baranov
2e217ed466
Add awxkit optional fields for new prompts
Added additional fields for the awskit to support prompts:
 * ee
 * labels
 * forks
 * timeout
 * ig
 * job_slices
2022-09-22 15:23:57 -04:00
mabashian
d5d24e421b
Leverage the IG mixin on the schedules model
Move associate/disassociate label methods into mixin

Move label/IG saving out to related endpoints off of a schedule
2022-09-22 15:23:12 -04:00
Sarabraj Singh
663ef2cc64
adding prompt-to-launch field on Labels field in Workflow Templates; with necessary UI and testing changes
Co-authored-by: Keith Grant <keithjgrant@gmail.com>
2022-09-22 15:18:47 -04:00
mabashian
4e665ca77f
Change ask_job_slicing_on_launch to ask_job_slice_count_on_launch to match api
Adds support for prompting labels on launch in the UI

Fix execution environment prompting in UI

Round out support for prompting all the things on JT launch

Adds timeout to job details

Adds fetchAllLabels to JT/WFJT data models

Moves labels methods out to a mixin so they can be shared across JTs/WFJTs/Schedules

Fixes bug where ee was not being sent on launch

Adds the ability to prompt for ee's, ig's, labels, timeout and job slicing to schedules

Fixes bug where saving schedule form without opening the prompt would throw errors

Adds support for IGs and labels to workflow node prompting

Adds support for label prompting to node modal

Fix job template form tests
2022-09-22 15:18:23 -04:00
John Westcott IV
33c0fb79d6
JT param everything (#12646)
* Making almost all fields promptable on job templates and config models
* Adding EE, IG and label access checks
* Changing jobs preferred instance group function to handle the new IG cache field
* Adding new ask fields to job template modules
* Address unit/functional tests
* Adding migration file
2022-09-22 15:16:12 -04:00
mabashian
04d0e3915c
Refactors EE Lookup to support prompting. Adds prompting for EE to JT form
Adds prompt on launch buttons to labels, forks, job slicing, timeout, and instance groups

Adds prompting for labels on workflow job template

Updates flags that denote when prompting is necessary in various places

Adds prompting support for timeout, job slicing, forks, labels, instance groups and execution environments to the prompt details

Show prompted ee, forks, job slice and labels on schedule details

Adds support for ee, labels, forks, job slicing and timeout prompting to the node view modal

Add default values when prompting for ee's, forks, job slicing and timeout

Adds launch prompt step for execution environments

Adds fields for timeout, job slicing and forks to other prompts step of launch
2022-09-22 15:16:08 -04:00
Alex Corey
a27680f7e9
Merge pull request #12727 from akira6592/improve-badge
Improves visibility of workflow approval notification bell
2022-09-22 10:13:13 -04:00
Alex Corey
4072b2786a
Merge pull request #12935 from AlexSCorey/fixDependabotWorflow
Fixes workflow that updates dependabot prs
2022-09-22 09:35:31 -04:00
Alex Corey
948d300f43 Fixes workflow that update dependabot prs 2022-09-21 12:47:35 -04:00
Rick Elrod
1b9326888e
[proj signing] Fix error message, rename action (#12926)
- Fix out of scope variable in error message in the action plugin
- Rename action plugin from playbook_integrity to verify_project

Refs #12887 which pointed out the out of scope variable

Signed-off-by: Rick Elrod <rick@elrod.me>
2022-09-20 14:25:40 -05:00
Jessica Steurer
d67aef9d8e
Merge pull request #12885 from john-westcott-iv/remove_extra_plugin_routing
Remove extra redirects from the runtime.yml
2022-09-19 16:58:12 -03:00