Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

Downstream test and upgrade unified #352

Merged
merged 2 commits into from
Aug 23, 2017
Merged

Downstream test and upgrade unified #352

merged 2 commits into from
Aug 23, 2017

Conversation

wwilk
Copy link
Contributor

@wwilk wwilk commented Aug 22, 2017

No description provided.

Copy link
Member

@mockitoguy mockitoguy left a comment

Choose a reason for hiding this comment

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

Thank you for quick turnaround. Please consider my feedback and push at will.

Ship it!

@@ -15,9 +15,9 @@
/**
* This task run external process and additionally store output of external process to file.
*/
public class RunTestReleaseTask extends DefaultTask {
public class RunDownstreamTestTask extends DefaultTask {
Copy link
Member

Choose a reason for hiding this comment

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

It seems that the name of this task is too specific. The task only runs an arbitrary command, and is not coupled with downstream testing. The only thing that couples the implementation of this task with downstream testing is the repo name and log message emitted before the task runs, which can be managed differently, e.g.

How about calling this task 'SilentExecTask'?


private static final Logger LOG = Logging.getLogger(RunTestReleaseTask.class);
private static final Logger LOG = Logging.getLogger(RunDownstreamTestTask.class);

Copy link
Member

Choose a reason for hiding this comment

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

The 'repoName' property on this task is somewhat awkward. It's only used for logging the message. Perhaps we can push the message to doFirst action? Or change the 'repoName' property to 'displayName'. Then, in code we would print

LOG.lifecycle("  Running {}. The output will be saved in {}", ...); 

@@ -1,3 +1,3 @@
rootProject.name="shipkit"

include "downstreamTest"
include "testDownstream"
Copy link
Member

Choose a reason for hiding this comment

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

I like the new name! Consistent with our conventions!!!

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RepositoryNameUtil {
Copy link
Member

Choose a reason for hiding this comment

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

Nice utility class that encapsulates complexity in a single spot, making the codebase easy to read. Cool :)

@@ -10,7 +10,8 @@
import java.util.List;

import static java.util.Arrays.asList;
import static org.shipkit.internal.gradle.util.StringUtil.capitalize;
import static org.apache.commons.lang.StringUtils.capitalize;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this change on purpose?
I'd rather stay with our StringUtil in order to minimize dependencies on external libs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, thanks! Definitely not on purpose :)

@wwilk
Copy link
Contributor Author

wwilk commented Aug 23, 2017

Suggestions applied and merging

@wwilk wwilk merged commit bebb46a into master Aug 23, 2017
@wwilk wwilk deleted the ww3 branch August 23, 2017 12:09
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.

3 participants