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

fix(deps): update module github.com/pelletier/go-toml to v2 (v1.1) - autoclosed #2396

Closed

Conversation

cilium-renovate[bot]
Copy link
Contributor

@cilium-renovate cilium-renovate bot commented Apr 29, 2024

This PR contains the following updates:

Package Type Update Change
github.com/pelletier/go-toml require major v1.9.5 -> v2.2.2

Release Notes

pelletier/go-toml (github.com/pelletier/go-toml)

v2.2.2

Compare Source

What's Changed

Fixed bugs

New Contributors

Full Changelog: pelletier/go-toml@v2.2.1...v2.2.2

v2.2.1

Compare Source

What's Changed

Fixed bugs

New Contributors

Full Changelog: pelletier/go-toml@v2.2.0...v2.2.1

v2.2.0

Compare Source

What's Changed

What's new
Fixed bugs
Documentation
Other changes

New Contributors

Full Changelog: pelletier/go-toml@v2.1.1...v2.2.0

v2.1.1

Compare Source

What's Changed

Fixed bugs

New Contributors

Full Changelog: pelletier/go-toml@v2.1.0...v2.1.1

v2.1.0

Compare Source

This new minor release brings back the commented struct field tag from go-toml v1. It makes it easier to generate default or example configuration files. For instance:

type TLS struct {
	Cipher  string `toml:"cipher"`
	Version string `toml:"version"`
}
type Config struct {
	Host string `toml:"host" comment:"Host IP to connect to."`
	Port int    `toml:"port" comment:"Port of the remote server."`
	Tls  TLS    `toml:"TLS,commented" comment:"Encryption parameters (optional)"`
}
example := Config{
	Host: "127.0.0.1",
	Port: 4242,
	Tls: TLS{
		Cipher:  "AEAD-AES128-GCM-SHA256",
		Version: "TLS 1.3",
	},
}
out, err := toml.Marshal(example)

generates this TOML document:

### Host IP to connect to.
host = '127.0.0.1'

### Port of the remote server.
port = 4242

### Encryption parameters (optional)
### [TLS]

### cipher = 'AEAD-AES128-GCM-SHA256'
### version = 'TLS 1.3'

This feature was often mentioned as a blocker to upgrading from go-toml v1. Hopefully bringing it back in scope will help folks make the transition!

An other noteworthy improvement is on type mismatch errors. They now include the human-readable context, and include the struct field name of the faulty value if applicable.

Before:

toml: cannot store TOML string into a Go int

After:

1| [server]
2| path = "/my/path"
3| port = "bad"
 |        ~~~~~ cannot decode TOML string into struct field toml_test.Server.Port of type int

What's Changed

What's new
Fixed bugs
Other changes

New Contributors

Full Changelog: pelletier/go-toml@v2.0.9...v2.1.0

v2.0.9

Compare Source

What's Changed

Fixed bugs
Other changes

New Contributors

Full Changelog: pelletier/go-toml@v2.0.8...v2.0.9

v2.0.8

Compare Source

What's Changed

What's new
Fixed bugs
Documentation

New Contributors

Full Changelog: pelletier/go-toml@v2.0.7...v2.0.8

v2.0.7

Compare Source

What's Changed

Fixed bugs
Documentation

New Contributors

Full Changelog: pelletier/go-toml@v2.0.6...v2.0.7

v2.0.6

Compare Source

What's Changed

What's new
Performance
Other changes

New Contributors

Full Changelog: pelletier/go-toml@v2.0.5...v2.0.6

v2.0.5

Compare Source

What's Changed

Fixed bugs

Full Changelog: pelletier/go-toml@v2.0.4...v2.0.5

v2.0.4

Compare Source

This version has compatibility issues with Go <= 1.17. Though go-toml doesn't officially support Go less than 2 versions old, a new version has been released with a backward-compatible fix: https://github.com/pelletier/go-toml/releases/tag/v2.0.5.

What's Changed

Fixed bugs

New Contributors

Full Changelog: pelletier/go-toml@v2.0.3...v2.0.4

v2.0.3

Compare Source

What's Changed

Fixed bugs
Other changes

Full Changelog: pelletier/go-toml@v2.0.2...v2.0.3

v2.0.2

Compare Source

What's Changed

Fixed bugs
Other changes

Full Changelog: pelletier/go-toml@v2.0.1...v2.0.2

v2.0.1

Compare Source

What's Changed

