Skip to content

fix(up --dry-run): fix dry-run for plural up across all providers#729

Merged
michaeljguarino merged 1 commit intomainfrom
sebastian/prod-4739-plural-up-dry-run-on-azure-fails-due-to-no-workspace-file
Apr 30, 2026
Merged

fix(up --dry-run): fix dry-run for plural up across all providers#729
michaeljguarino merged 1 commit intomainfrom
sebastian/prod-4739-plural-up-dry-run-on-azure-fails-due-to-no-workspace-file

Conversation

@floreks
Copy link
Copy Markdown
Member

@floreks floreks commented Apr 24, 2026

This pull request primarily refactors several methods and functions to consistently use receiver variable names (c instead of ctx or context) across multiple files, which improves code readability and reduces confusion. Additionally, it introduces a standardized approach for handling dry-run mode in provider creation functions, ensuring that a project manifest is written appropriately when dry-run is enabled.

Key changes include:

Refactoring for Consistency and Readability:

  • Updated method receiver names from ctx or context to c across pkg/up/context.go and pkg/up/deploy.go, affecting methods like identifier, IgnorePreflights, SetImportCluster, Backfill, Deploy, Destroy, and related helpers.

Dry-run Mode Enhancements:

  • Added logic to provider constructors (mkAWS, mkAzure, mkBYOK, and GCP's WithConfig option) to create and write a minimal ProjectManifest when dry-run is enabled. This ensures consistent behavior for all providers in dry-run scenarios.

Bug Fixes and Minor Improvements:

  • Corrected assignment in HandleInitWithProject so the project variable is set directly, avoiding shadowing and improving error handling.
  • Improved parameter usage in handleUp and HandleInitWithProject to use local variables (cloud, dryRun) for clarity and correctness.

Labels

Test Plan

Locally w/ plural up --dry-run for all providers. The only prerequisite was configuring the Git repository.

Checklist

  • If required, I have updated the Plural documentation accordingly.
  • I have added tests to cover my changes.
  • I have added a meaningful title and summary to convey the impact of this PR to a user.
  • I have added relevant labels to this PR to help with categorization for release notes.

@linear
Copy link
Copy Markdown

linear Bot commented Apr 24, 2026

@floreks floreks added the bug-fix This pull request fixes a bug label Apr 24, 2026
@floreks floreks changed the title fix(up): fix dry-run for plural up across all providers fix(up --dry-run): fix dry-run for plural up across all providers Apr 24, 2026
Comment thread pkg/provider/azure.go
@michaeljguarino michaeljguarino merged commit 9b09061 into main Apr 30, 2026
14 of 15 checks passed
@michaeljguarino michaeljguarino deleted the sebastian/prod-4739-plural-up-dry-run-on-azure-fails-due-to-no-workspace-file branch April 30, 2026 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix This pull request fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants