-
Notifications
You must be signed in to change notification settings - Fork 605
Avoid cached data between plugin generation #31308
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
base: integration
Are you sure you want to change the base?
Conversation
…d used to hold merge state and it's used to ensuring each invocation begins with a clean slate, regardless of any prior merges.
5a6cc21
to
afc474b
Compare
!build Note: Target locations of links might be accessible only to IBM employees. |
Code analysis and actionsDO NOT DELETE THIS COMMENT.
|
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.
static
was added here: #24627 we need to understand why that was. If these variables don't need to be static we should fix that. If we have test failures we need to understand why and determine a solution.
I encounter failures when I change private A clue as to why this variable needs to be static is how the merge tool is used, via a singleton-ish pattern:
Another place to look at is where This I have a branch here with some local changes for testing: https://github.com/volosied/open-liberty/tree/TS018131209-vlad The 789a331 commit has all tests passing while the c9fc73d commit has only the |
....ibm.ws.http.plugin.merge/src/com/ibm/ws/http/plugin/merge/internal/PluginMergeToolImpl.java
Outdated
Show resolved
Hide resolved
…set static State method.
I made a new commit to the PR. I reverted a lot of the static variables to instance state instead of resetting the state as a work around. When I say reverted I mean compared to what it was prior to PR #24627. There is only one variable that was left static |
....ibm.ws.http.plugin.merge/src/com/ibm/ws/http/plugin/merge/internal/PluginMergeToolImpl.java
Outdated
Show resolved
Hide resolved
....ibm.ws.http.plugin.merge/src/com/ibm/ws/http/plugin/merge/internal/PluginMergeToolImpl.java
Outdated
Show resolved
Hide resolved
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.
I'd like to see a test added as well
....ibm.ws.http.plugin.merge/src/com/ibm/ws/http/plugin/merge/internal/PluginMergeToolImpl.java
Outdated
Show resolved
Hide resolved
0b99a6e
to
2fe905d
Compare
2fe905d
to
56d0b8b
Compare
@@ -188,7 +192,7 @@ private void printMergedCopy(String output) throws IOException, ParserConfigurat | |||
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); | |||
DocumentBuilder parser = dbf.newDocumentBuilder(); | |||
Document mergeDoc = parser.newDocument(); | |||
final Comment comment = mergeDoc.createComment(" This config file was generated by pluginUtility merge v1.0.73 on " + | |||
final Comment comment = mergeDoc.createComment(" This config file was generated by pluginUtility merge v1.0.75 on " + | |||
dateTimeFormatter.format(ZonedDateTime.now()) + " "); |
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.
I'm not sure how this version is determined and why we go from 73 to 75, can you clarify?
@@ -1,5 +1,5 @@ | |||
/******************************************************************************* | |||
* Copyright (c) 2013, 2023 IBM Corporation and others. | |||
* Copyright (c) 2013, 2025 IBM Corporation and others. |
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.
You can also remove the "contributors" section of the copyright statement. It is no longer needed. I try to clean these up as we touch files.
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.
Cleaning up your commit history would be great, there are commits there with descriptions that don't make sense any longer as the design of the fix has changed since some of the commits were added. Adding a test case as we've discussed would be excellent as well.
Created a private static method that re‑initializes every static field used to hold merge state and it's used to ensuring each invocation begins with a clean slate, regardless of any prior merges.
release bug
label if applicable: https://github.com/OpenLiberty/open-liberty/wiki/Open-Liberty-Conventions).Fixes #31263