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

Add interim GitHub Actions #1123

Merged
merged 1 commit into from
Feb 21, 2024
Merged

Add interim GitHub Actions #1123

merged 1 commit into from
Feb 21, 2024

Conversation

arbourd
Copy link
Member

@arbourd arbourd commented Feb 12, 2024

This pull-request adds GitHub Actions configuration that allows tests to run on pull-requests and master branches.

Details

  • Tests are run in parallel per language for speed and reducing flakes
    • N number of languages and versions can be set
  • Module specific tests are set by a string
    • go-1.21 will run a job that runs Go tests against Go 1.21, etc
    • Adding go-1.20 to the list would add an additional test for Go 1.20.
  • Module specific tests are run by selecting test/test_${module}*
    • Python module runs all tests, including base unit ones, as the Python test suite is used as the default for other tests
  • Tests complete in about 5 minutes

Caveats

  • Only unprivileged tests are run
  • No core dumps
  • Only ubuntu

@arbourd arbourd force-pushed the add-gh-actions branch 2 times, most recently from fb726a2 to 8817f8c Compare February 12, 2024 16:05
@ac000
Copy link
Member

ac000 commented Feb 13, 2024

A better way may be something like

$ make -j4 -k 2>errors.txt

Then you can display that file (with a nice big banner or whatever) if there was any errors... plus you get all the errors front and centre.

@ac000
Copy link
Member

ac000 commented Feb 13, 2024

If we used kernel style make output, any errors/warnings would stand out much more...

alejandro-colomar added a commit to alejandro-colomar/shadow that referenced this pull request Feb 13, 2024
It was being done so that the second one prints errors without races.
However, the same thing can be done by passing -Orecurse to make(1).

And this makes the logs even more readable, since there's no racy output
at all.

Fixes: 97f79e3 ("CI: Make build logs more readable")
Link: <shadow-maint#702>
Link: <nginx/unit#1123>
Acked-by: Iker Pedrosa <[email protected]>
Cc: Andrew Clayton <[email protected]>
Cc: Konstantin Pavlov <[email protected]>
Cc: Dylan Arbour <https://github.com/arbourd>
Signed-off-by: Alejandro Colomar <[email protected]>
alejandro-colomar added a commit to alejandro-colomar/shadow that referenced this pull request Feb 13, 2024
It was being done so that the second one prints errors without races.
However, the same thing can be done by passing -Orecurse to make(1).

And this makes the logs even more readable, since there's no racy output
at all.

Fixes: 97f79e3 ("CI: Make build logs more readable")
Link: <shadow-maint#702>
Link: <nginx/unit#1123>
Acked-by: Iker Pedrosa <[email protected]>
Cc: Andrew Clayton <[email protected]>
Cc: Konstantin Pavlov <[email protected]>
Cc: Dylan Arbour <https://github.com/arbourd>
Signed-off-by: Alejandro Colomar <[email protected]>
alejandro-colomar added a commit to alejandro-colomar/shadow that referenced this pull request Feb 13, 2024
It was being done so that the second one prints errors without races.
However, the same thing can be achieved by passing -Orecurse to make(1).

And this makes the logs even more readable, since there's no racy output
at all.

Fixes: 97f79e3 ("CI: Make build logs more readable")
Link: <shadow-maint#702>
Link: <nginx/unit#1123>
Acked-by: Iker Pedrosa <[email protected]>
Cc: Andrew Clayton <[email protected]>
Cc: Konstantin Pavlov <[email protected]>
Cc: Dylan Arbour <https://github.com/arbourd>
Signed-off-by: Alejandro Colomar <[email protected]>
@ac000
Copy link
Member

ac000 commented Feb 13, 2024 via email

alejandro-colomar added a commit to alejandro-colomar/shadow that referenced this pull request Feb 19, 2024
It was being done so that the second one prints errors without races.
However, the same thing can be achieved by passing -Orecurse to make(1).

And this makes the logs even more readable, since there's no racy output
at all.

Fixes: 97f79e3 ("CI: Make build logs more readable")
Link: <shadow-maint#702>
Link: <nginx/unit#1123>
Acked-by: Iker Pedrosa <[email protected]>
Cc: Andrew Clayton <[email protected]>
Cc: Konstantin Pavlov <[email protected]>
Cc: Dylan Arbour <https://github.com/arbourd>
Signed-off-by: Alejandro Colomar <[email protected]>
@ac000
Copy link
Member

ac000 commented Feb 20, 2024

Hmm, something's gone wrong here (email address wise...)

commit 301728fb74bd912fcd7e69168422004a0c9cd34a
Author:     Dylan Arbour <[email protected]>
AuthorDate: Tue Feb 13 11:39:56 2024 -0500
Commit:     Dylan Arbour <[email protected]>
CommitDate: Tue Feb 20 09:42:17 2024 -0500

    Add a second make call for error logging visibility

commit 87b5aa769e478c766920e83b036aaf5c6db60c8d
Author:     Dylan Arbour <[email protected]>
AuthorDate: Mon Dec 18 18:09:32 2023 -0500
Commit:     Dylan Arbour <[email protected]>
CommitDate: Tue Feb 20 09:42:14 2024 -0500

    Add GitHub Actions

They should probably also be squashed...

.github/workflows/ci.yml Outdated Show resolved Hide resolved
@ac000

This comment was marked as duplicate.

@arbourd arbourd force-pushed the add-gh-actions branch 2 times, most recently from 37eb6a4 to 4360560 Compare February 20, 2024 19:56
@arbourd arbourd mentioned this pull request Feb 20, 2024
Copy link
Collaborator

