mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 21:17:58 +08:00
chore: Enable Go jsonv2 experiment and update the trivy dependency (v0.67.2) (#3572)
It requires the encoding/json/jsontext package which is only available when the goexperiment.jsonv2 build tag is enabled. This was causing build constraint errors during tests and builds. Changes: - Add GOEXPERIMENT=jsonv2 to Makefile export and all go build/test commands that use env (since env creates a fresh environment) - Add GOEXPERIMENT=jsonv2 to GitHub workflows that use direct go commands (workflows using make inherit it from Makefile) Fix other dependabot alerts. Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
This commit is contained in:
@@ -507,16 +507,15 @@ func TestNewExporter(t *testing.T) {
|
||||
|
||||
workersSize := int(nBig.Int64())
|
||||
for range workersSize {
|
||||
wg.Go(
|
||||
func() {
|
||||
m := serverController.Metrics.ReceiveMetrics()
|
||||
json := jsoniter.ConfigCompatibleWithStandardLibrary
|
||||
wg.Go(func() {
|
||||
m := serverController.Metrics.ReceiveMetrics()
|
||||
json := jsoniter.ConfigCompatibleWithStandardLibrary
|
||||
|
||||
_, err := json.Marshal(m)
|
||||
if err != nil {
|
||||
exporterController.Log.Error().Err(err).Msg("Concurrent metrics scrape fail")
|
||||
}
|
||||
})
|
||||
_, err := json.Marshal(m)
|
||||
if err != nil {
|
||||
exporterController.Log.Error().Err(err).Msg("Concurrent metrics scrape fail")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
|
||||
Reference in New Issue
Block a user