Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.

Conversation

@amolkokane-cirus
Copy link

Fixed an issue with macros not working
Added missing javadocs
Changed copyright to 2020

@rmstar rmstar requested a review from CuriousVini July 10, 2020 19:04
IdUtils.validateReferenceName(config.referenceName, failureCollector);

config.validate(failureCollector);
config.validate(pipelineConfigurer.getStageConfigurer().getInputSchema());
Copy link

Choose a reason for hiding this comment

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

Input schema can be null if the previous stage's output schema is a macro.

Copy link

Choose a reason for hiding this comment

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

Please try testing with a pipeline where schema fields are macro params. You could try something like source -> wrangler -> sendgrid sink

Copy link
Author

Choose a reason for hiding this comment

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

TODO

Copy link

Choose a reason for hiding this comment

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

TODO should be in the code, not a comment on the PR.

Choose a reason for hiding this comment

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

Code updated with ToDO and created JIRA issue https://issues.cask.co/browse/PLUGIN-359

}

/**
* Returns the string.
Copy link

Choose a reason for hiding this comment

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

Please write a more descriptive comment.
Also, @return string doesn't tell us what is being returned. We already know that the return type is String.
Similar comment in other places in the PR.

Copy link
Author

Choose a reason for hiding this comment

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

Done

}

private void checkReplyTo() {
if (!Strings.isNullOrEmpty(config.getReplyTo()) && validateEmail(config.getReplyTo())) {
Copy link

Choose a reason for hiding this comment

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

why is this the opposite of checkFrom?
if (!Strings.isNullOrEmpty(config.getReplyTo()) && validateEmail(config.getReplyTo()))
vs
if (Strings.isNullOrEmpty(config.getFrom()) || !validateEmail(config.getFrom()))

Copy link
Author

Choose a reason for hiding this comment

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

This is opposite because ReplyTo config is not mandatory. Moreover, we found another bug in the same validation code so fixed that too.

…nk) (data-integrations#2)

Co-authored-by: Mikkin Patel <mikkin@google.com>
Fixed an issue with macros not working
Added missing javadocs
Changed copyright to 2020
Modified to implement PR comments
Added TODO in code and JIRA ticket ID
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@CuriousVini CuriousVini merged commit 3082afa into data-integrations:develop Aug 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants