grafana: 10.3.3 -> 10.4.0, explicitly declare subPackages, halve build time, reduce closure size by ~11.5% #292997
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
Closes #294020.
The build itself is pretty quick now:
in contrast to
before on the same machine (Hetzner AX41 NVMe with AMD Ryzen 5 3600 6-Core Processor and 64GiB RAM).
Downside of that is that no tests are now executed, but I'm inclined to make that sacrifice for now. Especially considering that a fix for that is on the horizon with #284568.
Note: a draft until we have agreed on whether it's OK to ignore the tests (and whether we should proactively remove the test skip code-paths or wait for #284568).Grafana from this branch works fine and nobody has stepped up so far.
Tested on my personal instance and I haven't spotted an issue so far.
This also decreases the runtime closure size from
419.1M
to371.0M
(~11.5% reduction).I analyzed this with
diffoscope
. The only file that changed isbin/grafana
:To me this seems like a non-function difference.
Also, the executables
bin/cmd
,bin/kinds
,bin/openapi3
,bin/standalone
are gone now.bin/cmd
seems like a testing tool for a token generator: https://github.com/grafana/grafana/blob/869b89dce45090cd982414479a7e7b3bd7953253/pkg/components/satokengen/cmd/main.go#L33, so should be OK to drop.bin/openapi3
is located inscripts/
and referenced in upstream's Makefile. I don't expect it to be used in production.bin/standalone
can be one ofpkg/tsdb/azuremonitor/standalone/
,pkg/tsdb/grafana-testdata-datasource/standalone/
orpkg/tsdb/parca/standalone/
depending on which is selected first bygetGoDirs
. This seems like a testing thing anyways, but was broken already.kinds/*.go
with afunc main
iskinds/gen.go
which has a//go:build ignore
at the top, so it doesn't seem needed as well.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.