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

service-weaver 0.18.0 #137607

Merged
merged 2 commits into from
Jul 26, 2023
Merged

Conversation

chenrui333
Copy link
Member

@chenrui333 chenrui333 commented Jul 26, 2023

Created by brew bump


Created with brew bump-formula-pr.

  • resource blocks have been checked for updates.
release notes
## Custom Error Values

Recall that the final return value of every component method must be an error:

// A calculator component. Note that the final return value of every method is an error.
type Calculator interface {
    Add(context.Context, int, int) (int, error)
    Subtract(context.Context, int, int) (int, error)
    Multiply(context.Context, int, int) (int, error)
}

Before v0.18.0, these error values were encoded and decoded using a custom protocol that did not preserve the type of the error. For example, if you returned a custom error value from a component method (e.g., return &customError{}), the caller of the method would not receive an error of the same type.

In v0.18.0, any errors that embed weaver.AutoMarshal will be properly encoded and decoded. Here's a simple example:

type customError struct {
    weaver.AutoMarshal
    msg string
}

Errors that don't embed weaver.AutoMarshal will continue to use our custom protocol.

See ServiceWeaver/weaver#456, ServiceWeaver/weaver#458, and ServiceWeaver/weaver#457 for details.

Tracing

weaver.InstrumentHandler now automatically implements time-based trace sampling for you. We also optimized how we store and query traces on disk, and we now garbage collect old traces. We also improved the tracing UI in weaver single dashboard and weaver multi dashboard. See ServiceWeaver/weaver#450, ServiceWeaver/weaver#459, ServiceWeaver/weaver#460, ServiceWeaver/weaver#464, ServiceWeaver/weaver#465, ServiceWeaver/weaver#472, and ServiceWeaver/weaver#478 for details

weaver.Instance Removed

The weaver.Instance interface was removed (ServiceWeaver/weaver#455). It was not being used and was obsoleted by weaver.InstanceOf[T].

Bug Fixes

Internals

Most of the core weaver implementation has moved to the private internal/weaver package. This has no effect on the users of Service Weaver, but does enable some internal cleanups. For example, we split the weavelet implementation into two separate and much simpler weavelets, one for go run and one for all other deployers. For those interested in learning more about the internals of Service Weaver, this change should make it much easier to understand what's going on under the hood. See ServiceWeaver/weaver#461 and ServiceWeaver/weaver#466 for details.

Full Changelog: ServiceWeaver/weaver@v0.17.0...v0.18.0

@github-actions github-actions bot added go Go use is a significant feature of the PR or issue bump-formula-pr PR was created using `brew bump-formula-pr` labels Jul 26, 2023
service-weaver: weaver-gke 0.18.0

Signed-off-by: Rui Chen <rui@chenrui.dev>
@github-actions
Copy link
Contributor

🤖 An automated task has requested bottles to be published to this PR.

@github-actions github-actions bot added the CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. label Jul 26, 2023
@BrewTestBot BrewTestBot added this pull request to the merge queue Jul 26, 2023
Merged via the queue into Homebrew:master with commit 01c4479 Jul 26, 2023
12 checks passed
@chenrui333 chenrui333 deleted the bump-service-weaver-0.18.0 branch January 22, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump-formula-pr PR was created using `brew bump-formula-pr` CI-published-bottle-commits The commits for the built bottles have been pushed to the PR branch. go Go use is a significant feature of the PR or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants