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

Phil/discover name validation #1365

Merged
merged 3 commits into from
Feb 7, 2024
Merged

Conversation

psFried
Copy link
Member

@psFried psFried commented Feb 5, 2024

Description:

Addresses a bug I found while troubleshooting a production issue, and adds better logging in case we try to insert another draft spec with an invalid name. The lack of normalization was not the cause of the issue we saw last week, but it certainly would present similarly if a connector returned a recommended collection name that wasn't normalized, since nfkc normalization is required by our postgres constraints.


This change is Reviewable

@psFried psFried force-pushed the phil/discover-name-validation branch from f33184e to 52ced95 Compare February 5, 2024 21:50
Copy link
Member

@jgraettinger jgraettinger left a comment

Choose a reason for hiding this comment

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

LGTM, but if a connector produces an empty recommended name, that would still cause the agent to fail, right?

Should we a) normalize "" to "_", or b) make this a draft error (though I'm not sure what the User is supposed to do about it)

@psFried
Copy link
Member Author

psFried commented Feb 6, 2024

Yeah, the agent will still fail. I was thinking that it's essentially a connector bug, and that for now just having better visibility is helpful. Happy to add another commit to either make this a draft error or normalize the empty string to something else. IMO, making it a draft error is probably the better option at this stage.

@jgraettinger
Copy link
Member

K, I think we punt for now but do want to remember this, because it could come up once we allow user-defined connectors.

When the discovered response doesn't include a `recommended_name` for one
of the bindings, insert a draft error instead of crashing the agent.
This is really a connector bug, but we want the agent to be tolerant
of those.
@psFried psFried merged commit b738b2b into master Feb 7, 2024
3 checks passed
@psFried psFried deleted the phil/discover-name-validation branch February 7, 2024 00:41
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