-
Notifications
You must be signed in to change notification settings - Fork 112
Add cloud-only acceptance tests for ssh tunnel #3825
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
d307bfa to
a988e53
Compare
24d5662 to
eb3c747
Compare
12 failing tests:
|
acceptance/acceptance_test.go
Outdated
| } | ||
|
|
||
| func CreateReleaseArtifact(t *testing.T, cwd, releasesDir, osName, arch string) { | ||
| tempBuildDir := filepath.Join(releasesDir, "tmp_"+arch) |
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.
why is this directory called tmp_ ? Is it cleaned up?
This is similar to BuildCLI() and there we build into the same directory, it's faster on second run when file is already present and nothing changed.
Can we re-use BuildCLI() function here? This will reuse build cache. When run on linux it will also re-use build artifact (even if you call go build for second time, it'll be faster).
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.
It make sense to re-use BuildCLI, added that in the new revision
| zipName := fmt.Sprintf("databricks_cli_%s_%s.zip", osName, arch) | ||
| zipPath := filepath.Join(releasesDir, zipName) | ||
|
|
||
| zipFile, err := os.Create(zipPath) |
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.
Should we skip zipping if its mtime > mtime of the binary?
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.
Based on my testing go build modifies the binaries all the time, even if it skips the actual compilation phase. I'm re-creating the archives all the time because of it, but because the builds themselves are now cached, it's still pretty fast on subsequent runs
But this time also store private client key in the secrets scope.
eb3c747 to
f813e3f
Compare
ad6d8e6 to
20e1607
Compare
20e1607 to
e7136fc
Compare
Changes
Based on #3775
Make a simple connection with "echo 'Hello'" and check that databricks ssh connect output has it.
SSH tunnel requires linux releases to be present, so it can upload them to the workspace for the ssh server to use. Added the build step directly to the acceptance_test, similar to how we build the CLI itself there. Initially I've modified our runner to install goreleaser and running make snapshot-release, but it takes over 10m on linux machines. Current build step only adds ~1m to the test time.