-
Notifications
You must be signed in to change notification settings - Fork 156
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
Allow copy-file and delete-file to be scheduled #574
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
super(schedule); | ||
this.gradleUserHome = gradleUserHome; | ||
} | ||
|
||
@Override | ||
protected void cleanup() { | ||
protected void executeOnSchedule() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 Note: This change will require also a change of some logic in gradle/gradle
when we upgrade the profiler. I know about this one:
https://github.com/gradle/gradle/blob/9b00b5d6f111a3542959598fb31c5c7181c15972/testing/internal-performance-testing/src/main/groovy/org/gradle/performance/mutator/ClearArtifactTransformCacheWithoutInstrumentedJarsMutator.groovy#L45
It's not a problem but we should be aware of that when we upgrade a profiler.
} | ||
|
||
@Override | ||
public String toString() { | ||
return getClass().getSimpleName() + "(" + schedule + ")"; | ||
} | ||
|
||
public enum CleanupSchedule { | ||
public enum Schedule { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 Also this change will require some changes in gradle/gradle
since we use these constants in few places, e.g.:
https://github.com/gradle/gradle/blob/381460e0f3dca2bb39d77d91e474f390a9ef812b/testing/performance/src/performanceTest/groovy/org/gradle/performance/experiment/declarativedsl/DeclarativeDslFirstUsePerformanceTest.groovy#L49-L54
It's not a problem but we should be aware of that when we upgrade a profiler.
@@ -352,8 +352,10 @@ They can be added to a scenario file like this: | |||
} | |||
delete-file = [{ | |||
target = ".mvn/develocity.xml" | |||
schedule = CLEANUP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Nice
}, { | ||
target = ".gradle" | ||
schedule = CLEANUP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓ This then runs at the start of schedule, right?
Can we maybe add this detail also do README.md that it means at start/before a schedule, or should that be obvious?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I've extracted some words about scheduling mutators.
14ae24e
to
b819eee
Compare
This allows a
copy-file
ordelete-file
to be scheduled to be executed before a scenario, cleanup or build step.