Skip to content

test: Add a gc for integration branches #13153

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

Merged
merged 1 commit into from
Sep 26, 2022
Merged

test: Add a gc for integration branches #13153

merged 1 commit into from
Sep 26, 2022

Conversation

utam0k
Copy link
Contributor

@utam0k utam0k commented Sep 21, 2022

Description

Check for any remaining integration tests previously run before starting the test. This reduces wasteful preview environments.

Related Issue(s)

Relaates #12248 (comment)

How to test

  1. Appropriately short timeouts to simplify testing
  2. Create a branch for the test
$ branch="wk-inte-test/$(date +%Y%m%d%H%M%S)"
$ git branch $branch
$ git push origin $branch 
  1. Run the integration test and check it

e.g. https://werft.gitpod-dev.com/job/gitpod-custom-to-gc-inte-br.5

Release Notes

NONE

Documentation

No

Werft options:

  • /werft with-preview
  • /werft with-integration-tests=workspace
    Valid options are all, workspace, webapp, ide

@utam0k
Copy link
Contributor Author

utam0k commented Sep 21, 2022

/werft with-integration-tests=workspace

👎 unknown command: with-integration-tests=workspace
Use /werft help to list the available commands

@utam0k
Copy link
Contributor Author

utam0k commented Sep 21, 2022

/werft run with-integration-tests=workspace

👍 started the job as gitpod-build-to-gc-inte-br.2
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-to-gc-inte-br.3 because the annotations in the pull request description changed
(with .werft/ from main)

@utam0k
Copy link
Contributor Author

utam0k commented Sep 21, 2022

/werft with-integration-tests=ide

👎 unknown command: with-integration-tests=ide
Use /werft help to list the available commands

@utam0k
Copy link
Contributor Author

utam0k commented Sep 21, 2022

/werft run with-integration-tests=ide

👍 started the job as gitpod-build-to-gc-inte-br.4
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-to-gc-inte-br.6 because the annotations in the pull request description changed
(with .werft/ from main)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-to-gc-inte-br.7 because the annotations in the pull request description changed
(with .werft/ from main)

@utam0k utam0k force-pushed the to/gc-inte-br branch 2 times, most recently from 4bf07bf to d29ed68 Compare September 21, 2022 09:16
@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-to-gc-inte-br.10 because the annotations in the pull request description changed
(with .werft/ from main)

@utam0k utam0k force-pushed the to/gc-inte-br branch 3 times, most recently from 258d28f to 50fc940 Compare September 21, 2022 10:20
@utam0k utam0k marked this pull request as ready for review September 21, 2022 10:21
@utam0k utam0k requested a review from a team September 21, 2022 10:21
@github-actions github-actions bot added the team: workspace Issue belongs to the Workspace team label Sep 21, 2022
Copy link
Contributor

@jenting jenting left a comment

Choose a reason for hiding this comment

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

Out of curiosity, why the clean-up remote branch does not work sometimes?

@utam0k
Copy link
Contributor Author

utam0k commented Sep 21, 2022

Out of curiosity, why the clean-up remote branch does not work sometimes?

job's timeout😭

@jenting
Copy link
Contributor

jenting commented Sep 21, 2022

Out of curiosity, why the clean-up remote branch does not work sometimes?

job's timeout😭

We can also increase the timeout from 120 mins to more because we will add more tests.
Or we could separate the workspace component integration test into five jobs to cease the chance that job timeout happens.

@utam0k
Copy link
Contributor Author

utam0k commented Sep 21, 2022

Out of curiosity, why the clean-up remote branch does not work sometimes?

job's timeout😭

We can also increase the timeout from 120 mins to more because we will add more tests.
Or we could separate the workspace component integration test into five jobs to cease the chance that job timeout happens.

I will create an issue about it. If you have ideas, please let me know there.

Copy link
Contributor

@mads-hartmann mads-hartmann left a comment

Choose a reason for hiding this comment

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

The GC looks good to me 🛹

Copy link
Contributor

@jenting jenting left a comment

Choose a reason for hiding this comment

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

The others LGTM

@@ -15,6 +15,8 @@ DO_CLEANUP=0
declare -A FAILURE_TESTS
declare SIGNAL # used to record signal caught by trap

BRANCH_TIMEOUT_SEC=10800
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer we extend it to 1 day to prevent a case that the integration job runs over 3 hours.
If others trigger the integration test, it will clean up the branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jenting Thanks for your review 🙇 The timeout of the job is 2 hours, so we don't need to wait for 1day. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jenting Currently all tests flow normally just in time for the werft timeout. In other words, if one test case eats time until its timeout of the unit test, it will reach the werft timeout. So this is natural.
Let's create an issue about the test that is failing.

@jenting
Copy link
Contributor

jenting commented Sep 26, 2022

/werft run

👍 started the job as gitpod-build-to-gc-inte-br.14
(with .werft/ from main)

@utam0k
Copy link
Contributor Author

utam0k commented Sep 26, 2022

@jenting rebased from man

@jenting
Copy link
Contributor

jenting commented Sep 26, 2022

@jenting rebased from man

The latest error comes this PR, and I left a comment #13241 (comment)

@werft-gitpod-dev-com
Copy link

started the job as gitpod-build-to-gc-inte-br.16 because the annotations in the pull request description changed
(with .werft/ from main)

@utam0k
Copy link
Contributor Author

utam0k commented Sep 26, 2022

/werft run

👍 started the job as gitpod-build-to-gc-inte-br.17
(with .werft/ from main)

@roboquat roboquat merged commit ba74cdb into main Sep 26, 2022
@roboquat roboquat deleted the to/gc-inte-br branch September 26, 2022 04:40
@roboquat roboquat added deployed: workspace Workspace team change is running in production deployed Change is completely running in production labels Sep 28, 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/S team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants