Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netdata: 1.46.1 -> 1.47.0 #336919

Merged
merged 1 commit into from
Sep 5, 2024
Merged

netdata: 1.46.1 -> 1.47.0 #336919

merged 1 commit into from
Sep 5, 2024

Conversation

rhoriguchi
Copy link
Contributor

@rhoriguchi rhoriguchi commented Aug 24, 2024

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@rhoriguchi
Copy link
Contributor Author

rhoriguchi commented Aug 24, 2024

Hi @pedorich-n @RaitoBezarius, any ideas why this does not build successfully?

@pedorich-n
Copy link
Contributor

pedorich-n commented Aug 24, 2024

Thank you for the PR! I've been meaning to look at the 1.47.0 update, but haven't had a chance yet.

I don't fully understand why it's failing, but I think I managed to "narrow it down" to go modules. When I add the following to the cmakeFlags the build succeeds.

(lib.cmakeBool "ENABLE_PLUGIN_GO" false)

I don't know if it's normal for Go builds in Nix, but I see a lot of connection refused for Go modules in the logs. Is it possible that Cmake doesn't use the pre-built Go modules and tries to download them during the build and that's why it fails?

Examples of such logs:

cmd/godplugin/main.go:22:2: github.com/jessevdk/[email protected]: Get "https://proxy.golang.org/github.com/jessevdk/go-flags/@v/v1.6.1.zip": dial tcp: lookup proxy.golang.org on [::1]:53: read udp [::1]:34113->[::1]:53: read: connection refused
logger/handler.go:10:2: github.com/lmittmann/[email protected]: Get "https://proxy.golang.org/github.com/lmittmann/tint/@v/v1.0.5.zip": dial tcp: lookup proxy.golang.org on [::1]:53: read udp [::1]:53330->[::1]:53: read: connection refused
logger/default.go:9:2: github.com/mattn/[email protected]: Get "https://proxy.golang.org/github.com/mattn/go-isatty/@v/v0.0.20.zip": dial tcp: lookup proxy.golang.org on [::1]:53: read udp [::1]:52453->[::1]:53: read: connection refused
plugin/go.d/agent/confgroup/config.go:14:2: github.com/ilyam8/[email protected]: Get "https://proxy.golang.org/github.com/ilyam8/hashstructure/@v/v1.1.0.zip": dial tcp: lookup proxy.golang.org on [::1]:53: read udp [::1]:46704->[::1]:53: read: connection refused
...

Also, there's this in the logs

FAILED: go.d.plugin /build/source/build/go.d.plugin

@RaitoBezarius
Copy link
Member

Apologies I moved away from netdata, so I don't really maintain it anymore.

@rhoriguchi
Copy link
Contributor Author

rhoriguchi commented Aug 28, 2024

What I could deduce is that the go closure has the required modules. I think the issue is that it's not using it as intended.

> nix-build -A netdata.netdata-go-modules 
Finished at 19:24:03 after 0s
/nix/store/xiapjp91jwhv5kr776pqwsnn0fhpqsw7-netdata-go-plugins-1.47.0-go-modules

> find /nix/store/xiapjp91jwhv5kr776pqwsnn0fhpqsw7-netdata-go-plugins-1.47.0-go-modules -name 'go-flags'
/nix/store/xiapjp91jwhv5kr776pqwsnn0fhpqsw7-netdata-go-plugins-1.47.0-go-modules/github.com/jessevdk/go-flags

EDIT

Found the culprit https://github.com/netdata/netdata/blob/6a75ccdfd73b6fbf3bb6e2f92887f1e23ede3fd6/packaging/cmake/Modules/NetdataGoTools.cmake#L36C75-L36C107. GOPROXY variable gets manually set.

COMMAND "${CMAKE_COMMAND}" -E env GOROOT=${GO_ROOT} CGO_ENABLED=0 GOPROXY=https://proxy.golang.org,direct "${GO_EXECUTABLE}" build -buildvcs=false -ldflags "${GO_LDFLAGS}" -o "${CMAKE_BINARY_DIR}/${output}" "./${build_dir}"

@rhoriguchi rhoriguchi force-pushed the netdata-newer branch 4 times, most recently from 719ee8c to 8ebc72d Compare August 28, 2024 19:40
@rhoriguchi rhoriguchi marked this pull request as ready for review August 28, 2024 19:47
@rhoriguchi rhoriguchi mentioned this pull request Aug 28, 2024
13 tasks
@Izorkin
Copy link
Contributor

Izorkin commented Aug 28, 2024

Error build with enable log management:

rror: builder for '/nix/store/sn2qkrkn89d8s1vsq38jimyjjcs66gbs-netdata-1.47.0.drv' failed with exit code 1;
       last 10 log lines:
       > -- Installing: /nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/share/netdata/web/registry-hello.html
       > -- Installing: /nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/share/netdata/web/switch.html
       > -- Installing: /nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/share/netdata/web/ilove.html
       > -- Installing: /nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/share/netdata/web/old/index.html
       > -- Installing: /nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/share/netdata/web/static/img/netdata-logomark.svg
       > -- Installing: /nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/share/netdata/web/css/morris-0.5.1.css
       > -- Installing: /nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/share/netdata/web/css/c3-0.4.18.min.css
       > -- Installing: /nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/share/netdata/web/.well-known/dnt/cookies
       > -- Installing: /nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/share/netdata/web/v0/index.html
       > mv: cannot stat '/nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/libexec/netdata/plugins.d/logs-management.plugin': No such file or directory
       For full logs, run 'nix log /nix/store/sn2qkrkn89d8s1vsq38jimyjjcs66gbs-netdata-1.47.0.drv'.

@rhoriguchi
Copy link
Contributor Author

Error build with enable log management:

rror: builder for '/nix/store/sn2qkrkn89d8s1vsq38jimyjjcs66gbs-netdata-1.47.0.drv' failed with exit code 1;
       last 10 log lines:
       > -- Installing: /nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/share/netdata/web/registry-hello.html
       > -- Installing: /nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/share/netdata/web/switch.html
       > -- Installing: /nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/share/netdata/web/ilove.html
       > -- Installing: /nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/share/netdata/web/old/index.html
       > -- Installing: /nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/share/netdata/web/static/img/netdata-logomark.svg
       > -- Installing: /nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/share/netdata/web/css/morris-0.5.1.css
       > -- Installing: /nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/share/netdata/web/css/c3-0.4.18.min.css
       > -- Installing: /nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/share/netdata/web/.well-known/dnt/cookies
       > -- Installing: /nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/share/netdata/web/v0/index.html
       > mv: cannot stat '/nix/store/q37kqdfsyi5wxdc5nq0860wn376fqdb9-netdata-1.47.0/libexec/netdata/plugins.d/logs-management.plugin': No such file or directory
       For full logs, run 'nix log /nix/store/sn2qkrkn89d8s1vsq38jimyjjcs66gbs-netdata-1.47.0.drv'.

I've missed that it was removed netdata/netdata#18186

@pedorich-n
Copy link
Contributor

changefinder was also dropped: netdata/netdata#18370
I believe it was added only because of netdata, and used only here:


But I don't know what is the process of removing something from nixpkgs. Probably it's better to do in a separate PR.

@alyssais alyssais merged commit 737d1ff into NixOS:master Sep 5, 2024
38 checks passed
@rhoriguchi rhoriguchi deleted the netdata-newer branch September 5, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants