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

feat(generic-metrics): Redo Add base64 support to metrics schemas #256

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

ayirr7
Copy link
Member

@ayirr7 ayirr7 commented Apr 25, 2024

Reverts #255

@ayirr7 ayirr7 requested review from a team as code owners April 25, 2024 18:10
@ayirr7 ayirr7 changed the title feat(generic-metrics): Add base64 support to metrics schemas feat(generic-metrics): Redo Add base64 support to metrics schemas Apr 25, 2024
Copy link

versions in use:

The following repositories use one of the schemas you are editing. It is recommended to roll out schema changes in small PRs, meaning that if those used versions lag behind the latest, it is probably best to update those services before rolling out your change.

  • getsentry/snuba: pip:sentry-kafka-schemas==0.1.71
  • getsentry/snuba: rust:sentry-kafka-schemas==0.1.71
  • getsentry/relay: rust:sentry-kafka-schemas==0.1.66 (upgrade)
  • getsentry/sentry: pip:sentry-kafka-schemas==0.1.70 (upgrade)

latest version: 0.1.71

changes considered breaking

schemas/ingest-metrics.v1.schema.json

  • Removed a property count from .value.<anyOf:3>, so it is no longer accepted. Maybe use additionalProperties?

    {"path": ".value.<anyOf:3>", "change": {"PropertyRemove": {"lhs_additional_properties": false, "removed": "count"}}}
    
  • Removed a property last from .value.<anyOf:3>, so it is no longer accepted. Maybe use additionalProperties?

    {"path": ".value.<anyOf:3>", "change": {"PropertyRemove": {"lhs_additional_properties": false, "removed": "last"}}}
    
  • Removed a property max from .value.<anyOf:3>, so it is no longer accepted. Maybe use additionalProperties?

    {"path": ".value.<anyOf:3>", "change": {"PropertyRemove": {"lhs_additional_properties": false, "removed": "max"}}}
    
  • Removed a property min from .value.<anyOf:3>, so it is no longer accepted. Maybe use additionalProperties?

    {"path": ".value.<anyOf:3>", "change": {"PropertyRemove": {"lhs_additional_properties": false, "removed": "min"}}}
    
  • Removed a property sum from .value.<anyOf:3>, so it is no longer accepted. Maybe use additionalProperties?

    {"path": ".value.<anyOf:3>", "change": {"PropertyRemove": {"lhs_additional_properties": false, "removed": "sum"}}}
    
  • {"path": ".value.<anyOf:3>", "change": {"RequiredAdd": {"property": "data"}}}
    
  • {"path": ".value.<anyOf:3>", "change": {"RequiredAdd": {"property": "format"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".value.<anyOf:4>", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "count"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".value.<anyOf:4>", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "last"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".value.<anyOf:4>", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "max"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".value.<anyOf:4>", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "min"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".value.<anyOf:4>", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "sum"}}}
    
  • {"path": ".value.<anyOf:4>", "change": {"RequiredAdd": {"property": "count"}}}
    
  • {"path": ".value.<anyOf:4>", "change": {"RequiredAdd": {"property": "last"}}}
    
  • {"path": ".value.<anyOf:4>", "change": {"RequiredAdd": {"property": "max"}}}
    
  • {"path": ".value.<anyOf:4>", "change": {"RequiredAdd": {"property": "min"}}}
    
  • {"path": ".value.<anyOf:4>", "change": {"RequiredAdd": {"property": "sum"}}}
    

