Conversation
getsentry's ContractService.set_contract_retention ships with temporary request and response dataclasses. This adds the endpoint messages so the method can take the proto: SetContractRetentionRequest carries the contract id and the complete RetentionConfig to store, and SetContractRetentionResponse returns the RetentionConfig now stored. Both reuse the message that Contract.retention_config exposes on the read side.
|
The latest Buf updates on your PR. Results from workflow ci / buf-checks (pull_request).
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the endpoint messages behind
ContractService.set_contract_retentionin getsentry, which getsentry #21135 shipped with temporary request and response dataclasses and a TODO to switch to the endpoint proto. The method replaces a contract's retention overrides in one write. The admin retention endpoint reaches it through the dual write, and the contract migration job uses it to import legacy retention.One
endpoint_set_contract_retention.proto, mirroringMarkInvoicePaid:SetContractRetentionRequest:contract_idplus aRetentionConfig, the same messageContract.retention_configexposes on the read side, so what a caller reads is what it writes back. The request carries the complete override set: an absent field clears, and an empty config removes the override.SetContractRetentionResponse: theRetentionConfignow stored, with no fields set when the request cleared every field.The getsentry dataclass returns the id of the stored user parameter instead. That is a storage detail of the platform, and nothing in production reads it, so the proto returns the stored override rather than the row id.
The Rust binding is regenerated with
make build-rust;Cargo.lockis left to the codegen bot.