-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Configure ide integration test to run automatically #7380
Conversation
db1ae6a
to
d19eb52
Compare
/werft run with-helm 👍 started the job as gitpod-build-jp-run-integration-test.7 |
f5b519d
to
6fb28a5
Compare
/werft run with-helm 👍 started the job as gitpod-build-jp-run-integration-test.9 |
f0f7232
to
b042836
Compare
/werft run with-helm 👍 started the job as gitpod-build-jp-run-integration-test.12 |
/werft run with-helm 👍 started the job as gitpod-build-jp-run-integration-test.13 |
b042836
to
8f2bac5
Compare
/werft run with-helm 👍 started the job as gitpod-build-jp-run-integration-test.15 |
hey @csweichel, I'm trying to run the ide integration test automatically and for that I need a default user I could use to run the test, I tried to use the default user |
I reckon we'll want to pass a GitHub token to the test and create a new user using that token. Relying on pre-existing users is very fragile and binds us to particular environments. |
@csweichel where/how can I get/generate this github token? This new user that you mention, should I create it using a db migration or should I follow another approach? |
The GitHub token would be injected as parameter to the test. When executing the test in a CI setting, we'd take the GitHub token from a secret or the CI system itself.
We should create this new user in the integration test on-demand, i.e. add the DB entries so that the user exists. Akin to how the buildin user DB migration works, except not a migration but in Go code and connected to an identity which carries the aforementioned GitHub token. |
8f2bac5
to
bc48b5d
Compare
Codecov Report
@@ Coverage Diff @@
## main #7380 +/- ##
==========================================
- Coverage 15.06% 11.17% -3.89%
==========================================
Files 51 18 -33
Lines 4899 993 -3906
==========================================
- Hits 738 111 -627
+ Misses 4089 880 -3209
+ Partials 72 2 -70
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
6f318a7
to
49a2e1d
Compare
/werft run with-helm 👍 started the job as gitpod-build-jp-run-integration-test.19 |
49a2e1d
to
81b18c6
Compare
/werft run with-helm 👍 started the job as gitpod-build-jp-run-integration-test.21 |
/werft run with-helm 👍 started the job as gitpod-build-jp-run-integration-test.22 |
81b18c6
to
3f93ea3
Compare
/werft run with-helm 👍 started the job as gitpod-build-jp-run-integration-test.24 |
@mustard-mh @filiptronicek could you try for a test? |
I updated |
How to check |
I'll update how to test section later |
The startup job will trigger 3 job
|
@jeanp413 @iQQBot I tried, but now I'm getting an error like
It seems to be related to our latests security measurements, maybe it should be disabled for test envs? |
Yes, it's relate #8476 |
# this is because we don't want to increate gitpod-build-main number, we can choose a name | ||
sudo cp .werft/build.yaml .werft/test.yaml | ||
# version is actual namespace that werft is build, --job-file should be same with above | ||
VERSION=$(werft run github -j .werft/test.yaml -s .werft/test.yaml github.com/gitpod-io/gitpod:main) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you use --follow-with-prefix
, the run
will wait until the other job is done and integrate the log output correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main purpose here is to get the build ID in order to get the version number of the corresponding integration-test in the next step
Hey there, as a heads up, existing integration tests are broken (this PR did not break them), I am just sharing for awareness). |
So lets we go and merge this, I will delete some debug message |
because this branch not have preview environment |
All test pass, except |
fc76810
to
e0f313f
Compare
e0f313f
to
07b58c4
Compare
/unhold |
Description
Configure ide integration test to run automatically inside a werft job.
Requires
USER_TOKEN
secret to inject a user inside DBRelated Issue(s)
Related #3065
How to test
Before merged:
werft run github -j .werft/integration-tests-startup.yaml -f
. It will start 3 werft jobs Configure ide integration test to run automatically #7380 (comment)For now, after output
[version] jp-run-integration-test.*
, you can go to step3 check the latest job's loggitpod-run-integration-tests-ide-main.*
job and check the ide test run, right now one test is failing but that's independant of this PR. Check logs of werft, you'll seeAfter merged:
Release Notes
Documentation
/werft no-preview