Skip to content

refactor(executor): add NewLocalWithConfig and replace string literals with type constants#1049

Merged
Soner (shyim) merged 3 commits into
nextfrom
refactor/executor-configurable-local-executor
May 22, 2026
Merged

refactor(executor): add NewLocalWithConfig and replace string literals with type constants#1049
Soner (shyim) merged 3 commits into
nextfrom
refactor/executor-configurable-local-executor

Conversation

@shyim

Copy link
Copy Markdown
Member

Summary

  • Add NewLocalWithConfig factory function to create local executors with project and environment configuration
  • Replace magic string literals in factory.go with exported type constants (TypeLocal, TypeSymfonyCLI, TypeDocker)
  • Refactor NewLocal to delegate to NewLocalWithConfig for consistency
  • Update CI command to use NewLocalWithConfig directly and restructure config loading
  • Configure the executor in extension build/zip commands when ShopwareRoot is set

Test plan

  • go test ./internal/executor/... passes
  • go build ./... succeeds

…s with type constants

Add NewLocalWithConfig factory function for creating local executors with
project and environment configuration. Refactor NewLocal to delegate to it.
Replace magic string literals in factory.go with exported type constants.
Update CI command to use NewLocalWithConfig directly, and configure the
executor in extension build/zip commands when ShopwareRoot is set.
@shyim Soner (shyim) changed the base branch from main to next May 22, 2026 05:29
@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

return env, nil

P1 Badge Reject nil environment entries in ResolveEnvironment

When an environment key exists but is set to null (for example environments.local: null), this function returns nil, nil instead of an error. That nil is passed to executor.New(...), which immediately dereferences cfg.Type in internal/executor/factory.go and crashes with a nil-pointer panic, turning a user config mistake into a hard process crash. Please validate env != nil before returning it and surface a descriptive config error.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

@shyim Soner (shyim) merged commit 3fe3d0d into next May 22, 2026
2 checks passed
@shyim Soner (shyim) deleted the refactor/executor-configurable-local-executor branch May 22, 2026 05:52
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