Fixed bugs
Documentation

New Contributors

Full Changelog: pelletier/go-toml@v2.0.0...v2.0.1

v2.0.0

Compare Source

It is finally here! go-toml v2 is now stable. 🎉

Only just over one year after I started working on it. This version of go-toml has been rebuilt from the ground up. It respects the latest TOML specification. Countless bugs have been fixed. It behaves more like the standard library. And it is much faster. Special attention was given to keeping the public API to a minimum. Continuing the strict policy of backward compatibility, the next breaking change will be in another 5 years!

Thank you to everybody who contributed to this new version, as well as folks willing to try out the intermediate beta versions. Shout out to @​moorereason for reporting many issues during the development process using differential fuzzing, as well as @​bep for running a beta on the popular Hugo project!

There is still some work that could be done to improve the performance of the library (https://github.com/pelletier/go-toml/pull/758 and https://github.com/pelletier/go-toml/pull/669 for instance). But I am confident that the library is in a good-enough place at the moment for folks to reap the benefits of the rewrite. The major feature removal is the sort-of-AST that v1 provided. It allowed manipulating an arbitrary document and writing it back out. This was done to cut down the scope of the project, removing a feature that had unclear use-cases. The v2 parser creates some intermediate AST so that if somebody is up to design a Document API the tools should be available to do so. Please reach out if you are interested!

The readme contains a list of differences between v1 and v2 to be aware of when upgrading. Please report any issue you may have with the new version in the bug tracker 🐞, provide feedback, and ask questions in Discussions 💬.
With this release, go-toml v1 will not be receiving any updates. This is required to keep maintenance of the project to a minimum.

Hopefully, this change doesn't break your thing!


Full commit log: pelletier/go-toml@c9a09d8...v2

Thank you contributors: @​pelletier @​oschwald @​moorereason @​xwjdsh @​kkHAIKE @​RiyaJohn @​jidicula @​zostay @​mmorel-35.


Configuration

📅 Schedule: Branch creation - "on monday and friday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

@cilium-renovate cilium-renovate bot requested a review from a team as a code owner April 29, 2024 16:16
@cilium-renovate cilium-renovate bot added release-blocker This PR or issue is blocking the next release. release-note/dependency This PR updates one or multiple dependencies labels Apr 29, 2024
@cilium-renovate cilium-renovate bot requested review from kevsecurity and removed request for a team April 29, 2024 16:16
@cilium-renovate
Copy link
Contributor Author

cilium-renovate bot commented Apr 29, 2024

⚠ Artifact update problem

Renovate failed to update artifacts related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: go.sum
Command failed: mod upgrade --mod-name=github.com/pelletier/go-toml -t=2
err: exit status 1: stderr: go: inconsistent vendoring in /tmp/renovate/repos/github/cilium/tetragon:
	github.com/pelletier/go-toml/v2@v2.2.2: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	github.com/pelletier/go-toml/v2@v2.1.0: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod

	To ignore the vendor directory, use -mod=readonly or -mod=mod.
	To sync the vendor directory, run:
		go mod vendor

could not load package
github.com/marwan-at-work/mod/major.Run
	/go/pkg/mod/github.com/marwan-at-work/mod@v0.7.1/major/major.go:47
main.upgrade
	/go/pkg/mod/github.com/marwan-at-work/mod@v0.7.1/cmd/mod/main.go:75
main.main.withExit.func1
	/go/pkg/mod/github.com/marwan-at-work/mod@v0.7.1/cmd/mod/main.go:88
github.com/urfave/cli/v2.(*Command).Run
	/go/pkg/mod/github.com/urfave/cli/v2@v2.25.1/command.go:274
github.com/urfave/cli/v2.(*Command).Run
	/go/pkg/mod/github.com/urfave/cli/v2@v2.25.1/command.go:267
github.com/urfave/cli/v2.(*App).RunContext
	/go/pkg/mod/github.com/urfave/cli/v2@v2.25.1/app.go:332
github.com/urfave/cli/v2.(*App).Run
	/go/pkg/mod/github.com/urfave/cli/v2@v2.25.1/app.go:309
main.main
	/go/pkg/mod/github.com/marwan-at-work/mod@v0.7.1/cmd/mod/main.go:71
runtime.main
	/opt/containerbase/tools/golang/1.22.3/src/runtime/proc.go:271
runtime.goexit
	/opt/containerbase/tools/golang/1.22.3/src/runtime/asm_amd64.s:1695

File name: undefined
Command failed: make codegen
go: inconsistent vendoring in /tmp/renovate/repos/github/cilium/tetragon:
	github.com/pelletier/go-toml/v2@v2.2.2: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	github.com/pelletier/go-toml@v1.9.5: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod

	To ignore the vendor directory, use -mod=readonly or -mod=mod.
	To sync the vendor directory, run:
		go mod vendor
make: *** [Makefile:368: protoc-gen-go-tetragon] Error 1

@cilium-renovate cilium-renovate bot force-pushed the renovate/v1.1-github.com-pelletier-go-toml-2.x branch 3 times, most recently from f80570c to bd5a954 Compare May 3, 2024 12:22
@cilium-renovate
Copy link
Contributor Author

⚠️ Artifact update problem

Renovate failed to update artifacts related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: go.sum
Command failed: mod upgrade --mod-name=github.com/pelletier/go-toml -t=2
err: exit status 1: stderr: go: inconsistent vendoring in /tmp/renovate/repos/github/cilium/tetragon:
	github.com/pelletier/go-toml/v2@v2.2.2: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	github.com/pelletier/go-toml/v2@v2.1.0: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod

	To ignore the vendor directory, use -mod=readonly or -mod=mod.
	To sync the vendor directory, run:
		go mod vendor

could not load package
github.com/marwan-at-work/mod/major.Run
	/go/pkg/mod/github.com/marwan-at-work/mod@v0.7.1/major/major.go:47
main.upgrade
	/go/pkg/mod/github.com/marwan-at-work/mod@v0.7.1/cmd/mod/main.go:75
main.main.withExit.func1
	/go/pkg/mod/github.com/marwan-at-work/mod@v0.7.1/cmd/mod/main.go:88
github.com/urfave/cli/v2.(*Command).Run
	/go/pkg/mod/github.com/urfave/cli/v2@v2.25.1/command.go:274
github.com/urfave/cli/v2.(*Command).Run
	/go/pkg/mod/github.com/urfave/cli/v2@v2.25.1/command.go:267
github.com/urfave/cli/v2.(*App).RunContext
	/go/pkg/mod/github.com/urfave/cli/v2@v2.25.1/app.go:332
github.com/urfave/cli/v2.(*App).Run
	/go/pkg/mod/github.com/urfave/cli/v2@v2.25.1/app.go:309
main.main
	/go/pkg/mod/github.com/marwan-at-work/mod@v0.7.1/cmd/mod/main.go:71
runtime.main
	/opt/containerbase/tools/golang/1.22.3/src/runtime/proc.go:271
runtime.goexit
	/opt/containerbase/tools/golang/1.22.3/src/runtime/asm_amd64.s:1695

File name: undefined
Command failed: make codegen
go: inconsistent vendoring in /tmp/renovate/repos/github/cilium/tetragon:
	github.com/pelletier/go-toml/v2@v2.2.2: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
	github.com/pelletier/go-toml@v1.9.5: is marked as explicit in vendor/modules.txt, but not explicitly required in go.mod

	To ignore the vendor directory, use -mod=readonly or -mod=mod.
	To sync the vendor directory, run:
		go mod vendor
make: *** [Makefile:368: protoc-gen-go-tetragon] Error 1

@cilium-renovate cilium-renovate bot force-pushed the renovate/v1.1-github.com-pelletier-go-toml-2.x branch 2 times, most recently from af0180d to 9b95d90 Compare May 9, 2024 11:10
Signed-off-by: cilium-renovate[bot] <134692979+cilium-renovate[bot]@users.noreply.github.com>
@cilium-renovate cilium-renovate bot force-pushed the renovate/v1.1-github.com-pelletier-go-toml-2.x branch from 9b95d90 to d343597 Compare May 15, 2024 18:19
@cilium-renovate cilium-renovate bot changed the title fix(deps): update module github.com/pelletier/go-toml to v2 (v1.1) fix(deps): update module github.com/pelletier/go-toml to v2 (v1.1) - autoclosed May 16, 2024
@cilium-renovate cilium-renovate bot closed this May 16, 2024
@cilium-renovate cilium-renovate bot deleted the renovate/v1.1-github.com-pelletier-go-toml-2.x branch May 16, 2024 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-blocker This PR or issue is blocking the next release. release-note/dependency This PR updates one or multiple dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants