Skip to content

Test suite: Only run the c1,c2 hostname test in CI#29

Merged
kleinhenz merged 2 commits into
JuliaParallel:masterfrom
DilumAluthge-forks:dpa/ci-hostnames
Jan 30, 2025
Merged

Test suite: Only run the c1,c2 hostname test in CI#29
kleinhenz merged 2 commits into
JuliaParallel:masterfrom
DilumAluthge-forks:dpa/ci-hostnames

Conversation

@DilumAluthge
Copy link
Copy Markdown
Member

@DilumAluthge DilumAluthge commented Dec 31, 2024

@DilumAluthge
Copy link
Copy Markdown
Member Author

This depends on #28. So #28 should be merged first, and then this PR can be merged.

@DilumAluthge DilumAluthge marked this pull request as ready for review December 31, 2024 06:12
@DilumAluthge
Copy link
Copy Markdown
Member Author

Alright, @kleinhenz this is now ready for review.

@jbphyswx This should make it easier for people to run theSlurmClusterManager.jl package tests on their own local Slurm clusters.

Comment thread test/script.jl Outdated
if hosts != ["c1", "c1", "c2", "c2"]
msg = "Test failed: observed_hosts=$(hosts) does not match expected_hosts=[c1, c1, c2, c2]"
error(msg)
const is_ci = parse(Bool, strip(get(ENV, "CI", "false")))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this actually present in our CI since we are running inside the docker compose cluster?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah, that's a really good point. No, I don't think it is.

Hmmm. I'll have to figure something else out.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Alright, I have a different approach now.

If the environment variable is not set (e.g. if you are inside of our Docker Compose cluster), we default to is_ci = true.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

So if you look at the CI logs on this PR (e.g. this CI log), you'll see the following message:

[ Info: This is CI, so we will perform the hostname test

This indicates that the test is being run on our CI, as desired.

@DilumAluthge DilumAluthge marked this pull request as draft January 17, 2025 03:37
@DilumAluthge DilumAluthge marked this pull request as ready for review January 21, 2025 00:04
@kleinhenz kleinhenz merged commit 0703f19 into JuliaParallel:master Jan 30, 2025
@DilumAluthge DilumAluthge deleted the dpa/ci-hostnames branch January 30, 2025 03:08
@DilumAluthge DilumAluthge restored the dpa/ci-hostnames branch January 30, 2025 03:08
@DilumAluthge DilumAluthge deleted the dpa/ci-hostnames branch January 30, 2025 03:08
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.

2 participants