-
Notifications
You must be signed in to change notification settings - Fork 8
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
Complete adoption into OpenRewrite GitHub Org #4
Comments
Most of the items above can be ticked off by looking at sibling modules, some such as the |
- Apply license header to all files - Remove unnecessary gradle plugins - Specify type arguments in Java-8-compatible source Issue #4
Pin to Guice 6.x. Move test to src/test/java. Issue #4
@timtebeek it looks like the detach fork request needs to come from an OpenRewrite admin. I tried it here, but got this message. Transcript:
|
Thanks! I've put an application as well; last time around it took only a couple hours I believe, so thanks for the reminder and link to get this started. And great to already see so many commits tagging this issue; looking forward to what you'll do with it! :) |
Back from my travels and realized I'd forgotten to add this module to the platform before I left; your tweet was a nice reminder! I've gone and deployed the latest snapshot to https://app.moderne.io/marketplace/org.openrewrite.jenkins such that you can now also run your Java recipes there easily; let me know if you'd ever want a new snapshot to be deployed; we typically do so weekly. |
…es of a recipe Issue openrewrite#4 Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.java.recipes.SelectRecipeExamples Co-authored-by: Moderne <team@moderne.io>
…es of a recipe (#7) Issue #4 Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.java.recipes.SelectRecipeExamples Co-authored-by: Moderne <team@moderne.io>
Thanks @timtebeek! Is slack the best place for a snapshot deployment request? It looks like the platform already has the logo, so I added the category.yml and checked that task. Looking at the module adding tasks next. I ran the Also had a question about recipe structuring -- should I keep the recipes separate by version? I was modeling this a bit like the spring boot recipes, where the 2.x to 3.x recipe would call all the intermediate recipes (2.1 to 2.2). I liked this for a couple reasons:
I'm now a bit worried that we'll end up with hundreds of these recipes, since Jenkins tooling upgrades happen fast. So an alternative would be to maintain fewer, larger recipes ( |
Slack works and could be faster; I've gone ahead and deployed the latest snapshot just now!
Awesome; merged those two PRs and crossed them off above. Thanks for adding the
That's odd indeed; I'd have expected it to be added there as well; I don't see any issues with ingestion or the test itself, and from the SelectRecipeExamples implementation can't work out why it wasn't applied. 🤔 For this project I guess we're going to either add some of those manually, or try to find and fix the issue with the recipe. :/ |
Good question; I don't know too much about the Jenkins internals, but I imagine you have a couple large bump versions, that have proven a hurdle in adoption, for instance by requiring more extensive changes, or upgrades to Java 8, 11, Jakarta, etc.. It could make sense then to treat those as "major" versions that each get their own yaml file, which can contain multiple documents to pull people up to that version, while chaining in any previous versions. That way plugin developers are able pick from a number of well known reference points to pick up all changes up to that point, and migrate and review in steps. So rather than having potentially hundreds of individual recipes and files for each Jenkins version, instead pick a few reference points and group them that way. Would that be an approach that sounds feasible here? |
Looks like we ran through all the tasks set out in the initial issue above; all that's left then is to do an initial release I suppose, such that we can include this module with the next release of OpenRewrite and all it's modules. Are we ready for such a release? Or is there anything else you'd want to cover? |
I'd like to try grouping by reference point as you suggested above, but that doesn't need to hold up an initial release if you'd prefer to do that sooner -- I see that rewrite-recipe-markdown-generator is failing due to not having an initial release. |
I'll ping @mike-solomon to let him now we'd need to create a We can close this issue after that initial release; and can of course continue the above discussions even after it's closed. |
Sounds great! Could we get a snapshot deployed (whenever it's convenient) so I could see how some recent changes look on the platform? I've made a few changes recently:
Locally the changes are looking good. I've upgraded a couple plugins and have seen their builds pass. There are a couple nice-to-haves still on my list:
type: specs.openrewrite.org/v1beta/style
name: io.jenkins.plugins.style
styleConfigs:
- org.openrewrite.xml.style.TabsAndIndentsStyle:
useTabCharacter: false
tabSize: 4
indentSize: 4 |
Changes look good to me; thanks again! Deployed the latest snapshot to https://app.moderne.io/marketplace/org.openrewrite.jenkins
Not sure why those other three tests are failing, but the first noop test fails with a NPE that might also affect runs on projects that already contain a jelly file; here's what I'd suggest to prevent that NPE: diff --git a/src/main/java/org/openrewrite/jenkins/CreateIndexJelly.java b/src/main/java/org/openrewrite/jenkins/CreateIndexJelly.java
index fa13391..11db884 100644
--- a/src/main/java/org/openrewrite/jenkins/CreateIndexJelly.java
+++ b/src/main/java/org/openrewrite/jenkins/CreateIndexJelly.java
@@ -52,7 +52,7 @@ public class CreateIndexJelly extends ScanningRecipe<CreateIndexJelly.Scanned> {
public TreeVisitor<?, ExecutionContext> getVisitor(Scanned acc) {
return Preconditions.check(acc.isJenkinsPlugin, new CreateTextFile(
acc.description,
- acc.indexJellyPath.toString(),
+ acc.indexJellyPath,
true
).getVisitor());
}
@@ -77,7 +77,7 @@ public class CreateIndexJelly extends ScanningRecipe<CreateIndexJelly.Scanned> {
.orElse(pom.getMarkers().findFirst(MavenResolutionResult.class)
.map(maven -> maven.getPom().getArtifactId())
.orElseThrow(() -> new IllegalStateException("Expected to find an artifact id")));
- acc.indexJellyPath = sourceFile.getSourcePath().resolve("../src/main/resources/index.jelly").normalize();
+ acc.indexJellyPath = sourceFile.getSourcePath().resolve("../src/main/resources/index.jelly").normalize().toString();
acc.isJenkinsPlugin = true;
}
}
@@ -89,6 +89,6 @@ public class CreateIndexJelly extends ScanningRecipe<CreateIndexJelly.Scanned> {
static class Scanned {
boolean isJenkinsPlugin;
String description;
- Path indexJellyPath;
+ String indexJellyPath;
}
}
Hmm; we might need to pass that style in when ingesting; although we typically get away with detecting the style as long as it's consistent. In the case of that pom.xml file the elements under |
With the release of https://github.com/openrewrite/rewrite-jenkins/releases/tag/v0.2.0 we can close this issue. Thanks again for starting this effort, and all the work done so far in the adoption, running recipes at scale, and spreading the word about your results. ❤️ |
What problem are you trying to solve?
Because this project started out independently, it diverges from other OpenRewrite modules, making it slightly harder to maintain automatically.
Describe the solution you'd like
Ensure we use the code style, CI and release pipeline from OpenRewrite.
@DocumentExample
to tests for documentationjava-version
Have you considered any alternatives or workarounds?
No; it's preferred for projects to look alike, such that we can maintain, release and document them with ease.
The text was updated successfully, but these errors were encountered: