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: detect sink URLs with no scheme #68978

Merged
merged 1 commit into from
Aug 16, 2021

Conversation

stevendanna
Copy link
Collaborator

Previously, if a user provided a sink URL with no scheme (such as
kafka%3A%2F%2Fnope%0A), a changefeed job would be started. However,
this changefeed job would be writing into a bufferSink. The
bufferSink is used by core changefeeds.

The user may have provided such a URL because of confusion over how to
URL encode their sink URL.

Now, they will receive an error such as

pq: no scheme found for sink URL "kafka%3A%2F%2Fnope%0A"

Release note (enterprise change): CHANGEFEED statements now error
if the provided sink URL does not contain a scheme. Such URLs are
typically a mistake and will result in non-functional changefeeds.

Previously, if a user provided a sink URL with no scheme (such as
` kafka%3A%2F%2Fnope%0A`), a changefeed job would be started. However,
this changefeed job would be writing into a bufferSink.  The
bufferSink is used by core changefeeds.

The user may have provided such a URL because of confusion over how to
URL encode their sink URL.

Now, they will receive an error such as

```
pq: no scheme found for sink URL "kafka%3A%2F%2Fnope%0A"
```

Release note (enterprise change): CHANGEFEED statements now error
if the provided sink URL does not contain a scheme. Such URLs are
typically a mistake and will result in non-functional changefeeds.
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@stevendanna stevendanna requested a review from HonoreDB August 16, 2021 09:24
Copy link
Contributor

@HonoreDB HonoreDB left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @stevendanna)


pkg/ccl/changefeedccl/sink.go, line 82 at r1 (raw file):

	newSink := func() (Sink, error) {
		if feedCfg.SinkURI == "" {

Ah, that explains where this came from.

@stevendanna
Copy link
Collaborator Author

bors r=HonoreDB

@craig
Copy link
Contributor

craig bot commented Aug 16, 2021

Build succeeded:

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.

3 participants