@callahad callahad left a comment

Choose a reason for hiding this comment

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

This is clearly Good Enough to be useful; let's merge now and refine later.

@callahad
Copy link
Collaborator

At your discretion, consider adding a richer commit message / subject line. It could be useful to have some of the caveats spelled out there (mainly, that this is an initial pass and not intended to be comprehensive; the emphasis is on providing a Good Enough smoke test for development purposes)

This commit adds GitHub Actions configuration, running tests on
pull-requests and master push changes.

This change is meant to be a first-pass at our evolving CI processes.

- Tests run in parallel per language for speed and isolation
- Test matrix is composed by a string list of languages and versions
- `setup-${language}` actions are preferred over base (and changing)
  versions from `ubuntu-latest` operating system

A few caveats with the current setup:

- Only tests on Ubuntu (no FreeBSD or Alpine)
- Unpriviledged tests only
- No core dumps available on failure
@arbourd arbourd merged commit 56d3a1a into nginx:master Feb 21, 2024
15 checks passed
@arbourd arbourd deleted the add-gh-actions branch February 21, 2024 14:54
alejandro-colomar added a commit to alejandro-colomar/shadow that referenced this pull request Mar 9, 2024
It was being done so that the second one prints errors without races.
However, the same thing can be achieved by passing -Orecurse to make(1).

And this makes the logs even more readable, since there's no racy output
at all.

Fixes: 97f79e3 ("CI: Make build logs more readable")
Link: <shadow-maint#702>
Link: <nginx/unit#1123>
Acked-by: Iker Pedrosa <[email protected]>
Cc: Andrew Clayton <[email protected]>
Cc: Konstantin Pavlov <[email protected]>
Cc: Dylan Arbour <https://github.com/arbourd>
Signed-off-by: Alejandro Colomar <[email protected]>
alejandro-colomar added a commit to alejandro-colomar/shadow that referenced this pull request Mar 11, 2024
It was being done so that the second one prints errors without races.
However, the same thing can be achieved by passing -Orecurse to make(1).

And this makes the logs even more readable, since there's no racy output
at all.

Fixes: 97f79e3 ("CI: Make build logs more readable")
Link: <shadow-maint#702>
Link: <nginx/unit#1123>
Acked-by: Iker Pedrosa <[email protected]>
Cc: Andrew Clayton <[email protected]>
Cc: Konstantin Pavlov <[email protected]>
Cc: Dylan Arbour <https://github.com/arbourd>
Signed-off-by: Alejandro Colomar <[email protected]>
hallyn pushed a commit to shadow-maint/shadow that referenced this pull request Mar 13, 2024
It was being done so that the second one prints errors without races.
However, the same thing can be achieved by passing -Orecurse to make(1).

And this makes the logs even more readable, since there's no racy output
at all.

Fixes: 97f79e3 ("CI: Make build logs more readable")
Link: <#702>
Link: <nginx/unit#1123>
Acked-by: Iker Pedrosa <[email protected]>
Cc: Andrew Clayton <[email protected]>
Cc: Konstantin Pavlov <[email protected]>
Cc: Dylan Arbour <https://github.com/arbourd>
Signed-off-by: Alejandro Colomar <[email protected]>
@alejandro-colomar
Copy link
Contributor

alejandro-colomar commented Mar 13, 2024

A better way may be something like

$ make -j4 -k 2>errors.txt

Then you can display that file (with a nice big banner or whatever) if there was any errors... plus you get all the errors front and centre.

That doesn't show the errors together with the commands that produced them. Plus, that doesn't solve the races.

@ac000
Copy link
Member

ac000 commented Mar 13, 2024 via email

@alejandro-colomar
Copy link
Contributor

alejandro-colomar commented Mar 13, 2024

On Wed, 13 Mar 2024 09:38:12 -0700 Alejandro Colomar @.***> wrote: > A better way may be something like > > shell > $ make -j4 -k 2>errors.txt > > > Then you can display that file (with a nice big banner or whatever) if there was any errors... plus you get all the errors front and centre. That doesn't show the errors together with the commands that produced them. Plus, that doesn't solve the races.
This whole thing is pretty much moot now we have prettified output...

Not really. You're still subject to races. And redirecting stderr still leaves you without the corresponding CC ... next to the error.

So, think that the following may happen:

  CC  foo.o
some error line from compiling foo.o
  CC  bar.o
another error line from compiling foo.o

And if you redirect stderr, you may end up with stuff like the following in error.log:

some error line from compiling foo.o
some error line from compiling bar.o
another error line from compiling foo.o

(and even if you don't happen to see bad output from races, I think having the error lines without the corresponding CC foo.o is a bit unfriendly.)

@ac000
Copy link
Member

ac000 commented Mar 13, 2024 via email

@alejandro-colomar
Copy link
Contributor

alejandro-colomar commented Mar 13, 2024

But the error itself will show where the problem lies...

Yeah, but if several error reports are intertwined due to a race, it will be hard to read each of them.

Think of:

error line 1 of foo.o
error line 1 of bar.o
error line 2 of foo.o
error line 2 of bar.o
error line 3 of bar.o
error line 4 of bar.o
error line 3 of foo.o

I see no reasons to avoid -Otarget, especially when it doesn't impose observable performance degradation (I couldn't measure any meaningful degradation in projects that I use often, including the Linux man-pages and shadow).

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.

5 participants