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

feat: add new groundwork output plugin #9891

Merged
merged 13 commits into from
Nov 30, 2021

Conversation

VladislavSenkevich
Copy link
Contributor

@VladislavSenkevich VladislavSenkevich commented Oct 8, 2021

Required for all PRs:

@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Oct 8, 2021

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@telegraf-tiger telegraf-tiger bot added fix pr to fix corresponding bug new plugin plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins labels Oct 8, 2021
@Hipska Hipska self-assigned this Oct 11, 2021
Copy link
Contributor

@Hipska Hipska left a comment

Choose a reason for hiding this comment

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

Great to see a Groundwork output integrated in telegraf! I do have some comments:

@Hipska Hipska removed the fix pr to fix corresponding bug label Oct 11, 2021
@Hipska Hipska requested a review from srebhan October 11, 2021 09:16
@telegraf-tiger
Copy link
Contributor

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@telegraf-tiger
Copy link
Contributor

Thanks so much for the pull request!
🤝 ✒️ Just a reminder that the CLA has not yet been signed, and we'll need it before merging. Please sign the CLA when you get a chance, then post a comment here saying !signed-cla

@VladislavSenkevich
Copy link
Contributor Author

Great to see a Groundwork output integrated in telegraf! I do have some comments:

Thank you for your feedback! I prepared another commit to support all your change requests

Copy link
Contributor

@Hipska Hipska left a comment

Choose a reason for hiding this comment

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

Don't forget to also update the README file with new config options, and maybe some examples of which tags should or could be present and how they will used by GW?

Note that there are also a lot of linter warnings, and you need to sign the CLA.

@VladislavSenkevich
Copy link
Contributor Author

!signed-cla

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Hey @VladislavSenkevich, I think this is a very nice and valuable PR. Thanks for the contribution!

The code currently is IMO more complex than necessary. Please get rid of most of the addon stuff. Implement Timestamp in a way that only the required MarshalJSON is implemented and base it on time.Time (as @Hipska suggested). Furthermore, fold the sendRequest() function into the main package. The same holds for your time definitions.

@srebhan srebhan self-assigned this Oct 12, 2021
@srebhan
Copy link
Member

srebhan commented Oct 28, 2021

@VladislavSenkevich any update here?

@VladislavSenkevich
Copy link
Contributor Author

@VladislavSenkevich any update here?

We are working on a library from our Go side to avoid code duplication and will be back soon to make the plugin lighter

@srebhan
Copy link
Member

srebhan commented Oct 28, 2021

This sounds amazing! I keep my fingers crossed and looking forward to the new plugin layout.

@Hipska
Copy link
Contributor

Hipska commented Oct 28, 2021

Great! Could you maybe mark this PR as draft in the meantime?

@Hipska
Copy link
Contributor

Hipska commented Nov 29, 2021

Hey @VladislavSenkevich I think you will need to recheck your last push, it seems like some find and replace messed up some other unrelated stuff..

@VladislavSenkevich
Copy link
Contributor Author

VladislavSenkevich commented Nov 29, 2021

Hey @VladislavSenkevich I think you will need to recheck your last push, it seems like some find and replace messed up some other unrelated stuff..

Yes, sorry! Jusr renamed using GoLand and didn't notice changes to other files
P.S Fixed

@Hipska
Copy link
Contributor

Hipska commented Nov 29, 2021

The tests also fail. Apart from that and the thresholds problem, all seems fine for me.

@VladislavSenkevich
Copy link
Contributor Author

VladislavSenkevich commented Nov 30, 2021

The tests also fail. Apart from that and the thresholds problem, all seems fine for me.

Thresholds problem has been fixed. The same for tests.
And Thomas Stocking still working on the license issue.

@VladislavSenkevich VladislavSenkevich changed the title feat: add new gw8 output plugin feat: add new groundwork output plugin Nov 30, 2021
Copy link
Contributor

@Hipska Hipska left a comment

Choose a reason for hiding this comment

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

There is still a linter check that fails.

Note that there will be a RC release tomorrow, would be nice if the license problem could be fixed.

@Hipska Hipska requested a review from zak-pawel November 30, 2021 10:31
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Nice update @VladislavSenkevich! There are a few comments from my side. Please also care about the markdown linter-issues...

Comment on lines +81 to +76
if g.DefaultHost == "" {
return errors.New("no 'default_host' provided")
}
if g.ResourceTag == "" {
return errors.New("no 'resource_tag' provided")
}
if !validStatus(g.DefaultServiceState) {
return errors.New("invalid 'default_service_state' provided")
}
Copy link
Member

@srebhan srebhan Nov 30, 2021

Choose a reason for hiding this comment

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

Right. Other plugins handle empty strings set by the user just as if they have set the default. In this case, you can move the default handling in here and just use the default if the string is empty, no matter if not set or explicitly set empty by the user.
This makes the code a bit cleaner, but if you insist on the present behavior, you should at least add a comment on why you do so.

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Looks like you want to keep the default handling as-is!?

Looks good from my side. Thanks @VladislavSenkevich for your effort!

Please be aware that the current license of the dependency CANNOT BE USED!

@VladislavSenkevich
Copy link
Contributor Author

Looks like you want to keep the default handling as-is!?

Looks good from my side. Thanks @VladislavSenkevich for your effort!

Please be aware that the current license of the dependency CANNOT BE USED!

Thanks! I will conract Thomas in an hour about the license. I hope we will resolve this issue today

@VladislavSenkevich
Copy link
Contributor Author

Please be aware that the current license of the dependency CANNOT BE USED!

@srebhan
@Hipska

The license has been updated. Please review.
Thank you for your patience guys!

@srebhan
Copy link
Member

srebhan commented Nov 30, 2021

The license has been updated. Please review.

@VladislavSenkevich please update the information in the LICENSE_OF_DEPENDENCIES.md file.

@VladislavSenkevich
Copy link
Contributor Author

The license has been updated. Please review.

@VladislavSenkevich please update the information in the LICENSE_OF_DEPENDENCIES.md file.

Looks like I forgot to push... Done now

@telegraf-tiger
Copy link
Contributor

@reimda reimda merged commit 27dea9b into influxdata:master Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new plugin plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants