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

test: add worker log writing to local disk test #478

Merged
merged 3 commits into from
Nov 18, 2024

Conversation

YutongLi291
Copy link
Contributor

@YutongLi291 YutongLi291 commented Nov 15, 2024

Requires #477 to be merged first due to conftest additions.

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

When jobs are ran with worker agent, the worker writes the session log, worker log, and worker bootstrap logs to the disk on the worker instance (with the default options if the worker logs aren't manually turned off).

We should verify that these logs are written, accessible by the worker user, and not accessible by the job user and prevent regressions in the future.

What was the solution? (How)

Add a test that verifies that worker will write these files to disk, and that they're accessible by the worker user, and not accessible by the job user.

What is the impact of this change?

Better testing to verify that worker and session logs are written to disk by the worker

How was this change tested?

# Linux
source .e2e_linux_infra.sh
hatch run e2e-test

# Windows
source .e2e_windows_infra.sh
hatch run e2e-test

Was this change documented?

No

Is this a breaking change?

No

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

@YutongLi291 YutongLi291 requested a review from a team as a code owner November 15, 2024 03:08
check_session_log_exists_result.exit_code == 0
) # The -e command returns 0 on linux if the file does exist

# Check that the session log file is not accessible by the job user
Copy link
Contributor

Choose a reason for hiding this comment

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

Super nit of nits job user extra space!

)
assert (
check_session_log_exists_result.exit_code == 0
) # The -e command returns 0 on linux if the file does exist
Copy link
Contributor

Choose a reason for hiding this comment

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

Super nit of nits does exist extra space!

@YutongLi291 YutongLi291 enabled auto-merge (squash) November 15, 2024 22:14
@YutongLi291 YutongLi291 merged commit a44f00a into aws-deadline:mainline Nov 18, 2024
15 checks passed
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