Skip to content

workaround(golang-github-prometheus-common): skip sigv4 tests#16610

Closed
christopherco wants to merge 1 commit intotomls/base/mainfrom
chrco/fix-golang-github-prometheus-common
Closed

workaround(golang-github-prometheus-common): skip sigv4 tests#16610
christopherco wants to merge 1 commit intotomls/base/mainfrom
chrco/fix-golang-github-prometheus-common

Conversation

@christopherco
Copy link
Copy Markdown
Collaborator

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.

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.
@christopherco christopherco marked this pull request as ready for review April 12, 2026 05:01
Copilot AI review requested due to automatic review settings April 12, 2026 05:01
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

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.toml with a %check overlay to skip sigv4 during %gocheck.
  • Remove the inline [components.golang-github-prometheus-common] entry from base/comps/components.toml to avoid duplicating the component definition now that a dedicated .comp.toml exists.

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'
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
regex = '%gocheck'
regex = '^%gocheck$'

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

@christopherco christopherco marked this pull request as draft April 12, 2026 07:08
@christopherco
Copy link
Copy Markdown
Collaborator Author

I might have a simpler method than this to resolve this issue. Bringing back to draft.

@christopherco
Copy link
Copy Markdown
Collaborator Author

Better version of this fix here - #16615

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.

3 participants