Skip to content

OCTO-850: Forward variable_overrides and source_repo through DeployGroupedResource#20

Merged
ishakun merged 1 commit into
mainfrom
OCTO-850_fix_deploy_grouped_resource_variable_overrides
Jul 8, 2026
Merged

OCTO-850: Forward variable_overrides and source_repo through DeployGroupedResource#20
ishakun merged 1 commit into
mainfrom
OCTO-850_fix_deploy_grouped_resource_variable_overrides

Conversation

@ishakun

@ishakun ishakun commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

DeployGroupedResource accepted neither variable_overrides nor source_repo, so neither was forwarded to the child Resource instances it constructed. As a result, any --variable-override values (e.g. deploySha) were silently unavailable inside all *-deploy.jsonnet and *-deploy.yaml.erb templates.

Example of using --variable-override "deploySha:${BUILDKITE_COMMIT}" and getting the following error (full error here):

ERROR:  While executing gem ... (RuntimeError)
--
  | error rendering ResourceSet from deployment/templates/cca/definitions.yaml
  | KeyError: key not found: "deploySha"

Add variable_overrides: and source_repo: as optional keyword arguments to DeployGroupedResource#initialize, store them, and pass them through to each Resource.new call in #render. Update ResourceSet#grouped_resources to supply both values.

Also fix a pre-existing broken require and wrong class reference (CLI::Arguments -> CLIArguments) in deploy_grouped_resource_spec, update all Resource.new and DeployGroupedResource.new expectations to include the new kwargs, and add explicit forwarding tests for both classes.

Bump version to 0.6.1.

…Resource

DeployGroupedResource accepted neither variable_overrides nor source_repo,
so neither was forwarded to the child Resource instances it constructed.
As a result, any --variable-override values (e.g. deploySha) were silently
unavailable inside all *-deploy.jsonnet and *-deploy.yaml.erb templates.

Add variable_overrides: and source_repo: as optional keyword arguments to
DeployGroupedResource#initialize, store them, and pass them through to each
Resource.new call in #render. Update ResourceSet#grouped_resources to supply
both values.

Also fix a pre-existing broken require and wrong class reference
(CLI::Arguments -> CLIArguments) in deploy_grouped_resource_spec, update all
Resource.new and DeployGroupedResource.new expectations to include the new
kwargs, and add explicit forwarding tests for both classes.

Bump version to 0.6.1.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings July 8, 2026 17:22
@ishakun
ishakun requested a review from a team as a code owner July 8, 2026 17:22
@ishakun
ishakun requested a review from yinonrousso July 8, 2026 17:22
@ishakun
ishakun requested review from ttstarck and removed request for yinonrousso July 8, 2026 17:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes missing propagation of variable_overrides and source_repo when rendering deploy-grouped templates, ensuring --variable-override values (e.g. deploySha) are available inside *-deploy.jsonnet and *-deploy.yaml.erb templates.

Changes:

  • Add optional variable_overrides: and source_repo: keyword args to DeployGroupedResource#initialize and forward them to each child Resource.
  • Update ResourceSet#grouped_resources to pass variable_overrides/source_repo through to DeployGroupedResource.
  • Fix spec requires/class reference, extend specs to assert forwarding behavior, and bump version to 0.6.1 with a changelog entry.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
spec/kubernetes_template_rendering/resource_set_spec.rb Updates expectations and adds coverage to ensure ResourceSet forwards variable_overrides/source_repo into DeployGroupedResource.
spec/kubernetes_template_rendering/deploy_grouped_resource_spec.rb Fixes require/class name usage and adds tests asserting forwarding into child Resource instances.
lib/kubernetes_template_rendering/resource_set.rb Forwards variable_overrides and source_repo when constructing DeployGroupedResource.
lib/kubernetes_template_rendering/deploy_grouped_resource.rb Accepts and forwards variable_overrides/source_repo to child Resource.new calls.
lib/kubernetes_template_rendering/version.rb Bumps gem version to 0.6.1.
Gemfile.lock Updates locked local gem version to 0.6.1.
CHANGELOG.md Documents the fix in the 0.6.1 release entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ttstarck ttstarck left a comment

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.

Nice find here! Thanks for fixing this!

@ishakun
ishakun merged commit 476cf6d into main Jul 8, 2026
8 checks passed
@ishakun
ishakun deleted the OCTO-850_fix_deploy_grouped_resource_variable_overrides branch July 8, 2026 17:32
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.

3 participants