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

Dedicated connectors #4956

Merged
merged 9 commits into from
May 30, 2024
Merged

Dedicated connectors #4956

merged 9 commits into from
May 30, 2024

Conversation

esevastyanov
Copy link
Contributor

@esevastyanov esevastyanov commented May 24, 2024

Closes #4967

@esevastyanov esevastyanov marked this pull request as ready for review May 29, 2024 11:26
@@ -499,3 +500,17 @@ message ExecutionError {
message CharLocation {
uint32 line = 1;
}

message ConnectorSpec {
string name = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't need a name field here because every resource already has a name (in meta.name.name)

// Dedicated S3 connector
"/connectors/s3-dedicated.yaml": `
driver: s3
name: s3-dedicated
Copy link
Contributor

Choose a reason for hiding this comment

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

The name defaults to the filename without extensions (for all resources), so not necessary to set explicitly

Comment on lines 564 to 570

instance, err := r.get(iwc.instanceID)
if err != nil {
return err
}

p, err := rillv1.Parse(iwc.ctx, repo, iwc.instanceID, instance.Environment, instance.OLAPConnector)
Copy link
Contributor

Choose a reason for hiding this comment

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

There's a call to ParseRillYAML right above that I think is also redundant now that it's anyway doing a full parse. Should be able to just check if rill.yaml is missing by accessing p.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it is redundant. I also simplified a definition of UpdateInstanceWithRillYAML that is called next

@nishantmonu51 nishantmonu51 added the blocker A release blocker issue that should be resolved before a new release label May 30, 2024
Comment on lines 20 to 23
name := tmp.Name
if name == "" {
name = node.Name
}
Copy link
Contributor

@begelundmuller begelundmuller May 30, 2024

Choose a reason for hiding this comment

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

Can be removed and just use node.Name directly. The name inference logic is already applied in parseStem:

// If name is not set in YAML or SQL, infer it from path

@begelundmuller begelundmuller merged commit ca99688 into main May 30, 2024
7 checks passed
@begelundmuller begelundmuller deleted the dedicated-connectors branch May 30, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker A release blocker issue that should be resolved before a new release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dedicated connectors
3 participants