Conversation
📝 WalkthroughWalkthroughThis PR refactors stack management across the codebase by shifting from global stack references to per-session stack handling, renames Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.5.0)level=warning msg="[linters_context] running gomodguard failed: unable to read module file go.mod: current working directory must have a go.mod file: if you are not using go modules it is suggested to disable this linter" Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/pkg/session/session.go (1)
81-101: Add explicit ProviderID default for empty fallback case.In the
ErrDefaultStackNotSetfallback path (lines 95-101), ifProviderIDremains empty (not set to "auto"), it bypasses the coercion logic and returnsProvider: "". This causesNewProvider()to silently fall back toPlaygroundProvider(the default case in the switch statement atsrc/pkg/cli/connect.go:46).Either add an explicit default here (e.g., coerce empty to
ProviderDefangalongside theProviderAutocase) or require callers to initializeProviderIDbefore creatingSessionLoaderOptions.
* Retry setting the policies on service account up to 3 times (#1851) * Retry setting the policies on service account up to 3 times * Address code rabbit comment * continue to the correct outter check policy loop --------- Co-authored-by: Edward J <edw@defang.io> * fix(upgrade): avoid running slow "brew config" unless necessary (#1859) * fix: use shortened links for docs (#1858) * Stacks Cleanup (#1855) * avoid reading from global stacks when session stacks is available * require stack during deployment in interactive mode * Lio/stacks (#1860) * avoid reading from global stacks when session stacks is available * require stack during deployment in interactive mode * fix: panic when DEFANG_PROVIDER is not set would cause GetRegionVarName("") * fix: handle empty stack file * fix: abort stack loading on ctrl-c --------- Co-authored-by: Jordan Stephens <jordan@stephens.io> * chore: fix estimate unit test * Standardize the file and dir mode for context test (#1852) * Standardize the file and dir mode for context test * Update src/pkg/cli/compose/context_test.go * Remove unused import term --------- Co-authored-by: Edward J <edw@defang.io> Co-authored-by: Lio李歐 <lionello@users.noreply.github.com> * allow --provider to override default stack (#1862) * allow fallback stack when !RequireStack * s/RequireStack/DisallowFallbackStack/ * only log fallback when actually using fallback * s/RequireStack/DisallowFallbackStack/ * prefer --provider if available * coderabbbit feedback * refactor: improve error handling and warnings in whoami command --------- Co-authored-by: Lionello Lunesu <lio+git@lunesu.com> Co-authored-by: Hao Jiang <edwardrf@gmail.com> * fix: don't overwrite known state with NOT_SPECIFIED * fix(aws): add CloudFormation metadata --------- Co-authored-by: Hao Jiang <edwardrf@gmail.com> Co-authored-by: Edward J <edw@defang.io> Co-authored-by: Jordan Stephens <jordan@stephens.io>
* fix(aws): make CIRoleArn output ARN * feat(aws): CloudFormation metadata (#1863) * Retry setting the policies on service account up to 3 times (#1851) * Retry setting the policies on service account up to 3 times * Address code rabbit comment * continue to the correct outter check policy loop --------- Co-authored-by: Edward J <edw@defang.io> * fix(upgrade): avoid running slow "brew config" unless necessary (#1859) * fix: use shortened links for docs (#1858) * Stacks Cleanup (#1855) * avoid reading from global stacks when session stacks is available * require stack during deployment in interactive mode * Lio/stacks (#1860) * avoid reading from global stacks when session stacks is available * require stack during deployment in interactive mode * fix: panic when DEFANG_PROVIDER is not set would cause GetRegionVarName("") * fix: handle empty stack file * fix: abort stack loading on ctrl-c --------- Co-authored-by: Jordan Stephens <jordan@stephens.io> * chore: fix estimate unit test * Standardize the file and dir mode for context test (#1852) * Standardize the file and dir mode for context test * Update src/pkg/cli/compose/context_test.go * Remove unused import term --------- Co-authored-by: Edward J <edw@defang.io> Co-authored-by: Lio李歐 <lionello@users.noreply.github.com> * allow --provider to override default stack (#1862) * allow fallback stack when !RequireStack * s/RequireStack/DisallowFallbackStack/ * only log fallback when actually using fallback * s/RequireStack/DisallowFallbackStack/ * prefer --provider if available * coderabbbit feedback * refactor: improve error handling and warnings in whoami command --------- Co-authored-by: Lionello Lunesu <lio+git@lunesu.com> Co-authored-by: Hao Jiang <edwardrf@gmail.com> * fix: don't overwrite known state with NOT_SPECIFIED * fix(aws): add CloudFormation metadata --------- Co-authored-by: Hao Jiang <edwardrf@gmail.com> Co-authored-by: Edward J <edw@defang.io> Co-authored-by: Jordan Stephens <jordan@stephens.io> --------- Co-authored-by: Hao Jiang <edwardrf@gmail.com> Co-authored-by: Edward J <edw@defang.io> Co-authored-by: Jordan Stephens <jordan@stephens.io>
Description
GetRegionVarNamepanics)Linked Issues
Checklist
Summary by CodeRabbit
Bug Fixes
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.