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(uptime): Add request{method,headers,body} fields #330

Merged

Conversation

evanpurkhiser
Copy link
Member

Adds to the uptime-configs topic schema the ability to specify method, headers, and body

@evanpurkhiser evanpurkhiser requested a review from a team as a code owner September 13, 2024 21:22
Copy link

github-actions bot commented Sep 13, 2024

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/uptime-checker: rust:sentry-kafka-schemas==0.1.103 (upgrade)
  • getsentry/sentry: pip:sentry-kafka-schemas==0.1.106 (upgrade)

latest version: 0.1.107

changes considered breaking

schemas/uptime-configs.v1.schema.json

  • 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": "", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "request_body"}}}
    
  • 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": "", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "request_headers"}}}
    
  • 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": "", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "request_method"}}}
    

⚠️ 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.

@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/feat-uptime-add-request-method-header-body-options branch from 966cbec to 9fa59ef Compare September 13, 2024 21:26
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/feat-uptime-add-request-method-header-body-options branch from 2d9a1af to 8291637 Compare September 13, 2024 21:52
Comment on lines +45 to +47
"request_body": {
"description": "Additional HTTP headers to send with the request",
"type": "string"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that I'm thinking about it... should the body also just be a json dict? Mostly people are sending specific key/val params here right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no I think it's very reasonable someone might want to pass xml or some other format

@wedamija wedamija merged commit 794a5f7 into main Sep 16, 2024
15 of 17 checks passed
@wedamija wedamija deleted the evanpurkhiser/feat-uptime-add-request-method-header-body-options branch September 16, 2024 17:17
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