Merge ~sergiodj/prometheus-snap:update-prometheus-2.25.2-21.04 into prometheus-snap:21.04

Proposed by Sergio Durigan Junior
Status: Merged
Merged at revision: 31696e97861fcc492ce734585512808138995025
Proposed branch: ~sergiodj/prometheus-snap:update-prometheus-2.25.2-21.04
Merge into: prometheus-snap:21.04
Diff against target: 25 lines (+4/-3)
1 file modified
snapcraft.yaml (+4/-3)
Reviewer Review Type Date Requested Status
Bryce Harrington Approve
prometheus-snap-developers Pending
Lucas Kanashiro Pending
Canonical Server Pending
Review via email: mp+400417@code.launchpad.net

Description of the change

This MP updates the prometheus snap to package the latest upstream version, 2.25.2. It also updates snapcraft to use core20 instead of core18.

I've tested it on a VM and everything seems to be working, but I would certainly appreciate the feedback of other people here.

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

Ah, just a clarification: this MP targets the 21.04 branch/track, so it will not affect the "latest" track.

Revision history for this message
Bryce Harrington (bryce) wrote :
Download full text (8.9 KiB)

You're also setting NODE_ENV and dropping go-importpath. I am guessing that's because the former is required for building the new package, while the latter isn't?

A test build of the package succeeded for me locally:

stirling:~/pkg/Oci/prometheus-snap$ snapcraft
Launching a VM.
snap "snapd" has no updates available
Skipping pull prometheus (already ran)
Skipping pull snap-wrappers (already ran)
Building prometheus
+ set -x
+ NODE_ENV=production
+ npm install yarn -g

> yarn@1.22.10 preinstall /usr/local/lib/node_modules/yarn
> :; (node ./preinstall.js > /dev/null 2>&1 || true)

/usr/local/bin/yarn -> /usr/local/lib/node_modules/yarn/bin/yarn.js
/usr/local/bin/yarnpkg -> /usr/local/lib/node_modules/yarn/bin/yarn.js
+ yarn@1.22.10
updated 1 package in 1.37s
+ make common-test-short
>> running short tests
GO111MODULE=on go test -short ./...
ok github.com/prometheus/prometheus/cmd/prometheus (cached)
ok github.com/prometheus/prometheus/cmd/promtool (cached)
ok github.com/prometheus/prometheus/config (cached)
ok github.com/prometheus/prometheus/discovery (cached)
ok github.com/prometheus/prometheus/discovery/azure (cached)
ok github.com/prometheus/prometheus/discovery/consul (cached)
ok github.com/prometheus/prometheus/discovery/digitalocean (cached)
ok github.com/prometheus/prometheus/discovery/dns (cached)
ok github.com/prometheus/prometheus/discovery/dockerswarm (cached)
? github.com/prometheus/prometheus/discovery/ec2 [no test files]
ok github.com/prometheus/prometheus/discovery/eureka (cached)
ok github.com/prometheus/prometheus/discovery/file (cached)
? github.com/prometheus/prometheus/discovery/gce [no test files]
ok github.com/prometheus/prometheus/discovery/hetzner (cached)
? github.com/prometheus/prometheus/discovery/install [no test files]
ok github.com/prometheus/prometheus/discovery/kubernetes (cached)
ok github.com/prometheus/prometheus/discovery/marathon (cached)
ok github.com/prometheus/prometheus/discovery/openstack (cached)
ok github.com/prometheus/prometheus/discovery/refresh (cached)
ok github.com/prometheus/prometheus/discovery/targetgroup (cached)
ok github.com/prometheus/prometheus/discovery/triton (cached)
ok github.com/prometheus/prometheus/discovery/zookeeper (cached)
ok github.com/prometheus/prometheus/documentation/examples/custom-sd/adapter (cached)
? github.com/prometheus/prometheus/documentation/examples/custom-sd/adapter-usage [no test files]
? github.com/prometheus/prometheus/documentation/examples/remote_storage/example_write_adapter [no test files]
? github.com/prometheus/prometheus/documentation/examples/remote_storage/remote_storage_adapter [no test files]
ok github.com/prometheus/prometheus/documentation/examples/remote_storage/remote_storage_adapter/graphite (cached)
ok github.com/prometheus/prometheus/documentation/examples/remote_storage/remote_storage_adapter/influxdb (cached)
ok github.com/prometheus/prometheus/documentation/examples/remote_storage/remote_storage_adapter/opentsdb (cached)
ok github.com/prometheus/prometheus/notifier (cached)
? github.com/prometheus/prometheus/pkg/exemplar [...

Read more...

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

On Tuesday, March 30 2021, Bryce Harrington wrote:

> You're also setting NODE_ENV and dropping go-importpath. I am guessing that's because the former is required for building the new package, while the latter isn't?

Thanks for the review, Bryce.

So, NODE_ENV may not be required, but as far as I understand it's a good
practice (I found similar scenarios in other snaps). As for dropping
go-importpath, it's a requirement for the core20 bump, since it's not a
supported directive anymore.

> A test build of the package succeeded for me locally:

Thanks for double checking. I will wait until tomorrow to see if anyone
else has any feedback about this MP, and then merge it (and trigger new
builds for the 21.04 track).

Thanks,

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

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 908dcc3..656839b 100644
3--- a/snapcraft.yaml
4+++ b/snapcraft.yaml
5@@ -1,6 +1,6 @@
6 name: prometheus
7-version: 2.20.1
8-base: core18
9+version: 2.25.2
10+base: core20
11 grade: stable
12 summary: The Prometheus monitoring system and time series database
13 description: |
14@@ -33,9 +33,10 @@ parts:
15 go-channel: 1.14/stable
16 source: https://github.com/prometheus/prometheus.git
17 source-tag: v${SNAPCRAFT_PROJECT_VERSION}
18- go-importpath: github.com/prometheus/prometheus
19 build-packages: [build-essential, curl, make, npm]
20 override-build: |
21+ set -x
22+ NODE_ENV="production"
23 npm install yarn -g
24 make common-test-short
25 make build

Subscribers

People subscribed via source and target branches