Skip to content

MINIFICPP-1232 - PublishKafka processor doesn't validate some properties#794

Closed
adam-markovics wants to merge 2 commits intoapache:masterfrom
adam-markovics:MINIFICPP-1232
Closed

MINIFICPP-1232 - PublishKafka processor doesn't validate some properties#794
adam-markovics wants to merge 2 commits intoapache:masterfrom
adam-markovics:MINIFICPP-1232

Conversation

@adam-markovics
Copy link
Copy Markdown
Contributor

@adam-markovics adam-markovics commented May 25, 2020

Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced
    in the commit message?

  • Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

  • Has your PR been rebased against the latest commit within the target branch (typically master)?

  • Is your initial contribution a single, squashed commit?

For code changes:

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE file?
  • If applicable, have you updated the NOTICE file?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

Note:

Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

core::Property PublishKafka::QueueBufferMaxMessage("Queue Max Message", "Maximum number of messages allowed on the producer queue", "");
core::Property PublishKafka::CompressCodec("Compress Codec", "compression codec to use for compressing message sets", COMPRESSION_CODEC_NONE);

const core::Property PublishKafka::QueueBufferMaxTime(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

to nitpick: with method chaining I don't know what the style guideline is, but I prefer the operator on the next line (and it seems that other properties do it like this, in this file)

Copy link
Copy Markdown
Contributor

@arpadboda arpadboda May 26, 2020

Choose a reason for hiding this comment

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

+1.

That's the way linter accepts it as well, so please change as @adamdebreceni suggest!

Unfortunately this extension is not linted. Yet. :(

Copy link
Copy Markdown
Contributor

@hunyadi-dev hunyadi-dev May 26, 2020

Choose a reason for hiding this comment

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

I like it this way too, so 2/2. Arpad, are you sure this is not accepted by the linter? I see no warnings when trying to add these lines to a linted file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure if this still applies after your linter changes, but previously the linter only accepted the "->" operators to be at the begging of the new line.
If you take a look at standard processors, all use the other format.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in new commit.

Copy link
Copy Markdown
Contributor

@arpadboda arpadboda left a comment

Choose a reason for hiding this comment

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

Looks good, two minor comments.

core::Property PublishKafka::QueueBufferMaxMessage("Queue Max Message", "Maximum number of messages allowed on the producer queue", "");
core::Property PublishKafka::CompressCodec("Compress Codec", "compression codec to use for compressing message sets", COMPRESSION_CODEC_NONE);

const core::Property PublishKafka::QueueBufferMaxTime(
Copy link
Copy Markdown
Contributor

@arpadboda arpadboda May 26, 2020

Choose a reason for hiding this comment

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

+1.

That's the way linter accepts it as well, so please change as @adamdebreceni suggest!

Unfortunately this extension is not linted. Yet. :(

static const core::Property QueueBufferMaxTime;
static const core::Property QueueBufferMaxSize;
static const core::Property QueueBufferMaxMessage;
static const core::Property CompressCodec;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Either all or none pls!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in new commit.

Copy link
Copy Markdown
Contributor

@arpadboda arpadboda left a comment

Choose a reason for hiding this comment

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

LGTM!

@arpadboda arpadboda closed this in 907563b May 26, 2020
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.

4 participants