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

Remove unused os variable from the matrix #76

Closed
wants to merge 1 commit into from
Closed

Remove unused os variable from the matrix #76

wants to merge 1 commit into from

Conversation

sato11
Copy link

@sato11 sato11 commented Jan 3, 2024

The top-level runs-on value has been pinned to ubuntu-latest and this os variable has no place to live when running tests, resulting in only doubling the workload for no benefits.

Although we can actually start to test on the both os versions, this commit does not go for it and chooses to use ubuntu-latest solely.

This is because it is hard to imagine that the os version affects the outcome as long as the versions of otp and elixir are set, and this is what the popular libraries like plug and phoenix use as their strategy12.

Footnotes

  1. https://github.com/elixir-plug/plug/blob/v1.15.2/.github/workflows/ci.yml

  2. https://github.com/phoenixframework/phoenix/blob/v1.7.10/.github/workflows/ci.yml

The top-level `runs-on` value has been pinned to `ubuntu-latest`
and this `os` variable has no place to live when running tests,
resulting in only doubling the workload for no benefits.

Although we can actually start to test on the both os versions,
this commit does not go for it and chooses to use `ubuntu-latest`
solely.

This is because it is hard to imagine that the os version affects
the outcome as long as the versions of otp and elixir are set,
and this is what the popular libraries like plug and phoenix use
as their strategy[^1][^2].

[^1]: https://github.com/elixir-plug/plug/blob/v1.15.2/.github/workflows/ci.yml
[^2]: https://github.com/phoenixframework/phoenix/blob/v1.7.10/.github/workflows/ci.yml
@@ -17,7 +17,6 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
Copy link
Contributor

Choose a reason for hiding this comment

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

actions/cache@v3 step would need to be updated as well :)

Copy link
Contributor

Choose a reason for hiding this comment

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

ah, no. Sorry! It wasn't using matrix.os

Copy link
Contributor

Choose a reason for hiding this comment

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

I am confused, it s creating the matrics for those OS for all those versions correctly. see #79 where we test against both OS all those versions

Copy link
Author

Choose a reason for hiding this comment

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

No. What you are seeing that looks correct to you is nothing but a label. Take a look into the logs and you can see how every job is running on top of ubuntu-latest under the hood.

Open the logs for this job, navigate through "Set up job" > "Operating System" and confirm that it's employing 22.04 despite you would assume it would be 20.04.

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks for reporting this. The fix is not to remove but instead fixing it. I think I see what might be missing

" runs-on: ${{ matrix.os }}" need to be added

@ruslandoga ruslandoga mentioned this pull request Jan 4, 2024
@epinault
Copy link
Contributor

epinault commented Jan 9, 2024

Close as fixed with #81

@epinault epinault closed this Jan 9, 2024
@sato11 sato11 deleted the remove-unused-os-matrix branch January 12, 2024 01:33
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