bundle: upload files after plan approval and DMS version creation - #6704
Draft
shreyas-goenka wants to merge 5 commits into
Draft
shreyas-goenka wants to merge 5 commits into
shreyas-goenka wants to merge 5 commits into
Conversation
Collaborator
Integration test reportCommit: f811274
16 interesting tests: 16 flaky
Top 50 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.
Changes
Move artifact upload and file sync, their inventory update/push, and directory permissions after planning, approval, and DMS version creation. Open the resource WAL only after uploads succeed. Renew the DMS lease during deployment and drain the operation buffer even when uploads fail before resource apply.
Why
Previously a failed plan, declined deployment, or rejected DMS CreateVersion could leave uploaded files in the workspace. These failures now stop before uploading. Keeping inventory persistence after sync preserves file deletion tracking on fresh CI checkouts; permissions follow creation of custom artifact/file directories.
File-only deployments retain the existing behavior: an empty resource plan does not create a DMS version. Tracking those uploads as a versioned operation is a separate follow-up.
Tests
Local DMS/deploy acceptance tests cover saved plans and fresh-checkout file recovery. Added a failed-upload/retry test with a custom artifact directory and disabled workspace locking, assertions that rejected versions perform no content writes, and heartbeat renewal/failure/shutdown tests. Phase tests pass with the race detector; changed Go packages pass lint. Periodic heartbeat requests are normalized in request goldens, with an explicit option to inspect them.
CI is green on
f8112747fab: direct, DMS, and Terraform suites on Linux/macOS/Windows, plus all six AWS/Azure/GCP Linux/Windows integration jobs.This PR was written with Codex.