Repository navigation
feat(runners): merge launch template tags into the launch request tags - #5577
Open
seeeun-cho wants to merge 2 commits into
Open
seeeun-cho wants to merge 2 commits into
seeeun-cho wants to merge 2 commits into
Conversation
seeeun-cho
force-pushed
the
feat/propagate-runner-ec2-tags-to-fleet
branch
from
November 5, 2026 09:53
5a3f7de to
e6aef8b
Compare
seeeun-cho
marked this pull request as ready for review
November 5, 2026 09:56
…equests runner_ec2_tags was only applied to the launch template tag specifications. CreateFleet and RunInstances requests carried only the module-owned ghr:* tags, so organization policies that evaluate aws:RequestTag (for example SCPs that deny ec2:RunInstances unless mandatory tags are present) rejected every launch even when runner_ec2_tags contained the required tags. Pass runner_ec2_tags to the scale-up and pool lambdas as RUNNER_EC2_TAGS and merge them into the instance, volume and fleet tags on both the CreateFleet and RunInstances paths. Module-owned ghr:* tags are applied last so callers cannot override them. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
seeeun-cho
force-pushed
the
feat/propagate-runner-ec2-tags-to-fleet
branch
from
November 5, 2026 10:02
e6aef8b to
5ad3fbd
Compare
seeeun-cho
marked this pull request as draft
November 5, 2026 10:35
seeeun-cho
marked this pull request as ready for review
November 5, 2026 10:35
Contributor
|
@seeeun-cho How about describe the launch template and get the tags specifications and merge the tags defined in ts code with the tags defined in the tf code? |
…ER_EC2_TAGS Address review feedback: instead of passing runner_ec2_tags to the Lambdas via a new RUNNER_EC2_TAGS environment variable, describe the default version of the launch template used for the request and merge its instance and volume tag specifications into the CreateFleet and RunInstances tag specifications. This removes the Terraform changes (no new environment variable, no pool or scale-up wiring) and also covers tags defined through the tags variable. Module-owned ghr:* tags are still applied last and take precedence. If the launch template cannot be described, only the module-owned tags are sent. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Author
|
Hi @edersonbrilhante, thanks for the suggestion. |
This branch has not been deployed
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.
Description
Tags defined on the launch template (
tags,runner_ec2_tags) are not part of theCreateFleetandRunInstancesrequests made by the scale-up and pool Lambdas, which only carry the module-ownedghr:*tags. Organization policies that evaluateaws:RequestTag(for example an SCP that deniesec2:RunInstancesunless mandatory tags are present) therefore reject every launch, even when the tags are set in Terraform.This change (following the review suggestion):
$Defaultversion of the launch template used for the request and reads itsinstanceandvolumetag specifications;CreateFleetandRunInstancespaths (the fleet tags use the instance tags);ghr:*tags last, so they take precedence;There are no Terraform changes: no new environment variable, and the scale-up role already has
ec2:DescribeLaunchTemplateVersions.Behavior note: each launch now makes one extra
DescribeLaunchTemplateVersionscall (two when the on-demand failover retries). Three existing failover tests asserted the position ofCreateFleetin the overall call order, so their ordinals were updated.Not covered: the experimental
modules/compute-providerspath, which has its own tag semantics. Happy to extend it if maintainers prefer.Test Plan
runners.test.ts: the$Defaultlaunch template version is read, template tags are merged into the instance, volume and fleet tags ofCreateFleet, merged intoRunInstances, module-ownedghr:*tags take precedence, and fallback when the template cannot be described. The merge tests fail without the change torunners.ts.Related Issues
None found.
🤖 Generated with Claude Code