Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ansible-runner change to get periodic keep-alive messages in K8S #13608

Merged
merged 4 commits into from
Mar 6, 2023

Conversation

AlanCoding
Copy link
Member

@AlanCoding AlanCoding commented Feb 21, 2023

SUMMARY

This is a candidate patch for consuming ansible/ansible-runner#1191, which adds keepalive messages.

FYI for @nitzmahone, I hope we are narrowing in on this implementation. This will require keeping and supporting the environment variable. There are no plans to use the CLI flag. I also maintain a weak preference to have the event callback pass on the keep-alive events.

ISSUE TYPE
  • New or Enhanced Feature
COMPONENT NAME
  • API

@AlanCoding
Copy link
Member Author

I tested building the UI, and then I was able to edit and save the value of the setting. Without UI changes I was able to see the setting, but not able to edit it. I know some changes here are just test file changes.

@mabashian
Copy link
Member

UI changes lgtm

awx/main/conf.py Outdated Show resolved Hide resolved
@cypress
Copy link

cypress bot commented Feb 27, 2023

27 failed and 1 flaky tests on run #14591 ↗︎

27 678 610 0 Flakiness 1

Details:

Update keepalive setting help_text to be more direct
Project: AWX - Functional Commit: dc72d99124
Status: Failed Duration: 27:28 💡
Started: Feb 27, 2023 11:34 AM Ended: Feb 27, 2023 1:02 PM
Failed  job-templates/job-template-crud.cy.js • 8 failed tests

View Output Video

Test
Job Templates- Create > can create a job template but not if a JT with the same name already exists Screenshot
Job Templates- Create > can create a job template from inventory job template tab and see the template appear in that list Screenshot
Job Templates- Create > can create a job template from project job template tab and see the template appear in that list Screenshot
Job Templates- Create > can create a job template from credential job template tab and see the template appear in that list Screenshot
Job Templates- Create > can create a JT will all optional fields Screenshot
Job Templates- Run > JT can be associated and executed with an EE globally available Screenshot
Job Templates- Run > JT can be executed with a specific EE coming from the project Screenshot
Job Templates- Run > JT can be executed with a specific EE coming from the organization Screenshot
Failed  jobs/job-list.cy.js • 6 failed tests

View Output Video

Test
Jobs List > cancel button is disabled if one or more completed jobs are selected Screenshot
Jobs List > can cancel a single running job Screenshot
Jobs List- Failed > Can relaunch a job against a failed host Screenshot
Filter Operations- Jobs > can search by status New, Pending, Waiting, Running, Successful, Failed, Error, or Canceled Screenshot
Filter Operations- Jobs > can search by multiple status filters at once Screenshot
Filter Operations- Jobs > can search by multiple filters from both job type and status at the same time Screenshot
Failed  hosts/hosts-tabs.cy.js • 4 failed tests

View Output Video

Test
Host Resource- Facts tab > user can view all facts Screenshot
Host Resource- Completed jobs tab > can perform a basic search of jobs associated with the host Screenshot
Host Resource- Completed jobs tab > can perform an advanced search jobs Screenshot
Host Resource- Completed jobs tab > can sort jobs by Name and Finish Time Screenshot
Failed  schedules/schedule-crud.cy.js • 1 failed test

View Output Video

Test
Add schedule form > can create a schedule that ends on a certain date including date picker verification Screenshot
Failed  inventories/inventory-sources.cy.js • 2 failed tests

View Output Video

Test
Inventory Source Details Page > Can sync the source with the inventory Screenshot
Inventory Source Details Page > Can cancel sync the source with the inventory Screenshot

The first 5 failed specs are shown, see all 9 specs in Cypress Cloud.

Flakiness  cypress/e2e/integration/workflows/workflow-prompts-and-surveys.cy.js • 1 flaky test

View Output Video

Test
Survey form > can add all survey type and launch a wfjt Screenshot

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@@ -85,6 +85,8 @@ def event_handler(self, event_data):
# which generate job events from two 'streams':
# ansible-inventory and the awx.main.commands.inventory_import
# logger
if event_data.get('event') == 'keepalive':
return
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From discussion with @TheRealHaoLiu, we are unlikely to need this, but I would prefer to keep it in anyway. Maybe leave a comment that it should be dead code.

@@ -282,6 +282,16 @@
placeholder={'HTTP_PROXY': 'myproxy.local:8080'},
)

register(
'AWX_RUNNER_KEEPALIVE_SECONDS',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we rename this to something about K8S_?

AlanCoding and others added 4 commits February 28, 2023 09:04
Make setting API configurable and process keepalive events
  when seen in the event callback

Use env var in pod spec and make it specific to K8S
Co-authored-by: Shane McDonald <me@shanemcd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants