amazon-cloudwatch-agent: Incorrect upper limit on golang version in Amazon Linux 2 rpm spec for v1.247352.0

Describe the bug I was building an rpm for the Cloudwatch Agent, using the spec from the srpm in Amazon Linux 2, and found that the spec file is setting an upper limit of golang that requires < 1.16.0 to build the rpm. That seems wrong, since this repo is declaring go 1.18 in go.mod.

Steps to reproduce

# yumdownloader --destdir . --source amazon-cloudwatch-agent
# rpm2cpio amazon-cloudwatch-agent-1.247352.0-1.amzn2.src.rpm | cpio -idv
# grep BuildRequires amazon-cloudwatch-agent.spec
BuildRequires: golang >= 1.13.0, golang < 1.16.0

What did you expect to see? I expected to be able to build the rpm with a newer version of golang. When I built v1.247350.0 previously, it worked fine. And I checked the prior srpm and it does not specify the upper limit in BuildRequires. So this is new to the spec for v1.247352.0.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 23 (11 by maintainers)

Most upvoted comments

Just so you know that I haven’t forgotten 😃 I just checked and it hasn’t rolled out yet. sudo yum install amazon-cloudwatch-agent still installs v352 right now. I will check in on it again next week. Sorry for the delay. AL2 updates aren’t controlled by our team

Thanks for all the follow-up and communication! Really appreciate it!

Sorry for the trouble this is causing you. v354 should be staged for the next release of Amazon Linux 2 (missed the last cutoff by like 2 days unfortunately), so I think early September is when this should be resolved for you

docker pull amazon/cloudwatch-agent:1.247354.0b25198101
Error response from daemon: manifest for amazon/cloudwatch-agent:1.247354.0b25198101 not found: manifest unknown: manifest unknown

Huh. Well I guess that’s worth looking into. I’m not sure how I didn’t see an error during release.

I think mid-August is when you should expect a new version to be out, though that RPM is actually for one version further, v1.247354.0, just so you don’t get blindsided by it when that happens - no go mod changes in that one.

Building on 1.16 would be fine. The problem is outdated dependencies that the agent uses under-the-hood would not build on Go 1.17, so we were stuck juggling releasing v352 with ripping everything out and making it all work on Go >= 1.17. Apologies for the inconvenience. Just wanted to shed some light on why the upper limit was imposed. IIRC we removed it after that for 1.247353.0 since we jumped to Go 1.18 by then.