-
Notifications
You must be signed in to change notification settings - Fork 26
Add Separate Logging for Plugin Modernization Failures #913
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
Draft
gounthar
wants to merge
36
commits into
jenkins-infra:main
Choose a base branch
from
gounthar:log-plugin-modernization-failures
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Add Separate Logging for Plugin Modernization Failures #913
gounthar
wants to merge
36
commits into
jenkins-infra:main
from
gounthar:log-plugin-modernization-failures
Conversation
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
Fixes #98 Add separate logging for plugin modernization failures. * Add a new appender in `plugin-modernizer-cli/src/main/resources/logback.xml` to log failures separately in `modernization-failures-YYYYMMDD-HHMMSS.log`. * Update `plugin-modernizer-core/src/main/java/io/jenkins/tools/pluginmodernizer/core/model/Plugin.java` to log failures in the new log file. * Add a method in `plugin-modernizer-core/src/main/java/io/jenkins/tools/pluginmodernizer/core/model/Plugin.java` to log network-related failures in `network-failures-YYYYMMDD-HHMMSS.log`. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/gounthar/plugin-modernizer-tool/issues/98?shareId=XXXX-XXXX-XXXX-XXXX).
…instead of plugin versions
…instead of parent version
… prevent XPath injection
… expressions and strict property name validation
Which version do we need? Can we use the last published version? It's already fetched Yes the current implementation looks fragile |
It's even worse than fragile, it is terrible. 😉 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Please don't merge this pull request, as it is mostly a proof of concept rather than production-ready code.
You already guessed it: some of the tests fail now. 😢
I'm especially not proud of the way I retrieved the plugin's version. I was expecting to use just metadata, but I was not able to do so. 🤦
Whenever I run a "campaign" (e.g., move to JDK 11, move to JDK 17, migrate to JUnit 5), I encounter numerous failures because lots of plugins just can't migrate.
However, these often go unnoticed as I am processing several hundreds of plugins at once. The failures could stem from the plugin being significantly outdated, limitations in a recipe, bugs in the plugin-modernizer, or issues with a recent version of SpotBugs. Unfortunately, valuable information gets buried within lengthy logs.
The goal of this PR is to create a "log file" that documents all plugin modernization attempts that failed, using the format
plugin:version
. This system will allow us to review details later on (by searching within the local cache for the faulty plugins).The format also enables us to reuse the list of failed plugins with another recipe (e.g., after failing with JDK 17, some plugins might succeed when moved to JDK 11). Additionally, it allows us to replay the same recipe after making corrections.
In summary, this tool will help me better manage campaigns and hopefully improve the plugin-modernizer overall.
plugin-modernizer-cli/src/main/resources/logback.xml
to log failures separately inmodernization-failures-YYYYMMDD-HHMMSS.log
.plugin-modernizer-core/src/main/java/io/jenkins/tools/pluginmodernizer/core/model/Plugin.java
to log failures in the new log file.plugin-modernizer-core/src/main/java/io/jenkins/tools/pluginmodernizer/core/model/Plugin.java
to log network-related failures innetwork-failures-YYYYMMDD-HHMMSS.log
.For example, it created for me today a file named
modernization-failures-MigrateToJUnit5-20250403.log
.My "campaign" isn't done yet, but here is the current content of the file:
Testing done
Ran plugin modernizer with a list of very outdated plugins for the
MigrateToJUnit5
recipe.Submitter checklist