Merge ~sergiodj/prometheus-snap:skip-template-test into prometheus-snap:20.04

Proposed by Sergio Durigan Junior
Status: Merged
Merged at revision: 1b2094787d502766b2d065b5f59486c163f03d7d
Proposed branch: ~sergiodj/prometheus-snap:skip-template-test
Merge into: prometheus-snap:20.04
Diff against target: 21 lines (+10/-0)
1 file modified
snapcraft.yaml (+10/-0)
Reviewer Review Type Date Requested Status
Athos Ribeiro Approve
Canonical Server Pending
Review via email: mp+414438@code.launchpad.net

Description of the change

This MP temporarily disables the template_test.go testcase because it is failing on non-amd64 architectures.

This is most likely caused by the architecture-dependent way that Go performs the conversion between floats and ints, which affects this specific test. For more details, see:

https://github.com/prometheus/prometheus/issues/10185

To post a comment you must log in.
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

FWIW, I took the liberty to leave a "reminder" that will make the build fail when we update the snap, so that we remember to remove this temporary hack (which will be hopefully fixed by then).

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

You are missing a "then" statement for the if/else block there. Other than that, LGTM!

review: Needs Fixing
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

On Thursday, January 20 2022, Athos Ribeiro wrote:

> You are missing a "then" statement for the if/else block there. Other than that, LGTM!

Ops, thanks Athos, I've fixed it.

--
Sergio
GPG key ID: E92F D0B3 6B14 F1F4 D8E0 EB2F 106D A1C8 C3CB BF14

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Thanks! LGTM :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/snapcraft.yaml b/snapcraft.yaml
2index 3e6d880..05401d6 100644
3--- a/snapcraft.yaml
4+++ b/snapcraft.yaml
5@@ -52,6 +52,16 @@ parts:
6 export PATH=/usr/local/lib/nodejs/node-v${NODE_VERSION}-linux-${NODE_ARCH}/bin:$PATH
7 NODE_ENV="production"
8 npm install yarn -g
9+ # See https://github.com/prometheus/prometheus/issues/10185
10+ # for an explanation regarding the snippet below.
11+ if [ "${SNAPCRAFT_PROJECT_VERSION}" = "2.32.1" ]; then
12+ rm -fv template/template_test.go
13+ else
14+ echo
15+ echo "FIXME: Please verify if the template/template_test.go still fails."
16+ echo
17+ exit 1
18+ fi
19 make build
20 make common-test-short
21 mkdir -p $SNAPCRAFT_PART_INSTALL/bin

Subscribers

People subscribed via source and target branches