acc: run alerts/with_file locally#5651
Open
pietern wants to merge 1 commit into
Open
Conversation
The alerts/with_file acceptance test deploys an alert and exports the .dbalert.json file the backend materializes at the alert's parent_path, then diffs it against the local copy. The in-process testserver fake did not reproduce this side effect, so the export returned nothing and the test could only run on cloud. Teach the alerts handler to write a .dbalert.json file on create/update (reversing the line-joining in load_dbalert_files.go) and delete it on trash, mirroring the backend. Also fix the workspace export handler to return the SDK's base64 ExportResponse JSON when direct_download is not set; previously it always returned raw bytes, which the SDK's Workspace.Export (used by `databricks workspace export`) could not parse. Byte-fidelity to the backend's exact serialization (float "2.0", forced notify_on_ok, source-first field order) is not reproducible from the parsed AlertV2 via the SDK marshaler, so the committed input file is regenerated to the fake's deterministic output. The resulting output.txt is byte-identical to the prior cloud recording. Co-authored-by: Isaac
Contributor
Approval status: pending
|
Collaborator
Integration test reportCommit: 77ed961
24 interesting tests: 13 SKIP, 7 KNOWN, 4 flaky
Top 22 slowest tests (at least 2 minutes):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Teaches the alerts handler to materialize (and delete) the
.dbalert.jsonfile the backend writes atparent_path, plus the same export-envelope fix as #5649, so the export round-trip works against the fake.This pull request and its description were written by Isaac.