schemas/snuba-generic-metrics.v1.schema.json

  • Removed a property count from .value.<anyOf:3>, so it is no longer accepted. Maybe use additionalProperties?

    {"path": ".value.<anyOf:3>", "change": {"PropertyRemove": {"lhs_additional_properties": false, "removed": "count"}}}
    
  • Removed a property last from .value.<anyOf:3>, so it is no longer accepted. Maybe use additionalProperties?

    {"path": ".value.<anyOf:3>", "change": {"PropertyRemove": {"lhs_additional_properties": false, "removed": "last"}}}
    
  • Removed a property max from .value.<anyOf:3>, so it is no longer accepted. Maybe use additionalProperties?

    {"path": ".value.<anyOf:3>", "change": {"PropertyRemove": {"lhs_additional_properties": false, "removed": "max"}}}
    
  • Removed a property min from .value.<anyOf:3>, so it is no longer accepted. Maybe use additionalProperties?

    {"path": ".value.<anyOf:3>", "change": {"PropertyRemove": {"lhs_additional_properties": false, "removed": "min"}}}
    
  • Removed a property sum from .value.<anyOf:3>, so it is no longer accepted. Maybe use additionalProperties?

    {"path": ".value.<anyOf:3>", "change": {"PropertyRemove": {"lhs_additional_properties": false, "removed": "sum"}}}
    
  • {"path": ".value.<anyOf:3>", "change": {"RequiredAdd": {"property": "data"}}}
    
  • {"path": ".value.<anyOf:3>", "change": {"RequiredAdd": {"property": "format"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".value.<anyOf:4>", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "count"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".value.<anyOf:4>", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "last"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".value.<anyOf:4>", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "max"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".value.<anyOf:4>", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "min"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".value.<anyOf:4>", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "sum"}}}
    
  • {"path": ".value.<anyOf:4>", "change": {"RequiredAdd": {"property": "count"}}}
    
  • {"path": ".value.<anyOf:4>", "change": {"RequiredAdd": {"property": "last"}}}
    
  • {"path": ".value.<anyOf:4>", "change": {"RequiredAdd": {"property": "max"}}}
    
  • {"path": ".value.<anyOf:4>", "change": {"RequiredAdd": {"property": "min"}}}
    
  • {"path": ".value.<anyOf:4>", "change": {"RequiredAdd": {"property": "sum"}}}
    
benign changes

schemas/ingest-metrics.v1.schema.json

  • Added a new property.

    {"path": ".value.<anyOf:3>", "change": {"PropertyAdd": {"lhs_additional_properties": false, "added": "data"}}}
    
  • Added a new property.

    {"path": ".value.<anyOf:3>", "change": {"PropertyAdd": {"lhs_additional_properties": false, "added": "format"}}}
    
  • {"path": ".value.<anyOf:3>", "change": {"RequiredRemove": {"property": "count"}}}
    
  • {"path": ".value.<anyOf:3>", "change": {"RequiredRemove": {"property": "last"}}}
    
  • {"path": ".value.<anyOf:3>", "change": {"RequiredRemove": {"property": "max"}}}
    
  • {"path": ".value.<anyOf:3>", "change": {"RequiredRemove": {"property": "min"}}}
    
  • {"path": ".value.<anyOf:3>", "change": {"RequiredRemove": {"property": "sum"}}}
    

schemas/snuba-generic-metrics.v1.schema.json

  • Added a new property.

    {"path": ".value.<anyOf:3>", "change": {"PropertyAdd": {"lhs_additional_properties": false, "added": "data"}}}
    
  • Added a new property.

    {"path": ".value.<anyOf:3>", "change": {"PropertyAdd": {"lhs_additional_properties": false, "added": "format"}}}
    
  • {"path": ".value.<anyOf:3>", "change": {"RequiredRemove": {"property": "count"}}}
    
  • {"path": ".value.<anyOf:3>", "change": {"RequiredRemove": {"property": "last"}}}
    
  • {"path": ".value.<anyOf:3>", "change": {"RequiredRemove": {"property": "max"}}}
    
  • {"path": ".value.<anyOf:3>", "change": {"RequiredRemove": {"property": "min"}}}
    
  • {"path": ".value.<anyOf:3>", "change": {"RequiredRemove": {"property": "sum"}}}
    

⚠️ This PR contains breaking changes. Normally you should avoid that and make
your consumer backwards-compatible (meaning that updated consumers can still
accept old messages). There are a few exceptions:

  • If consumers already require these invariants in practice, and you're
    just adjusting the JSON schema to reality, ignore this warning.

  • If you know what you are doing, this change could potentially be rolled out
    to producers first, but that's not a flow we support.

@ayirr7 ayirr7 merged commit 4d802d8 into main Apr 25, 2024
12 of 14 checks passed
@ayirr7 ayirr7 deleted the revert-255-revert-252-base64-metrics-schemas branch April 25, 2024 18:30
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.

None yet

2 participants