OCTO-850: Forward variable_overrides and source_repo through DeployGroupedResource#20
Merged
ishakun merged 1 commit intoJul 8, 2026
Conversation
…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>
There was a problem hiding this comment.
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:andsource_repo:keyword args toDeployGroupedResource#initializeand forward them to each childResource. - Update
ResourceSet#grouped_resourcesto passvariable_overrides/source_repothrough toDeployGroupedResource. - Fix spec requires/class reference, extend specs to assert forwarding behavior, and bump version to
0.6.1with 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
approved these changes
Jul 8, 2026
ttstarck
left a comment
Contributor
There was a problem hiding this comment.
Nice find here! Thanks for fixing this!
ishakun
deleted the
OCTO-850_fix_deploy_grouped_resource_variable_overrides
branch
July 8, 2026 17:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):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.