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

[maintainers] Tests are broken in GitHub actions #54

Closed
jpmcb opened this issue Apr 22, 2022 · 4 comments · Fixed by #56
Closed

[maintainers] Tests are broken in GitHub actions #54

jpmcb opened this issue Apr 22, 2022 · 4 comments · Fixed by #56
Labels

Comments

@jpmcb
Copy link
Owner

jpmcb commented Apr 22, 2022

Describe the bug
Tests seem to be broken in this repos GitHub actions. This has actually been a long standing problem I haven't had a ton of time to dive into. Let's see if we can get the tests to run in GitHub actions so that we have a good signal for contributors.

To Reproduce

Notice that tests aren't working in contributor PRs: #51
or in bot PRs: #50

Expected behavior
Tests to run successfully without error if tests are corrects

@jpmcb jpmcb added the area/bug label Apr 22, 2022
@carolynvs
Copy link
Contributor

I am seeing this error intermittently on my local machine too, and then rerunning the tests sometimes would result in that flake passing. It's not reproducing tonight though.

I could submit a PR with some extra try/catch and debug statements around the call to cp.execSync and when that test fails in CI, hopefully it will point to what is going wrong.

https://stackoverflow.com/a/62151340

@jpmcb
Copy link
Owner Author

jpmcb commented Apr 28, 2022

That's a great idea - let's start there! 👏🏼

@carolynvs
Copy link
Contributor

carolynvs commented May 13, 2022

I figured it out! That test relies on the current GitHub event name, and that is populated via the environment variable GITHUB_EVENT_NAME.

When you run locally, that's unset.

When you run the workflow in the context of the push, it's set to push, which isn't handled by main.ts, so it hits the default case and returns "not yet supported".

But when the workflow is run in a PR, that env var is set to "pull_request" which is an event that main tries to handle, and so it fails in a different spot because the test is missing all of the normal setup to actually run the prow github action's logic.

I'll have a PR to fix the test shortly.

@jpmcb
Copy link
Owner Author

jpmcb commented May 13, 2022

Oh wow!!!! Great investigation! Yes, let's get that fix in asap! 👏🏼 👏🏼 👏🏼 👏🏼

@jpmcb jpmcb closed this as completed in #56 May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants