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

changefeedccl: warn when using https sink urls #107572

Merged
merged 2 commits into from Aug 2, 2023

Conversation

HonoreDB
Copy link
Contributor

@HonoreDB HonoreDB commented Jul 25, 2023

Changefeeds previously used http as their URI to align with backups.
Backups no longer support http, and for changefeeds http is ambiguous,
leading users to create cloudstorage sinks when they meant webhook sinks.
This PR changes the scheme to file-http. Webhooks still use webhook-http.

Fixes #98719.

Release note (enterprise change): Changefeeds that create files over an http connection may now be specified via INTO 'file-https://' to disambiguate with webhook-https.

@HonoreDB HonoreDB requested a review from a team as a code owner July 25, 2023 20:15
@HonoreDB HonoreDB requested review from jayshrivastava and removed request for a team July 25, 2023 20:15
@blathers-crl
Copy link

blathers-crl bot commented Jul 25, 2023

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@HonoreDB HonoreDB changed the title changefeedccl: warn on when using https sink urls changefeedccl: warn when using https sink urls Jul 25, 2023
return err
}

if u.Scheme == changefeedbase.SinkSchemeCloudStorageHTTP || u.Scheme == changefeedbase.SinkSchemeCloudStorageHTTPS {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to do that?
Are we going to bother people who want http with needles warning?

Would it be better to add file-http(s) scheme and prepare http(s) scheme for deprecation?

@amruss ?

Copy link
Contributor

@miretskiy miretskiy left a comment

Choose a reason for hiding this comment

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

Please update release note in commit and in PR to indicate deprecation.


if u.Scheme == changefeedbase.DeprecatedSinkSchemeHTTP || u.Scheme == changefeedbase.DeprecatedSinkSchemeHTTP {
p.BufferClientNotice(ctx, pgnotice.Newf(
`%s sinks will emit using cloud storage semantics. For a webhook sink, prepend webhook- to the sink URI. Prepend file- to remove this notice.`,
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe rephrase a bit to avoid using "prepend"? Something like "Use webhook-https for webhook semantics, use file-http:// .."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@HonoreDB HonoreDB force-pushed the warn_on_ambiguous_http_sink branch 2 times, most recently from c68daea to 981979e Compare August 1, 2023 20:21
@HonoreDB
Copy link
Contributor Author

HonoreDB commented Aug 1, 2023

Please update release note in commit and in PR to indicate deprecation.

Release note's in the second commit, merged it into the PR description.

Changefeeds previously used http as their URI to align with backups.
Backups no longer support http, and for changefeeds http is ambiguous,
leading users to create cloudstorage sinks when they meant webhook sinks.
This commit changes the scheme to file-http. Webhooks still use webhook-http.

Informs: cockroachdb#98719

Release note (enterprise change): Changefeeds that create files over an http connection may now be specified via `INTO 'file-https://'` to disambiguate with `webhook-https`.
@HonoreDB HonoreDB force-pushed the warn_on_ambiguous_http_sink branch from 981979e to a428c45 Compare August 2, 2023 14:33
@HonoreDB
Copy link
Contributor Author

HonoreDB commented Aug 2, 2023

bors r=[miretskiy]

@craig
Copy link
Contributor

craig bot commented Aug 2, 2023

Build failed (retrying...):

@craig
Copy link
Contributor

craig bot commented Aug 2, 2023

Build succeeded:

@craig craig bot merged commit c3f3951 into cockroachdb:master Aug 2, 2023
7 checks passed
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.

changefeedccl: when using http sink, warn that it is not webhook
3 participants