Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(control-plane): [issue 4746] pool sufficiency metrics#4747

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
mabbott-aurorasolar wants to merge2 commits intogithub-aws-runners:main
base:main
Choose a base branch
Loading
frommabbott-aurorasolar:feat/issue-4746-sufficiency-metrics

Conversation

@mabbott-aurorasolar
Copy link

See#4746 for full context.

In short, this PR will add metrics (optionally) to record whether or not a given runner pool was sufficient to handle a job when it arrives. This will allow users (specifically, my company) to better understand whether we're right-sizing our pools or not.

Copy link
Contributor

CopilotAI left a comment

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 adds optional pool sufficiency metrics to track whether runner pools are adequately sized to handle incoming jobs. The feature allows users to monitor if their pool configurations are right-sized by recording metrics when jobs arrive.

  • Adds a newenable_pool_sufficiency configuration option across all relevant modules
  • Implements metric collection logic in the scale-up function to track pool adequacy
  • Includes comprehensive tests to verify the metric behavior under different scenarios

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
variables.tfAdds enable_pool_sufficiency option to root module metrics configuration
modules/runners/variables.tfAdds enable_pool_sufficiency option to runners module metrics configuration
modules/runners/scale-up.tfPasses pool sufficiency metric environment variable to scale-up Lambda
modules/runners/job-retry/variables.tfAdds enable_pool_sufficiency option to job-retry module configuration
modules/runners/job-retry/main.tfPasses pool sufficiency metric environment variable to job-retry Lambda
modules/multi-runner/variables.tfAdds enable_pool_sufficiency option to multi-runner module metrics configuration
lambdas/functions/control-plane/src/scale-runners/scale-up.tsImplements pool sufficiency metric collection logic
lambdas/functions/control-plane/src/scale-runners/scale-up.test.tsAdds comprehensive tests for pool sufficiency metric functionality
examples/multi-runner/main.tfDocuments the new enable_pool_sufficiency option in example
examples/default/main.tfDocuments the new enable_pool_sufficiency option in example

Tip: Customize your code reviews with copilot-instructions.md.Create the file orlearn how to get started.

Comment on lines +484 to +493
functioncreatePoolSufficiencyMetric(environment:string,payload:ActionRequestMessage,wasSufficient:boolean){
if(yn(process.env.ENABLE_METRIC_POOL_SUFFICIENCY,{default:false})){
constmetric=createSingleMetric('SufficientPoolHosts',MetricUnit.Count,wasSufficient ?1.0 :0.0,{
Environment:environment,
});
metric.addMetadata('Environment',environment);
metric.addMetadata('RepositoryName',payload.repositoryName);
metric.addMetadata('RepositoryOwner',payload.repositoryOwner);
}
}
Copy link

CopilotAISep 4, 2025

Choose a reason for hiding this comment

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

The Environment dimension is added twice - once in the metric creation and again as metadata. The dimension in the metric creation (line 487) should be sufficient for grouping metrics, making the duplicate metadata on line 489 redundant.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

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

I think this is not correct review comment. First time environment is added as dimension. addMetadata is only added in the log not as dimension, correct?

@npalm
Copy link
Member

@mabbott-aurorasolar thx for our PR. I have the next day not much time to dig in. Are you considering the PR ready? If not you can mark it as draft. I see no documentation, at least this part of the docs needs to be adjusted:https://github-aws-runners.github.io/terraform-aws-github-runner/configuration/#multiple-runner-module-in-your-aws-account

@mabbott-aurorasolar
Copy link
Author

@npalm great callout on the docs. I'll update those as well, and follow-up on copilot's suggestions. I honestly threw this together in an hour this morning and wasn't sure what the usual process on this repo is, but yeah I do think this is mostly feature complete.

@npalm
Copy link
Member

Sorry for keep you wainting. Will do my best to put the PR on the list for the next week.

@npalm
Copy link
Member

@mabbott-aurorasolar PR looks good in general, not tested yet. Did you had time to have a look at the docs?

@npalm
Copy link
Member

@mabbott-aurorasolar did you had time to check for an update on the docs?

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

Reviewers

@npalmnpalmnpalm left review comments

Copilot code reviewCopilotCopilot left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@mabbott-aurorasolar@npalm

[8]ページ先頭

©2009-2025 Movatter.jp