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

Workspace integration tests: Poll for job phase instead of tailing logs #12069

Merged
merged 2 commits into from
Aug 11, 2022

Conversation

mads-hartmann
Copy link
Contributor

@mads-hartmann mads-hartmann commented Aug 11, 2022

Description

The workspace integration tests have been failing consistently since we switched to gRPC with an error related to communicating with Werft (see issue).

I narrowed the error down to when we use werft job logs and was able to get that to fail consistently in Werft by triggering the integration test jobs. However, I wasn't able to get werft job logs to fail when using the command from a Gitpod workspace.

So instead of trying to modify any timeouts in our system I opted to instead change how the integration test job waits for the completion of the build job for the preview environment. We now poll for that phase until the job completes and then check if the job was successful. The downside of this approach is that you no longer get the logs of the build job in your integration tests jobs but I think that's a reasonable trade-off.

I decided to move your bash script into a separate file as I found it hard to edit the bash inside of YAML. If you're unhappy with this change let me know and I can move it back. Because of that change this PR is easiest to read commit-by-commit ☺️

I also cleaned up some of the output of the script a bit so that the logs goes into the relevant slices (see the difference between gitpod-custom-mads-ws-integration-tests.1 and gitpod-custom-mads-ws-integration-tests.2

Related Issue(s)

Fixes #11979

How to test

During development I ran this job using:

werft job run github -j .werft/workspace-run-integration-tests.yaml -s .werft/workspace-run-integration-tests.sh

See the most recent job here. The integration tests don't pass but I think that's outside the scope of this PR - at least it's able to run the tests again with this change ☺️

Release Notes

NONE

Documentation

N/A

Werft options:

  • /werft with-preview

@mads-hartmann mads-hartmann marked this pull request as ready for review August 11, 2022 13:59
@mads-hartmann mads-hartmann requested a review from a team August 11, 2022 13:59
@github-actions github-actions bot added the team: workspace Issue belongs to the Workspace team label Aug 11, 2022
@roboquat roboquat merged commit 47eda7c into main Aug 11, 2022
@roboquat roboquat deleted the mads/ws-integration-tests branch August 11, 2022 18:20
@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note-none size/L team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The workspace integration tests failed because of grpc timeout
3 participants