-
Notifications
You must be signed in to change notification settings - Fork 142
Add runner to run tests on DBR #4416
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
base: main
Are you sure you want to change the base?
Conversation
|
Commit: f0ec698
17 interesting tests: 7 KNOWN, 5 SKIP, 5 RECOVERED
Top 50 slowest tests (at least 2 minutes):
|
| // OR | ||
| // make dbr-test | ||
| func TestDbrAcceptance(t *testing.T) { | ||
| if os.Getenv("DBR_ENABLED") != "true" { |
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.
DBR tests will run in a separate "env" and will not be a part of normal integration test run. This option enables that.
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.
Do we need this to be a go test (as opposed a separate tool in tools/dbrunner/)
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.
Go test is nicer because at the end you are running a test. Can be a separate tool though
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 the job fails, the go test will fail as well and flag that in CI.
## Changes This PR updates the CLI to use the FUSE to read and write notebooks instead of the workspace APIs, when the DBR version is serverless 2.5+. This has the following benefits: 1. Much faster bundle deployments / summaries etc for DABs in the workspace. 2. Fixes commands like `bundle generate --bind` which were previously failing on DABs in the workspace due to both the workspace APIs and FUSE being used simultaneously. 3. Enables running tests on DBR. With the previous logic, running tests on DBR would fail because of mixing workspace API access and FUSE access. ## Tests Manually verified that both bundle deploy / bundle generate continue to work correctly on DBR. Also verified that `bundle generate --bind` works on DBR. Acceptance tests will be added once #4416 lands. ---- bundle generate --bind works, i.e. all notebooks are written successfully via FUSE: <img width="821" height="293" alt="Screenshot 2026-02-05 at 23 30 08" src="https://github.com/user-attachments/assets/55d61b57-39a7-4119-8275-f38df17c6aba" /> ---- bundle deploy works, for all sorts of notebooks, i.e. they are read correctly. <img width="819" height="232" alt="Screenshot 2026-02-05 at 23 30 15" src="https://github.com/user-attachments/assets/badc91ae-1fee-41e8-9429-4cc8b6d2be97" /> ---- This was tested and run on serverless `client.2.5` (standard v2). The UI does not allow me to select a minor version so I could not test other client.2 versions like 2.4. That's why we only use FUSE from 2.5 onwards. In practice this is fine because customers wil also likely be using `2.5` or above it they are on serverless.
| SkipOnDbr *bool | ||
| // If true, run this test when running on DBR / workspace file system. | ||
| // Tests must explicitly opt-in to run on DBR. | ||
| RunsOnDbr *bool |
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.
Curious, why replace SkipOnDbr with RunsOnDbr? We want opt-out, right?
Also, why not auto-skip tests with RecordRequests = true in acceptance_test.go? Otherwise people have to remember to change dbr flag every time they change RecordRequests and it's easy to forget.
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.
Discussed offline. We use RunsOnDbr because ~20 tests will run on DBR initially.
| VERBOSE_TEST=1 $(INTEGRATION) -short | ||
|
|
||
| dbr-integration: | ||
| DBR_ENABLED=true go test -v -timeout 4h -run TestDbrAcceptance$$ ./acceptance |
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.
Can I run one test on DBR?
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.
Yeah, there's a cloudTestFilter option in the configuration for TestDbrAccept that allows you to specify a filter for tests to run. We can add a nicer make rule / entry point in a followup when necessary.
I skipped it for now because the test takes 15 minutes to run, 5-10 minutes of which are just the setup. Running a single test is not a significant speedup today.
| } | ||
|
|
||
| // Create the job | ||
| job, err := w.Jobs.Create(ctx, createJob) |
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.
How is this job cleaned up?
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.
We have a nightly workflow that cleans up all jobs in our test envs. I intentionally do not clean it up here because that allows you to read the code / logs after a failed run.
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.
I had a comment for the test directories, maybe I should add one for this as well.
// Note: We do not cleanup test directories created here. They are kept around
// to enable debugging of failures or analyzing the logs.
// They will automatically be cleaned by the nightly cleanup scripts.
Changes
This:
RecordRequest = truebecause serverless does not allow localhost connections.builds upon #4450
Logs from the test run:
The CI job will be added once the runner is merged.