This repository was archived by the owner on Jan 23, 2020. It is now read-only.
Creating abstract class, returning booleans, removing dead code, etc..#161
Merged
Conversation
nmuesch
reviewed
Aug 28, 2019
nmuesch
left a comment
Contributor
There was a problem hiding this comment.
Hey, Overall looks good, solid refactor work 💯🏅💜 Took a first pass review and left some comments/questions.
Contributor
Author
|
I manually tested:
|
nmuesch
reviewed
Sep 30, 2019
nmuesch
left a comment
Contributor
There was a problem hiding this comment.
Left comments on the Testing.md file as we discussed 😄Thanks for this.
zippolyte
suggested changes
Sep 30, 2019
zippolyte
approved these changes
Sep 30, 2019
nmuesch
reviewed
Sep 30, 2019
nmuesch
left a comment
Contributor
There was a problem hiding this comment.
one last thing in the testing file :)
| - You can add `node` optional tag by clicking on the node checkbox | ||
| - Click on the "Test Key" to make sure your key is valid. | ||
| - You can set your machine `hostname`. | ||
| - `.*, owner:$1, release_env:$2, optional:Tag3`. |
Contributor
There was a problem hiding this comment.
Is this for the fields textbox? Can we clarify that at the beginning of this line?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does.
events. They all extends an abstract class calledAbstractDatadogEventwith common methods to all event implementations. I all added an common interface calledDatadogClient.modelcalledBuildDatato collect build informations. Before we would use a JSONObject that was harder to work with.DatadogHttpRequestclass into theDatadogHttpClient. This class cannot be instantiated and can now beleasedfrom the descriptor. The same way we used to do with theStatdDClient.DatadogHttpClientimplement a new interface calledDatadogClient. This interface is used to create stubs for testings. See more details below.DatadogHttpClientnow only has methods related to submitting data to datadog. As a consequence, I was able to remove "duplicated-ish" submission methods (eg: thegaugeor theserviceCheckmethod) that were part of other classes like theDatadogBuildListener. I was also able to group all the submission logic inside this new client (that includes constants variables as well)onStarted, theonCompleted, theonCheckoutand thedoRunmethod is now simpler and more readable.DatadogUtilitiesclass. I moved methods to better locations if needed. When used only once, I often removed the method. When called only within the same class, I changed their scope toprivate.DatadogClientStuband aDatadogStatsDClientStubclasses to extend testing capabilities. As a consequence I created more tests to theDatadogBuildListener(onStartedmethod in particular)What is next