workaround(golang-github-prometheus-common): skip sigv4 tests#16610
workaround(golang-github-prometheus-common): skip sigv4 tests#16610christopherco wants to merge 1 commit intotomls/base/mainfrom
Conversation
The sigv4 subpackage depends on the AWS SDK (github.com/aws/aws-sdk-go) which requires github.com/jmespath/go-jmespath. Neither is available in the Azure Linux build tag. Skip the sigv4 directory in %gocheck to avoid the missing dependency during tests. Build verified locally; package contents inspected in mock.
There was a problem hiding this comment.
Pull request overview
Introduces an Azure Linux-specific overlay for golang-github-prometheus-common to skip sigv4 tests that pull in AWS SDK dependencies not available in the Azure Linux build tag.
Changes:
- Add a dedicated
golang-github-prometheus-common.comp.tomlwith a%checkoverlay to skipsigv4during%gocheck. - Remove the inline
[components.golang-github-prometheus-common]entry frombase/comps/components.tomlto avoid duplicating the component definition now that a dedicated.comp.tomlexists.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| base/comps/golang-github-prometheus-common/golang-github-prometheus-common.comp.toml | Adds a %check overlay to skip sigv4 tests due to unavailable AWS-related Go dependencies. |
| base/comps/components.toml | Removes the inline component entry since the dedicated .comp.toml is picked up via includes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| description = "Skip sigv4 tests — requires AWS SDK packages not available in Azure Linux" | ||
| type = "spec-search-replace" | ||
| section = "%check" | ||
| regex = '%gocheck' |
There was a problem hiding this comment.
The spec-search-replace pattern regex = '%gocheck' is not anchored, so it would also rewrite substrings like %gocheck2 or %gocheck embedded in a longer line if upstream changes the %check section later. Consider tightening the regex to match the full %gocheck invocation (e.g., anchor to the start/end of the line) so the overlay only affects the intended command.
| regex = '%gocheck' | |
| regex = '^%gocheck$' |
There was a problem hiding this comment.
might be good to change this regexp, but for now the check section looks to only contain %gocheck
%if %{without bootstrap}
%if %{with check}
%check
# Go 1.18 deprecated SHA1-RSA
export GODEBUG=x509sha1=1
%gocheck
%endif
%endif
| description = "Skip sigv4 tests — requires AWS SDK packages not available in Azure Linux" | ||
| type = "spec-search-replace" | ||
| section = "%check" | ||
| regex = '%gocheck' |
There was a problem hiding this comment.
might be good to change this regexp, but for now the check section looks to only contain %gocheck
%if %{without bootstrap}
%if %{with check}
%check
# Go 1.18 deprecated SHA1-RSA
export GODEBUG=x509sha1=1
%gocheck
%endif
%endif
|
I might have a simpler method than this to resolve this issue. Bringing back to draft. |
|
Better version of this fix here - #16615 |
The sigv4 subpackage depends on the AWS SDK (github.com/aws/aws-sdk-go) which requires github.com/jmespath/go-jmespath. Neither is available in the Azure Linux build tag. Skip the sigv4 directory in %gocheck to avoid the missing dependency during tests.
Build verified locally; package contents inspected in mock.