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

build(deps): bump the go-deps group with 9 updates #4275

Merged
merged 4 commits into from
Feb 27, 2025

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 22, 2025

Bumps the go-deps group with 9 updates:

Package From To
github.com/mnako/letters 0.2.3 0.2.4
github.com/prometheus/client_golang 1.20.5 1.21.0
github.com/riverqueue/river 0.16.0 0.18.0
github.com/riverqueue/river/cmd/river 0.16.0 0.18.0
github.com/riverqueue/river/riverdriver/riverdatabasesql 0.16.0 0.18.0
github.com/riverqueue/river/riverdriver/riverpgxv5 0.16.0 0.18.0
github.com/riverqueue/river/rivertype 0.16.0 0.18.0
github.com/spf13/cobra 1.9.0 1.9.1
golang.org/x/crypto 0.33.0 0.34.0

Updates github.com/mnako/letters from 0.2.3 to 0.2.4

Release notes

Sourced from github.com/mnako/letters's releases.

Release v0.2.4

What's Changed

Updates

Full Changelog: mnako/letters@v0.2.3...v0.2.4

Commits
  • f697c9d v0.2.4 release candidate
  • 11d0401 Add 1.24 to Go version testing matrix. (#131)
  • 6515f15 Bump golangci/golangci-lint-action from 6.3.2 to 6.4.0 (#130)
  • bb56e61 Bump golang.org/x/net from 0.34.0 to 0.35.0 (#128)
  • 5ade7a1 Bump golangci/golangci-lint-action from 6.2.0 to 6.3.2 (#127)
  • 2155162 Bump golang.org/x/text from 0.21.0 to 0.22.0 (#123)
  • 670cb70 Add bodyFilter and fileFilter on EmailParser and allow `WithBodyFilter(...
  • db1b793 Bump actions/setup-go from 5.2.0 to 5.3.0 (#120)
  • b86e62c Enable testpackage golangci-lint linter to enforce testing through public int...
  • 39e0655 Bump golang.org/x/net from 0.33.0 to 0.34.0 (#114)
  • Additional commits viewable in compare view

Updates github.com/prometheus/client_golang from 1.20.5 to 1.21.0

Release notes

Sourced from github.com/prometheus/client_golang's releases.

v1.21.0 / 2025-02-19

⚠️ This release contains potential breaking change if you upgrade github.com/prometheus/common to 0.62+ together with client_golang (and depend on the strict, legacy validation for the label names). New common version changes model.NameValidationScheme global variable, which relaxes the validation of label names and metric name, allowing all UTF-8 characters. Typically, this should not break any user, unless your test or usage expects strict certain names to panic/fail on client_golang metric registration, gathering or scrape. In case of problems change model.NameValidationScheme to old model.LegacyValidation value in your project init function. ⚠️

  • [BUGFIX] gocollector: Fix help message for runtime/metric metrics. #1583
  • [BUGFIX] prometheus: Fix Desc.String() method for no labels case. #1687
  • [PERF] prometheus: Optimize popular prometheus.BuildFQName function; now up to 30% faster. #1665
  • [PERF] prometheus: Optimize Inc, Add and Observe cumulative metrics; now up to 50% faster under high concurrent contention. #1661
  • [CHANGE] Upgrade prometheus/common to 0.62.0 which changes model.NameValidationScheme global variable. #1712
  • [CHANGE] Add support for Go 1.23. #1602
  • [FEATURE] process_collector: Add support for Darwin systems. #1600 #1616 #1625 #1675 #1715
  • [FEATURE] api: Add ability to invoke CloseIdleConnections on api.Client using api.Client.(CloseIdler).CloseIdleConnections() casting. #1513
  • [FEATURE] promhttp: Add promhttp.HandlerOpts.EnableOpenMetricsTextCreatedSamples option to create OpenMetrics _created lines. Not recommended unless you want to use opt-in Created Timestamp feature. Community works on OpenMetrics 2.0 format that should make those lines obsolete (they increase cardinality significantly). #1408
  • [FEATURE] prometheus: Add NewConstNativeHistogram function. #1654

... (truncated)

Changelog

Sourced from github.com/prometheus/client_golang's changelog.

1.21.0 / 2025-02-17

⚠️ This release contains potential breaking change if you upgrade github.com/prometheus/common to 0.62+ together with client_golang. ⚠️

New common version changes model.NameValidationScheme global variable, which relaxes the validation of label names and metric name, allowing all UTF-8 characters. Typically, this should not break any user, unless your test or usage expects strict certain names to panic/fail on client_golang metric registration, gathering or scrape. In case of problems change model.NameValidationScheme to old model.LegacyValidation value in your project init function.

  • [BUGFIX] gocollector: Fix help message for runtime/metric metrics. #1583
  • [BUGFIX] prometheus: Fix Desc.String() method for no labels case. #1687
  • [ENHANCEMENT] prometheus: Optimize popular prometheus.BuildFQName function; now up to 30% faster. #1665
  • [ENHANCEMENT] prometheus: Optimize Inc, Add and Observe cumulative metrics; now up to 50% faster under high concurrent contention. #1661
  • [CHANGE] Upgrade prometheus/common to 0.62.0 which changes model.NameValidationScheme global variable. #1712
  • [CHANGE] Add support for Go 1.23. #1602
  • [FEATURE] process_collector: Add support for Darwin systems. #1600 #1616 #1625 #1675 #1715
  • [FEATURE] api: Add ability to invoke CloseIdleConnections on api.Client using api.Client.(CloseIdler).CloseIdleConnections() casting. #1513
  • [FEATURE] promhttp: Add promhttp.HandlerOpts.EnableOpenMetricsTextCreatedSamples option to create OpenMetrics _created lines. Not recommended unless you want to use opt-in Created Timestamp feature. Community works on OpenMetrics 2.0 format that should make those lines obsolete (they increase cardinality significantly). #1408
  • [FEATURE] prometheus: Add NewConstNativeHistogram function. #1654
Commits

Updates github.com/riverqueue/river from 0.16.0 to 0.18.0

Release notes

Sourced from github.com/riverqueue/river's releases.

v0.18.0

⚠️ Version 0.18.0 has breaking changes for the rivertest.Worker type that was just introduced. While attempting to round out some edge cases with its design, we realized some of them simply couldn't be solved adequately without changing the overall design such that all tested jobs are inserted into the database. Given the short duration since it was released (over a weekend) it's unlikely many users have adopted it and it seemed best to rip off the bandaid to fix it before it gets widely used.

Added

  • Jobs can now store a recorded "output" value, a JSON-encoded payload set by the job during execution and stored in the job's metadata. The river.RecordOutput function makes it easy to use the job row to store transient/temporary values that are needed for introspection or for other downstream jobs. The output can be accessed using the JobRow.Output() helper method.

    This output is stored at the same time as the job is completed following execution, so it does not require additional database calls or overhead. Output can be anything that can be stored in a Postgres JSONB field, though for performance reasons it should be limited in size. [PR #758](riverqueue/river#758).

Changed

  • Breaking change: The rivertest.Worker type now requires all jobs to be inserted into the database. The original design allowed workers to be tested without hitting the database at all. Ultimately this design made it hard to correctly simulate features like JobCompleteTx and the other potential solutions seemed undesirable.

    As part of this change, the Work and WorkJob methods now take a transaction argument. The expectation is that a transaction will be opened by the caller and rolled back after test completion. Additionally, the return signature was changed to return a WorkResult struct alongside the error. The struct includes the post-execution job row as well as the event kind that occurred, making it easy to inspect the job's state after execution.

    Finally, the implementation was refactored so that it uses the real river.Client insert path, and also uses the same job execution path as real execution. This minimizes the potential for differences in behavior between testing and real execution. [PR #766](riverqueue/river#766).

  • Adjusted panic stack traces to filter out irrelevant frames like the ones generated by the runtime package that constructed the trace, or River's internal rescuing code. This makes the first panic frame reflect the actual panic origin for easier debugging. [PR #774](riverqueue/river#774).

Fixed

  • Fix error message on unsuccessful client subscribe that erroneously referred to "Workers" not configured. [PR #771](riverqueue/river#771).
  • Fix an issue with encoding unique keys in riverdatabasesql driver. [PR #777](riverqueue/river#777).

v0.17.0

Added

  • Exposed TestConfig struct on Config under the Test field for configuration that is specific to test environments. For now, the only field on this type is Time, which can be used to set a synthetic TimeGenerator for tests. A stubbable time generator was added as rivertest.TimeStub to allow time to be easily stubbed in tests. [PR #754](riverqueue/river#754).
  • New rivertest.Worker type to make it significantly easier to test River workers. Either real or synthetic jobs can be worked using this interface, generally without requiring any database interactions. The Worker type provides a realistic execution environment with access to the full range of River features, including river.ClientFromContext, middleware (both global and per-worker), and timeouts. [PR #753](riverqueue/river#753).

Changed

  • Errors returned from retryable jobs are now logged with warning logs instead of error logs. Error logs are still used for jobs that error after reaching max_attempts. [PR #743](riverqueue/river#743).
  • Remove range variable capture in for loops and use simplified range syntax. Each of these requires Go 1.22 or later, which was already our minimum required version since Go 1.23 was released. [PR #755](riverqueue/river#755).

Fixed

  • riverdatabasesql driver: properly handle nil values in bytea[] inputs. This fixes the driver's handling of empty unique keys on insert for non-unique jobs with the newer unique jobs implementation. [PR #739](riverqueue/river#739).
  • JobCompleteTx now returns rivertype.ErrNotFound if the job doesn't exist instead of panicking. [PR #753](riverqueue/river#753).
    • NeverSchedule.Next now returns the correct maximum time value, ensuring that the periodic job truly never runs. This fixes an issue where an incorrect maximum timestamp was previously used. Thanks Hubert Krauze (@​krhubert)! [PR #760](riverqueue/river#760)
Changelog

Sourced from github.com/riverqueue/river's changelog.

[0.18.0] - 2025-02-20

⚠️ Version 0.18.0 has breaking changes for the rivertest.Worker type that was just introduced. While attempting to round out some edge cases with its design, we realized some of them simply couldn't be solved adequately without changing the overall design such that all tested jobs are inserted into the database. Given the short duration since it was released (over a weekend) it's unlikely many users have adopted it and it seemed best to rip off the bandaid to fix it before it gets widely used.

Added

  • Jobs can now store a recorded "output" value, a JSON-encoded payload set by the job during execution and stored in the job's metadata. The river.RecordOutput function makes it easy to use the job row to store transient/temporary values that are needed for introspection or for other downstream jobs. The output can be accessed using the JobRow.Output() helper method.

    This output is stored at the same time as the job is completed following execution, so it does not require additional database calls or overhead. Output can be anything that can be stored in a Postgres JSONB field, though for performance reasons it should be limited in size. [PR #758](riverqueue/river#758).

Changed

  • Breaking change: The rivertest.Worker type now requires all jobs to be inserted into the database. The original design allowed workers to be tested without hitting the database at all. Ultimately this design made it hard to correctly simulate features like JobCompleteTx and the other potential solutions seemed undesirable.

    As part of this change, the Work and WorkJob methods now take a transaction argument. The expectation is that a transaction will be opened by the caller and rolled back after test completion. Additionally, the return signature was changed to return a WorkResult struct alongside the error. The struct includes the post-execution job row as well as the event kind that occurred, making it easy to inspect the job's state after execution.

    Finally, the implementation was refactored so that it uses the real river.Client insert path, and also uses the same job execution path as real execution. This minimizes the potential for differences in behavior between testing and real execution. [PR #766](riverqueue/river#766).

  • Adjusted panic stack traces to filter out irrelevant frames like the ones generated by the runtime package that constructed the trace, or River's internal rescuing code. This makes the first panic frame reflect the actual panic origin for easier debugging. [PR #774](riverqueue/river#774).

Fixed

  • Fix error message on unsuccessful client subscribe that erroneously referred to "Workers" not configured. [PR #771](riverqueue/river#771).
  • Fix an issue with encoding unique keys in riverdatabasesql driver. [PR #777](riverqueue/river#777).

[0.17.0] - 2025-02-16

Added

  • Exposed TestConfig struct on Config under the Test field for configuration that is specific to test environments. For now, the only field on this type is Time, which can be used to set a synthetic TimeGenerator for tests. A stubbable time generator was added as rivertest.TimeStub to allow time to be easily stubbed in tests. [PR #754](riverqueue/river#754).
  • New rivertest.Worker type to make it significantly easier to test River workers. Either real or synthetic jobs can be worked using this interface, generally without requiring any database interactions. The Worker type provides a realistic execution environment with access to the full range of River features, including river.ClientFromContext, middleware (both global and per-worker), and timeouts. [PR #753](riverqueue/river#753).

Changed

  • Errors returned from retryable jobs are now logged with warning logs instead of error logs. Error logs are still used for jobs that error after reaching max_attempts. [PR #743](riverqueue/river#743).
  • Remove range variable capture in for loops and use simplified range syntax. Each of these requires Go 1.22 or later, which was already our minimum required version since Go 1.23 was released. [PR #755](riverqueue/river#755).

Fixed

  • riverdatabasesql driver: properly handle nil values in bytea[] inputs. This fixes the driver's handling of empty unique keys on insert for non-unique jobs with the newer unique jobs implementation. [PR #739](riverqueue/river#739).
  • JobCompleteTx now returns rivertype.ErrNotFound if the job doesn't exist instead of panicking. [PR #753](riverqueue/river#753).
    • NeverSchedule.Next now returns the correct maximum time value, ensuring that the periodic job truly never runs. This fixes an issue where an incorrect maximum timestamp was previously used. Thanks Hubert Krauze (@​krhubert)! [PR #760](riverqueue/river#760)
Commits
  • fce1b07 prepare v0.18.0 (#780)
  • 0f6987b add ability to put metadata updates after job execution (#758)
  • c7c7e45 improve driver test coverage for InsertFastMany, fix databasesql unique key i...
  • ddff23d testdb.Manager: try to recreate pool after cleanup error (#778)
  • f0eaa64 allow GOMAXPROCS + 2 test DBs to fix CI flakiness (#776)
  • 23408d1 remove irrelevant frames from panic traces (#774)
  • 8e66dd5 rivertest.Worker fixes: handle nil config, rename Kind/EventKind, log panic t...
  • d9568cb Fix error message on unsuccessful client subscribe (#771)
  • fb6b3e9 Test DB pool fixes (#769)
  • ded1d06 rivertest.Worker: Use job executor, always insert jobs, require tx (#766)
  • Additional commits viewable in compare view

Updates github.com/riverqueue/river/cmd/river from 0.16.0 to 0.18.0

Release notes

Sourced from github.com/riverqueue/river/cmd/river's releases.

v0.18.0

⚠️ Version 0.18.0 has breaking changes for the rivertest.Worker type that was just introduced. While attempting to round out some edge cases with its design, we realized some of them simply couldn't be solved adequately without changing the overall design such that all tested jobs are inserted into the database. Given the short duration since it was released (over a weekend) it's unlikely many users have adopted it and it seemed best to rip off the bandaid to fix it before it gets widely used.

Added

  • Jobs can now store a recorded "output" value, a JSON-encoded payload set by the job during execution and stored in the job's metadata. The river.RecordOutput function makes it easy to use the job row to store transient/temporary values that are needed for introspection or for other downstream jobs. The output can be accessed using the JobRow.Output() helper method.

    This output is stored at the same time as the job is completed following execution, so it does not require additional database calls or overhead. Output can be anything that can be stored in a Postgres JSONB field, though for performance reasons it should be limited in size. [PR #758](riverqueue/river#758).

Changed

  • Breaking change: The rivertest.Worker type now requires all jobs to be inserted into the database. The original design allowed workers to be tested without hitting the database at all. Ultimately this design made it hard to correctly simulate features like JobCompleteTx and the other potential solutions seemed undesirable.

    As part of this change, the Work and WorkJob methods now take a transaction argument. The expectation is that a transaction will be opened by the caller and rolled back after test completion. Additionally, the return signature was changed to return a WorkResult struct alongside the error. The struct includes the post-execution job row as well as the event kind that occurred, making it easy to inspect the job's state after execution.

    Finally, the implementation was refactored so that it uses the real river.Client insert path, and also uses the same job execution path as real execution. This minimizes the potential for differences in behavior between testing and real execution. [PR #766](riverqueue/river#766).

  • Adjusted panic stack traces to filter out irrelevant frames like the ones generated by the runtime package that constructed the trace, or River's internal rescuing code. This makes the first panic frame reflect the actual panic origin for easier debugging. [PR #774](riverqueue/river#774).

Fixed

  • Fix error message on unsuccessful client subscribe that erroneously referred to "Workers" not configured. [PR #771](riverqueue/river#771).
  • Fix an issue with encoding unique keys in riverdatabasesql driver. [PR #777](riverqueue/river#777).

v0.17.0

Added

  • Exposed TestConfig struct on Config under the Test field for configuration that is specific to test environments. For now, the only field on this type is Time, which can be used to set a synthetic TimeGenerator for tests. A stubbable time generator was added as rivertest.TimeStub to allow time to be easily stubbed in tests. [PR #754](riverqueue/river#754).
  • New rivertest.Worker type to make it significantly easier to test River workers. Either real or synthetic jobs can be worked using this interface, generally without requiring any database interactions. The Worker type provides a realistic execution environment with access to the full range of River features, including river.ClientFromContext, middleware (both global and per-worker), and timeouts. [PR #753](riverqueue/river#753).

Changed

  • Errors returned from retryable jobs are now logged with warning logs instead of error logs. Error logs are still used for jobs that error after reaching max_attempts. [PR #743](riverqueue/river#743).
  • Remove range variable capture in for loops and use simplified range syntax. Each of these requires Go 1.22 or later, which was already our minimum required version since Go 1.23 was released. [PR #755](riverqueue/river#755).

Fixed

  • riverdatabasesql driver: properly handle nil values in bytea[] inputs. This fixes the driver's handling of empty unique keys on insert for non-unique jobs with the newer unique jobs implementation. [PR #739](riverqueue/river#739).
  • JobCompleteTx now returns rivertype.ErrNotFound if the job doesn't exist instead of panicking. [PR #753](riverqueue/river#753).
    • NeverSchedule.Next now returns the correct maximum time value, ensuring that the periodic job truly never runs. This fixes an issue where an incorrect maximum timestamp was previously used. Thanks Hubert Krauze (@​krhubert)! [PR #760](riverqueue/river#760)
Changelog

Sourced from github.com/riverqueue/river/cmd/river's changelog.

[0.18.0] - 2025-02-20

⚠️ Version 0.18.0 has breaking changes for the rivertest.Worker type that was just introduced. While attempting to round out some edge cases with its design, we realized some of them simply couldn't be solved adequately without changing the overall design such that all tested jobs are inserted into the database. Given the short duration since it was released (over a weekend) it's unlikely many users have adopted it and it seemed best to rip off the bandaid to fix it before it gets widely used.

Added

  • Jobs can now store a recorded "output" value, a JSON-encoded payload set by the job during execution and stored in the job's metadata. The river.RecordOutput function makes it easy to use the job row to store transient/temporary values that are needed for introspection or for other downstream jobs. The output can be accessed using the JobRow.Output() helper method.

    This output is stored at the same time as the job is completed following execution, so it does not require additional database calls or overhead. Output can be anything that can be stored in a Postgres JSONB field, though for performance reasons it should be limited in size. [PR #758](riverqueue/river#758).

Changed

  • Breaking change: The rivertest.Worker type now requires all jobs to be inserted into the database. The original design allowed workers to be tested without hitting the database at all. Ultimately this design made it hard to correctly simulate features like JobCompleteTx and the other potential solutions seemed undesirable.

    As part of this change, the Work and WorkJob methods now take a transaction argument. The expectation is that a transaction will be opened by the caller and rolled back after test completion. Additionally, the return signature was changed to return a WorkResult struct alongside the error. The struct includes the post-execution job row as well as the event kind that occurred, making it easy to inspect the job's state after execution.

    Finally, the implementation was refactored so that it uses the real river.Client insert path, and also uses the same job execution path as real execution. This minimizes the potential for differences in behavior between testing and real execution. [PR #766](riverqueue/river#766).

  • Adjusted panic stack traces to filter out irrelevant frames like the ones generated by the runtime package that constructed the trace, or River's internal rescuing code. This makes the first panic frame reflect the actual panic origin for easier debugging. [PR #774](riverqueue/river#774).

Fixed

  • Fix error message on unsuccessful client subscribe that erroneously referred to "Workers" not configured. [PR #771](riverqueue/river#771).
  • Fix an issue with encoding unique keys in riverdatabasesql driver. [PR #777](riverqueue/river#777).

[0.17.0] - 2025-02-16

Added

  • Exposed TestConfig struct on Config under the Test field for configuration that is specific to test environments. For now, the only field on this type is Time, which can be used to set a synthetic TimeGenerator for tests. A stubbable time generator was added as rivertest.TimeStub to allow time to be easily stubbed in tests. [PR #754](riverqueue/river#754).
  • New rivertest.Worker type to make it significantly easier to test River workers. Either real or synthetic jobs can be worked using this interface, generally without requiring any database interactions. The Worker type provides a realistic execution environment with access to the full range of River features, including river.ClientFromContext, middleware (both global and per-worker), and timeouts. [PR #753](riverqueue/river#753).

Changed

  • Errors returned from retryable jobs are now logged with warning logs instead of error logs. Error logs are still used for jobs that error after reaching max_attempts. [PR #743](riverqueue/river#743).
  • Remove range variable capture in for loops and use simplified range syntax. Each of these requires Go 1.22 or later, which was already our minimum required version since Go 1.23 was released. [PR #755](riverqueue/river#755).

Fixed

  • riverdatabasesql driver: properly handle nil values in bytea[] inputs. This fixes the driver's handling of empty unique keys on insert for non-unique jobs with the newer unique jobs implementation. [PR #739](riverqueue/river#739).
  • JobCompleteTx now returns rivertype.ErrNotFound if the job doesn't exist instead of panicking. [PR #753](riverqueue/river#753).
    • NeverSchedule.Next now returns the correct maximum time value, ensuring that the periodic job truly never runs. This fixes an issue where an incorrect maximum timestamp was previously used. Thanks Hubert Krauze (@​krhubert)! [PR #760](riverqueue/river#760)
Commits
  • fce1b07 prepare v0.18.0 (#780)
  • 0f6987b add ability to put metadata updates after job execution (#758)
  • c7c7e45 improve driver test coverage for InsertFastMany, fix databasesql unique key i...
  • ddff23d testdb.Manager: try to recreate pool after cleanup error (#778)
  • f0eaa64 allow GOMAXPROCS + 2 test DBs to fix CI flakiness (#776)
  • 23408d1 remove irrelevant frames from panic traces (#774)
  • 8e66dd5 rivertest.Worker fixes: handle nil config, rename Kind/EventKind, log panic t...
  • d9568cb Fix error message on unsuccessful client subscribe (#771)
  • fb6b3e9 Test DB pool fixes (#769)
  • ded1d06 rivertest.Worker: Use job executor, always insert jobs, require tx (#766)
  • Additional commits viewable in compare view

Updates github.com/riverqueue/river/riverdriver/riverdatabasesql from 0.16.0 to 0.18.0

Release notes

Sourced from github.com/riverqueue/river/riverdriver/riverdatabasesql's releases.

v0.18.0

⚠️ Version 0.18.0 has breaking changes for the rivertest.Worker type that was just introduced. While attempting to round out some edge cases with its design, we realized some of them simply couldn't be solved adequately without changing the overall design such that all tested jobs are inserted into the database. Given the short duration since it was released (over a weekend) it's unlikely many users have adopted it and it seemed best to rip off the bandaid to fix it before it gets widely used.

Added

  • Jobs can now store a recorded "output" value, a JSON-encoded payload set by the job during execution and stored in the job's metadata. The river.RecordOutput function makes it easy to use the job row to store transient/temporary values that are needed for introspection or for other downstream jobs. The output can be accessed using the JobRow.Output() helper method.

    This output is stored at the same time as the job is completed following execution, so it does not require additional database calls or overhead. Output can be anything that can be stored in a Postgres JSONB field, though for performance reasons it should be limited in size. [PR #758](riverqueue/river#758).

Changed

  • Breaking change: The rivertest.Worker type now requires all jobs to be inserted into the database. The original design allowed workers to be tested without hitting the database at all. Ultimately this design made it hard to correctly simulate features like JobCompleteTx and the other potential solutions seemed undesirable.

    As part of this change, the Work and WorkJob methods now take a transaction argument. The expectation is that a transaction will be opened by the caller and rolled back after test completion. Additionally, the return signature was changed to return a WorkResult struct alongside the error. The struct includes the post-execution job row as well as the event kind that occurred, making it easy to inspect the job's state after execution.

    Finally, the implementation was refactored so that it uses the real river.Client insert path, and also uses the same job execution path as real execution. This minimizes the potential for differences in behavior between testing and real execution. [PR #766](riverqueue/river#766).

  • Adjusted panic stack traces to filter out irrelevant frames like the ones generated by the runtime package that constructed the trace, or River's internal rescuing code. This makes the first panic frame reflect the actual panic origin for easier debugging. [PR #774](riverqueue/river#774).

Fixed

  • Fix error message on unsuccessful client subscribe that erroneously referred to "Workers" not configured. [PR #771](riverqueue/river#771).
  • Fix an issue with encoding unique keys in riverdatabasesql driver. [PR #777](riverqueue/river#777).

v0.17.0

Added

  • Exposed TestConfig struct on Config under the Test field for configuration that is specific to test environments. For now, the only field on this type is Time, which can be used to set a synthetic TimeGenerator for tests. A stubbable time generator was added as rivertest.TimeStub to allow time to be easily stubbed in tests. [PR #754](riverqueue/river#754).
  • New rivertest.Worker type to make it significantly easier to test River workers. Either real or synthetic jobs can be worked using this interface, generally without requiring any database interactions. The Worker type provides a realistic execution environment with access to the full range of River features, including river.ClientFromContext, middleware (both global and per-worker), and timeouts. [PR #753](riverqueue/river#753).

Changed

  • Errors returned from retryable jobs are now logged with warning logs instead of error logs. Error logs are still used for jobs that error after reaching max_attempts. [PR #743](riverqueue/river#743).
  • Remove range variable capture in for loops and use simplified range syntax. Each of these requires Go 1.22 or later, which was already our minimum required version since Go 1.23 was released. [PR #755](riverqueue/river#755).

Fixed

  • riverdatabasesql driver: properly handle nil values in bytea[] inputs. This fixes the driver's handling of empty unique keys on insert for non-unique jobs with the newer unique jobs implementation. [PR #739](riverqueue/river#739).
  • JobCompleteTx now returns rivertype.ErrNotFound if the job doesn't exist instead of panicking. [PR #753](riverqueue/river#753).
    • NeverSchedule.Next now returns the correct maximum time value, ensuring that the periodic job truly never runs. This fixes an issue where an incorrect maximum timestamp was previously used. Thanks Hubert Krauze (@​krhubert)! [PR #760](riverqueue/river#760)
Changelog

Sourced from github.com/riverqueue/river/riverdriver/riverdatabasesql's changelog.

[0.18.0] - 2025-02-20

⚠️ Version 0.18.0 has breaking changes for the rivertest.Worker type that was just introduced. While attempting to round out some edge cases with its design, we realized some of them simply couldn't be solved adequately without changing the overall design such that all tested jobs are inserted into the database. Given the short duration since it was released (over a weekend) it's unlikely many users have adopted it and it seemed best to rip off the bandaid to fix it before it gets widely used.

Added

  • Jobs can now store a recorded "output" value, a JSON-encoded payload set by the job during execution and stored in the job's metadata. The river.RecordOutput function makes it easy to use the job row to store transient/temporary values that are needed for introspection or for other downstream jobs. The output can be accessed using the JobRow.Output() helper method.

    This output is stored at the same time as the job is completed following execution, so it does not require additional database calls or overhead. Output can be anything that can be stored in a Postgres JSONB field, though for performance reasons it should be limited in size. [PR #758](riverqueue/river#758).

Changed

  • Breaking change: The rivertest.Worker type now requires all jobs to be inserted into the database. The original design allowed workers to be tested without hitting the database at all. Ultimately this design made it hard to correctly simulate features like JobCompleteTx and the other potential solutions seemed undesirable.

    As part of this change, the Work and WorkJob methods now take a transaction argument. The expectation is that a transaction will be opened by the caller and rolled back after test completion. Additionally, the return signature was changed to return a WorkResult struct alongside the error. The struct includes the post-execution job row as well as the event kind that occurred, making it easy to inspect the job's state after execution.

    Finally, the implementation was refactored so that it uses the real river.Client insert path, and also uses the same job execution path as real execution. This minimizes the potential for differences in behavior between testing and real execution. [PR #766](riverqueue/river#766).

  • Adjusted panic stack traces to filter out irrelevant frames like the ones generated by the runtime package that constructed the trace, or River's internal rescuing code. This makes the first panic frame reflect the actual panic origin for easier debugging. [PR #774](riverqueue/river#774).

Fixed

  • Fix error message on unsuccessful client subscribe that erroneously referred to "Workers" not configured. [PR #771](riverqueue/river#771).
  • Fix an issue with encoding unique keys in riverdatabasesql driver. [PR #777](riverqueue/river#777).

[0.17.0] - 2025-02-16

Added

  • Exposed TestConfig struct on Config under the Test field for configuration that is specific to test environments. For now, the only field on this type is Time, which can be used to set a synthetic TimeGenerator for tests. A stubbable time generator was added as rivertest.TimeStub to allow time to be easily stubbed in tests. [PR #754](riverqueue/river#754).
  • New rivertest.Worker type to make it significantly easier to test River workers. Either real or synthetic jobs can be worked using this interface, generally without requiring any database interactions. The Worker type provides a realistic execution environment with access to the full range of River features, including river.ClientFromContext, middleware (both global and per-worker), and timeouts. [PR #753](riverqueue/river#753).

Changed

  • Errors returned from retryable jobs are now logged with warning logs instead of error logs. Error logs are still used for jobs that error after reaching max_attempts. [PR #743](riverqueue/river#743).
  • Remove range variable capture in forDescription has been truncated

Bumps the go-deps group with 9 updates:

| Package | From | To |
| --- | --- | --- |
| [github.com/mnako/letters](https://github.com/mnako/letters) | `0.2.3` | `0.2.4` |
| [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) | `1.20.5` | `1.21.0` |
| [github.com/riverqueue/river](https://github.com/riverqueue/river) | `0.16.0` | `0.18.0` |
| [github.com/riverqueue/river/cmd/river](https://github.com/riverqueue/river) | `0.16.0` | `0.18.0` |
| [github.com/riverqueue/river/riverdriver/riverdatabasesql](https://github.com/riverqueue/river) | `0.16.0` | `0.18.0` |
| [github.com/riverqueue/river/riverdriver/riverpgxv5](https://github.com/riverqueue/river) | `0.16.0` | `0.18.0` |
| [github.com/riverqueue/river/rivertype](https://github.com/riverqueue/river) | `0.16.0` | `0.18.0` |
| [github.com/spf13/cobra](https://github.com/spf13/cobra) | `1.9.0` | `1.9.1` |
| [golang.org/x/crypto](https://github.com/golang/crypto) | `0.33.0` | `0.34.0` |


Updates `github.com/mnako/letters` from 0.2.3 to 0.2.4
- [Release notes](https://github.com/mnako/letters/releases)
- [Commits](mnako/letters@v0.2.3...v0.2.4)

Updates `github.com/prometheus/client_golang` from 1.20.5 to 1.21.0
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](prometheus/client_golang@v1.20.5...v1.21.0)

Updates `github.com/riverqueue/river` from 0.16.0 to 0.18.0
- [Release notes](https://github.com/riverqueue/river/releases)
- [Changelog](https://github.com/riverqueue/river/blob/master/CHANGELOG.md)
- [Commits](riverqueue/river@v0.16.0...v0.18.0)

Updates `github.com/riverqueue/river/cmd/river` from 0.16.0 to 0.18.0
- [Release notes](https://github.com/riverqueue/river/releases)
- [Changelog](https://github.com/riverqueue/river/blob/master/CHANGELOG.md)
- [Commits](riverqueue/river@v0.16.0...v0.18.0)

Updates `github.com/riverqueue/river/riverdriver/riverdatabasesql` from 0.16.0 to 0.18.0
- [Release notes](https://github.com/riverqueue/river/releases)
- [Changelog](https://github.com/riverqueue/river/blob/master/CHANGELOG.md)
- [Commits](riverqueue/river@v0.16.0...v0.18.0)

Updates `github.com/riverqueue/river/riverdriver/riverpgxv5` from 0.16.0 to 0.18.0
- [Release notes](https://github.com/riverqueue/river/releases)
- [Changelog](https://github.com/riverqueue/river/blob/master/CHANGELOG.md)
- [Commits](riverqueue/river@v0.16.0...v0.18.0)

Updates `github.com/riverqueue/river/rivertype` from 0.16.0 to 0.18.0
- [Release notes](https://github.com/riverqueue/river/releases)
- [Changelog](https://github.com/riverqueue/river/blob/master/CHANGELOG.md)
- [Commits](riverqueue/river@v0.16.0...v0.18.0)

Updates `github.com/spf13/cobra` from 1.9.0 to 1.9.1
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](spf13/cobra@v1.9.0...v1.9.1)

Updates `golang.org/x/crypto` from 0.33.0 to 0.34.0
- [Commits](golang/crypto@v0.33.0...v0.34.0)

---
updated-dependencies:
- dependency-name: github.com/mnako/letters
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-deps
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: github.com/riverqueue/river
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: github.com/riverqueue/river/cmd/river
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: github.com/riverqueue/river/riverdriver/riverdatabasesql
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: github.com/riverqueue/river/riverdriver/riverpgxv5
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: github.com/riverqueue/river/rivertype
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: go-deps
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Feb 22, 2025
@mastercactapus mastercactapus merged commit 0de00f1 into master Feb 27, 2025
8 checks passed
@mastercactapus mastercactapus deleted the dependabot/go_modules/go-deps-5e957aead1 branch February 27, 2025 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file go Pull requests that update Go code size/xs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant