Skip to content

Update pluginapitester to apply environment variables in godel.yml#971

Open
nmiyake wants to merge 1 commit into
masterfrom
nmiyake/update-plugin-runner
Open

Update pluginapitester to apply environment variables in godel.yml#971
nmiyake wants to merge 1 commit into
masterfrom
nmiyake/update-plugin-runner

Conversation

@nmiyake
Copy link
Copy Markdown
Contributor

@nmiyake nmiyake commented Dec 3, 2025

Before this PR

After this PR

==COMMIT_MSG==
Updates pluginapitester.RunPlugin such that, if a project directory is specified and contains a "godel/config/godel.yml" file, then any settings specified in the "environment" configuration are set as environment variables.
==COMMIT_MSG==

Possible downsides?

Updates pluginapitester.RunPlugin such that, if a project directory
is specified and contains a "godel/config/godel.yml" file, then any
settings specified in the "environment" configuration are set as
environment variables.
@nmiyake nmiyake requested a review from tabboud December 3, 2025 23:07
@changelog-app
Copy link
Copy Markdown

changelog-app Bot commented Dec 3, 2025

Generate changelog in changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

Updates pluginapitester.RunPlugin such that, if a project directory is specified and contains a "godel/config/godel.yml" file, then any settings specified in the "environment" configuration are set as environment variables.

Check the box to generate changelog(s)

  • Generate changelog entry

@changelog-app
Copy link
Copy Markdown

changelog-app Bot commented Dec 3, 2025

Successfully generated changelog entry!

Need to regenerate?

Simply interact with the changelog bot comment again to regenerate these entries.


📋Changelog Preview

💡 Improvements

  • Updates pluginapitester.RunPlugin such that, if a project directory is specified and contains a "godel/config/godel.yml" file, then any settings specified in the "environment" configuration are set as environment variables. (#971)

Copy link
Copy Markdown
Contributor

@tabboud tabboud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good, just 1 minor nit. Feel free to merge when ready

Comment on lines +105 to +106
if err := os.Setenv(k, v); err != nil {
return cleanup, errors.Wrapf(err, "failed to set environment variable %s=%s", k, v)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very minor nit, but should we also unset the env vars as part of cleanup?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants