Skip to content

Conversation

@Tofel
Copy link
Contributor

@Tofel Tofel commented Aug 5, 2025

Why?
Now we always assume that config path is relative which limits the usability hugely.


Below is a summarization created by an LLM (gpt-4-0125-preview). Be mindful of hallucinations and verify accuracy.

Why

The changes across various go.mod files and one config.go file primarily aim to introduce and utilize the go.uber.org/multierr package. This facilitates better error handling by allowing the aggregation of multiple errors into a single error object. In the specific case of config.go, when attempting to read configuration files, both the default path and an absolute path are tried, and errors from both attempts are combined if both fail. This approach ensures more robust error reporting and handling, particularly in scenarios where configurations might be loaded from different locations.

What

  • framework/.changeset/v0.10.11.md
    • Added a new changeset file noting the ability to load configs from absolute paths if relative paths fail.
  • framework/components/dockercompose/go.mod
    • Added go.uber.org/multierr v1.11.0 to the module's dependencies.
  • framework/components/dockercompose/go.sum
    • Added checksums for go.uber.org/multierr v1.11.0.
  • framework/components/fake/go.mod
    • Added go.uber.org/multierr v1.11.0 to the module's dependencies.
  • framework/components/fake/go.sum
    • Added checksums for go.uber.org/multierr v1.11.0.
  • framework/config.go
    • Modified the error handling when reading configuration files to try loading from an absolute path if loading from a relative path fails, aggregating errors from both attempts with multierr.Append.
  • framework/examples/myproject_cll/go.mod
    • Added go.uber.org/multierr v1.11.0 to the module's dependencies.
  • framework/examples/myproject_cll/go.sum
    • Added checksums for go.uber.org/multierr v1.11.0.
  • framework/go.mod
    • Added go.uber.org/multierr v1.11.0 to the module's dependencies.
  • framework/go.sum
    • Added checksums for go.uber.org/multierr v1.11.0.

@Tofel Tofel force-pushed the config-load-path branch 2 times, most recently from c735c80 to 49ea4e0 Compare August 5, 2025 16:52
@Tofel Tofel force-pushed the config-load-path branch from 49ea4e0 to 329c885 Compare August 5, 2025 16:55
@Tofel Tofel marked this pull request as ready for review August 5, 2025 16:58
@Tofel Tofel requested a review from a team as a code owner August 5, 2025 16:58
@Tofel Tofel enabled auto-merge (squash) August 5, 2025 16:58
@Tofel Tofel merged commit d92df0e into main Aug 6, 2025
66 checks passed
@Tofel Tofel deleted the config-load-path branch August 6, 2025 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants