Skip to content
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

For Var processing changes in ci.common testing #919

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

arunvenmany-ibm
Copy link
Contributor

No description provided.

if (scd == null || !scd.getServerXML().getCanonicalPath().equals(serverXML.getCanonicalPath())) {
scd = new ServerConfigDocument(log, serverXML, configDir, bootstrapFile, bootstrapProp, serverEnvFile, giveConfigDirPrecedence, libertyDirPropertyFiles)
protected ServerConfigDocument getServerConfigDocument(CommonLogger log, Map<String, File> libertyDirPropertyFiles) throws IOException {
if (scd == null) {
Copy link
Member

Choose a reason for hiding this comment

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

So this seems problematic. Before we were checking to see if the path for the server.xml file changed and if so we recreated the ServerConfigDocument. Now we cannot tell if it changed. Makes me wonder if we should always create a new ServerConfigDocument, but that is a lot of processing that happens.

@@ -86,8 +86,7 @@ class StartTask extends AbstractServerTask {
if (serverConfigFile != null && serverConfigFile.exists()) {
try {
Map<String,String> props = combinedBootstrapProperties == null ? convertPropertiesToMap(server.bootstrapProperties) : combinedBootstrapProperties;
getServerConfigDocument(new CommonLogger(project), serverConfigFile, server.configDirectory, server.bootstrapPropertiesFile, props, server.serverEnvFile,
false, getLibertyDirectoryPropertyFiles(null));
scd = getServerConfigDocument(new CommonLogger(project), getLibertyDirectoryPropertyFiles(null));
Copy link
Member

Choose a reason for hiding this comment

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

I don't think the line before this needs to be done anymore. The bootstrap.properties file in the server dir will be used and should have all the combined properties already.

@@ -79,8 +79,7 @@ class UndeployTask extends AbstractServerTask {
File serverXML = new File(getServerDir(project).getCanonicalPath(), "server.xml")

try {
getServerConfigDocument(new CommonLogger(project), serverXML, server.configDirectory,
server.bootstrapPropertiesFile, combinedBootstrapProperties, server.serverEnvFile, false, getLibertyDirectoryPropertyFiles(null))
scd= getServerConfigDocument(new CommonLogger(project), getLibertyDirectoryPropertyFiles(null))
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you need to get serverXML at line 79 any more.

@@ -682,8 +682,7 @@ class DeployTask extends AbstractServerTask {
File serverXML = new File(getServerDir(project).getCanonicalPath(), "server.xml")

try {
scd = getServerConfigDocument(new CommonLogger(project), serverXML, server.configDirectory,
server.bootstrapPropertiesFile, combinedBootstrapProperties, server.serverEnvFile, false, getLibertyDirectoryPropertyFiles(null))
scd = getServerConfigDocument(new CommonLogger(project), getLibertyDirectoryPropertyFiles(null))
Copy link
Member

Choose a reason for hiding this comment

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

You don't need to get serverXML anymore at line 682.

@@ -520,8 +519,7 @@ abstract class AbstractServerTask extends AbstractLibertyTask {
if (serverConfigFile != null && serverConfigFile.exists()) {
try {
Map<String,String> props = combinedBootstrapProperties == null ? convertPropertiesToMap(server.bootstrapProperties) : combinedBootstrapProperties;
getServerConfigDocument(new CommonLogger(project), serverConfigFile, server.configDirectory, server.bootstrapPropertiesFile, props, server.serverEnvFile,
false, getLibertyDirectoryPropertyFiles(null));
scd = getServerConfigDocument(new CommonLogger(project), getLibertyDirectoryPropertyFiles(null));
Copy link
Member

Choose a reason for hiding this comment

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

Don't need to get props anymore at line 521.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants