Skip to content

fix(logging): update log_class to log_group_class in CloudWatch agent configuration#5073

Merged
Brend-Smits merged 1 commit intogithub-aws-runners:mainfrom
Noah-mh:fix/cloudwatch-agent-log-group-class
Mar 18, 2026
Merged

fix(logging): update log_class to log_group_class in CloudWatch agent configuration#5073
Brend-Smits merged 1 commit intogithub-aws-runners:mainfrom
Noah-mh:fix/cloudwatch-agent-log-group-class

Conversation

@Noah-mh
Copy link
Copy Markdown
Contributor

@Noah-mh Noah-mh commented Mar 18, 2026

Description

CloudWatch agent config stored in SSM used log_class inside each collect_list entry. The agent’s JSON schema only allows log_group_class there, so validation failed with “Additional property log_class is not allowed” and runner user-data exited before the GitHub runner started (issue #5065).

This PR maps the Terraform log_class value to log_group_class in the serialized logfiles blob passed to cloudwatch_config.json, and updates loggroups_classes to read log_group_class from local.logfiles so aws_cloudwatch_log_group behavior stays aligned.

Test Plan

  • terraform validate from repo root
  • pre-commit run --all-files (or tflint on modules/runners)

Related Issues

Fixes #5065

@Noah-mh Noah-mh requested a review from a team as a code owner March 18, 2026 05:32
Copilot AI review requested due to automatic review settings March 18, 2026 05:32
Copy link
Copy Markdown
Contributor

Copilot AI 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

Updates the CloudWatch Agent log collection configuration in the runners Terraform module to use the correct field name for log group class, aligning the generated collect_list entries with the CloudWatch Agent configuration schema.

Changes:

  • Renamed the CloudWatch Agent collect_list field from log_class to log_group_class in the rendered log file config objects.
  • Updated downstream local computation (loggroups_classes) to reference the renamed field.

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

Copy link
Copy Markdown
Contributor

@Brend-Smits Brend-Smits left a comment

Choose a reason for hiding this comment

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

Hey @Noah-mh,

I appreciate you stepping in to fix this bug. I've confirmed this has fixed the problem that was described in the original issue.
Code looks fine to me, so ready to merge this!

Thanks!

@Brend-Smits
Copy link
Copy Markdown
Contributor

Ahh small comment though, @Noah-mh can you please rebase and verify/sign your commits?
Otherwise I can't merge this fix.

I'm happy to do so for you, but then your commits will partially change to my name.

@Brend-Smits Brend-Smits enabled auto-merge (squash) March 18, 2026 09:20
@Noah-mh
Copy link
Copy Markdown
Contributor Author

Noah-mh commented Mar 18, 2026

Hey @Brend-Smits , thanks a lot for reviewing and confirming the fix.

Yep, absolutely. I’ll rebase onto the latest main and verify/sign the commits, then force-push the updated branch shortly. Appreciate the heads-up.

… configuration

This commit corrects the parameter name in the CloudWatch agent's collect_list schema from `log_class` to `log_group_class` to align with the expected schema. The change ensures that the logging configuration accurately reflects the required structure for log group definitions.
auto-merge was automatically disabled March 18, 2026 13:19

Head branch was pushed to by a user without write access

@Noah-mh Noah-mh force-pushed the fix/cloudwatch-agent-log-group-class branch from 0d737b4 to 928d4c5 Compare March 18, 2026 13:19
@Noah-mh
Copy link
Copy Markdown
Contributor Author

Noah-mh commented Mar 18, 2026

Hey @Brend-Smits , done. I rebased (already up to date) and signed. Thanks.

@Brend-Smits Brend-Smits merged commit 6d3b7db into github-aws-runners:main Mar 18, 2026
41 checks passed
@Noah-mh Noah-mh deleted the fix/cloudwatch-agent-log-group-class branch March 18, 2026 18:41
Brend-Smits pushed a commit that referenced this pull request Apr 1, 2026
… configuration (#5073)

### Description
CloudWatch agent config stored in SSM used log_class inside each
collect_list entry. The agent’s JSON schema only allows log_group_class
there, so validation failed with “Additional property log_class is not
allowed” and runner user-data exited before the GitHub runner started
([issue
#5065](#5065)).

This PR maps the Terraform log_class value to log_group_class in the
serialized logfiles blob passed to cloudwatch_config.json, and updates
loggroups_classes to read log_group_class from local.logfiles so
aws_cloudwatch_log_group behavior stays aligned.

## Related Issues

Fixes
[#5065](#5065)
npalm added a commit that referenced this pull request Apr 1, 2026
🤖 I have created a release *beep* *boop*
---


##
[7.6.0](v7.5.0...v7.6.0)
(2026-04-01)


### Features

* **runner:** add source parameter to distinguish between scale-up and
pool lambda
([#5054](#5054))
([efbaa6f](efbaa6f))


### Bug Fixes

* **lambda:** bump flatted from 3.3.1 to 3.4.2 in /lambdas
([#5075](#5075))
([67a70d7](67a70d7))
* **lambda:** bump path-to-regexp from 8.2.0 to 8.4.0 in /lambdas
([#5082](#5082))
([25ec471](25ec471))
* **lambda:** bump the aws group in /lambdas with 7 updates
([#5071](#5071))
([c3dcce2](c3dcce2))
* **logging:** update log_class to log_group_class in CloudWatch agent
configuration
([#5073](#5073))
([6d3b7db](6d3b7db))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: runners-releaser[bot] <194412594+runners-releaser[bot]@users.noreply.github.com>
Co-authored-by: Niek Palm <npalm@users.noreply.github.com>
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.

Bug: log_class in CloudWatch agent config causes boot failure

3 participants