Skip to content

fix(driver/custom): pass provider name to ToEnvironment#675

Open
skevetter wants to merge 4 commits intoprovider-namefrom
fix/custom-driver-provider-name
Open

fix(driver/custom): pass provider name to ToEnvironment#675
skevetter wants to merge 4 commits intoprovider-namefrom
fix/custom-driver-provider-name

Conversation

@skevetter
Copy link
Copy Markdown
Owner

@skevetter skevetter commented Apr 4, 2026

Summary

  • The custom driver's ToEnvironWithBinaries passes an empty string for providerName to ToEnvironment, so DEVPOD_PROVIDER is never set in the environment for custom driver commands
  • Use workspace.Workspace.Provider.Name to match all other call sites

Context

Found during review of #615. All other ToEnvironment call sites (via ToEnvironmentWithBinaries in download.go) correctly pass opts.Config.Name, but the agent-side custom driver was missed.

The backward-compat fallback for legacy DEVPOD_<FLAG> env vars would
compute DEVPOD_DEVPOD_HOME for the devpod-home flag, since the prefix
guard already resolves it to DEVPOD_HOME. Skip the fallback when the
flag name already starts with the env prefix.
The PR added a providerName parameter to ToEnvironment to set
DEVPOD_PROVIDER in the provider's environment, but the custom driver
call site passed an empty string. Use workspace.Workspace.Provider.Name
so custom driver commands also receive the provider name.
The custom driver call site passes an empty string for providerName,
so DEVPOD_PROVIDER is never set in the environment for custom driver
commands. Use workspace.Workspace.Provider.Name to match the behavior
of other call sites.

Depends on #615
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 4, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c343406a-d9e1-4c33-9b19-ed020bb80f78

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/custom-driver-provider-name

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant