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

feat!: Add stop/start worker agent service method #130

Merged

Conversation

moorec-aws
Copy link
Contributor

@moorec-aws moorec-aws commented Jul 16, 2024

What was the problem/requirement? (What/Why)

Added a start and stop method for the worker service.

Some flaky tests issues were uncovered:

  1. Attempting to get Worker ID before the worker has fully started and registered with service
  2. Checking for the service process before the service has completed starting.
  3. Initialization of the deadline-worker venv before configuring the worker was mistakenly removed in refactor: Refactoring EC2InstanceWorker to split out PosixInstanceWorker and WindowsInstanceWorker #125

Change the default job-users group.
Require a way to create multiple windows job users

What was the solution? (How)

Added start and stop methods for windows and linux worker agent services

  1. increased timeout for 20 to 30 seconds
  2. Added a sleep to wait for worker to fully start and connect to service before attempting to get the worker id.
  3. Add the venv activate back
  4. Changed the default job-users group from deadline-job-users to job-users
  5. Added window_job_users list to support the creation of multiple windows users.

What is the impact of this change?

  1. Adds two new methods
  2. Fixes flaky test issues
  3. venv is now loaded before configuring the worker agent, so the proper python environment will be setup.

How was this change tested?

hatch run lint 
hatch run test

Ran the worker agent tests:

hatch run windows-e2e-tests
hatch run linux-e2e-test

Was this change documented?

No

Is this a breaking change?

Yes. The default job-user group has been changed from deadline-job-users to job-user


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@moorec-aws moorec-aws requested a review from a team as a code owner July 16, 2024 23:40
@moorec-aws moorec-aws force-pushed the moorec/start-stop-service branch from 5275112 to cc1006b Compare July 16, 2024 23:42
@moorec-aws moorec-aws changed the title feat: Add stop/start service method feat: Add stop/start worker agent service method Jul 16, 2024
AWS-Samuel
AWS-Samuel previously approved these changes Jul 17, 2024
Copy link
Contributor

@AWS-Samuel AWS-Samuel left a comment

Choose a reason for hiding this comment

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

Just two performance improvement requests. Not blocking, hence approval

src/deadline_test_fixtures/deadline/worker.py Outdated Show resolved Hide resolved
src/deadline_test_fixtures/deadline/worker.py Outdated Show resolved Hide resolved
@moorec-aws moorec-aws force-pushed the moorec/start-stop-service branch from 6ad3b86 to 1c6639f Compare July 18, 2024 13:49
@moorec-aws moorec-aws changed the title feat: Add stop/start worker agent service method feat!: Add stop/start worker agent service method Jul 18, 2024
@moorec-aws moorec-aws merged commit 0ea4b3c into aws-deadline:mainline Jul 18, 2024
12 checks passed
@moorec-aws moorec-aws deleted the moorec/start-stop-service branch July 18, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants