meln5674 / grafana-mongodb-community-plugin

Open Source Grafana Plugin for querying MongoDB
GNU Affero General Public License v3.0
130 stars 17 forks source link

Debian 9 LTS ending / mage version issue #20

Open lpnc opened 1 year ago

lpnc commented 1 year ago

Hi, I tried to build the plugin with docker and got :

Debian

Issue

[+] Building 3.7s (5/20)                                                                                                                                                                                      
 => [internal] load build definition from build-env.Dockerfile                                                                                                                                           0.0s
 => => transferring dockerfile: 48B                                                                                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                                                                          0.0s
 => [internal] load metadata for docker.io/library/debian:9                                                                                                                                              0.4s
 => CACHED [base 1/2] FROM docker.io/library/debian:9@sha256:c5c5200ff1e9c73ffbf188b4a67eb1c91531b644856b4aefe86a58d2f0cb05be                                                                            0.0s
 => ERROR [base 2/2] RUN apt-get update && apt-get install -y curl xz-utils git gcc g++ zip unzip make                                                                                                   3.2s
------                                                                                                                                                                                                        
 > [base 2/2] RUN apt-get update && apt-get install -y curl xz-utils git gcc g++ zip unzip make:                                                                                                              
#5 0.480 Ign:1 http://security.debian.org/debian-security stretch/updates InRelease                                                                                                                           
#5 0.482 Ign:2 http://deb.debian.org/debian stretch InRelease                                                                                                                                                 
#5 0.488 Ign:3 http://security.debian.org/debian-security stretch/updates Release                                                                                                                             
#5 0.491 Ign:4 http://deb.debian.org/debian stretch-updates InRelease                                                                                                                                         
#5 0.567 Ign:5 http://security.debian.org/debian-security stretch/updates/main all Packages
#5 0.568 Ign:6 http://deb.debian.org/debian stretch Release
#5 0.665 Ign:7 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
#5 0.665 Ign:8 http://deb.debian.org/debian stretch-updates Release
#5 0.674 Ign:5 http://security.debian.org/debian-security stretch/updates/main all Packages
#5 0.674 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages
#5 1.023 Ign:10 http://deb.debian.org/debian stretch/main all Packages
#5 1.023 Ign:7 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
#5 1.173 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
#5 1.178 Ign:5 http://security.debian.org/debian-security stretch/updates/main all Packages
#5 1.320 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
#5 1.320 Ign:7 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
#5 1.328 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages
#5 1.328 Ign:5 http://security.debian.org/debian-security stretch/updates/main all Packages
#5 1.341 Ign:10 http://deb.debian.org/debian stretch/main all Packages
#5 1.625 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
#5 1.625 Ign:7 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
#5 1.948 Ign:5 http://security.debian.org/debian-security stretch/updates/main all Packages
#5 1.951 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
#5 2.067 Ign:7 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
#5 2.076 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages
#5 2.105 Ign:5 http://security.debian.org/debian-security stretch/updates/main all Packages
#5 2.122 Ign:10 http://deb.debian.org/debian stretch/main all Packages
#5 2.238 Err:7 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
#5 2.238   404  Not Found [IP: 151.101.194.132 80]
#5 2.396 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
#5 2.416 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
#5 2.745 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages
#5 2.769 Ign:10 http://deb.debian.org/debian stretch/main all Packages
#5 2.811 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
#5 2.861 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
#5 2.878 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages
#5 2.912 Ign:10 http://deb.debian.org/debian stretch/main all Packages
#5 2.923 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
#5 2.995 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
#5 3.087 Err:9 http://deb.debian.org/debian stretch/main amd64 Packages
#5 3.087   404  Not Found
#5 3.129 Ign:10 http://deb.debian.org/debian stretch/main all Packages
#5 3.148 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
#5 3.187 Err:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
#5 3.187   404  Not Found
#5 3.194 Reading package lists...
#5 3.204 W: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file.
#5 3.204 W: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file.
#5 3.204 W: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file.
#5 3.204 E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/main/binary-amd64/Packages  404  Not Found [IP: 151.101.194.132 80]
#5 3.204 E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/binary-amd64/Packages  404  Not Found
#5 3.204 E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/main/binary-amd64/Packages  404  Not Found
#5 3.204 E: Some index files failed to download. They have been ignored, or old ones used instead.

I suppose it is linked to Debian 9 end of support.

Solution

changed ARG BASE_IMAGE=docker.io/library/debian:9 with ARG BASE_IMAGE=docker.io/library/debian:latest

Mage

Issue

i then got this issue : ERROR [go 2/2] RUN go install github.com/magefile/mage@v1.13.0

Solution

I change the line in the Dockerfile: RUN go install github.com/magefile/mage@v1.13.0 by RUN go install github.com/magefile/mage@v1.15.0

Not sure if it is a solid fix but it seems to work.

thanks @meln5674 for the plugin, would really love make it more mature.