-
Notifications
You must be signed in to change notification settings - Fork 32
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 jira-config.properties file to become part of the dataset. #19
base: master
Are you sure you want to change the base?
Conversation
The autoexport property will be added only if it does not already exist in the file or the file does not exist at all.
I've created an issue (https://ecosystem.atlassian.net/browse/JPERF-463). Please add the issue key to the commit message and update CHANGELOG.md file. |
@@ -52,7 +52,8 @@ internal class StandaloneNodeFormula( | |||
jiraIp = ssh.host.ipAddress | |||
) | |||
connection.execute("echo jira.home=`realpath $jiraHome` > $unpackedProduct/atlassian-jira/WEB-INF/classes/jira-application.properties") | |||
connection.execute("echo jira.autoexport=false > $jiraHome/jira-config.properties") | |||
connection.execute("touch $jiraHome/jira-config.properties") | |||
connection.execute("grep -qxF \"jira.autoexport=false\" $jiraHome/jira-config.properties || echo -e \"\\njira.autoexport=false\" >> $jiraHome/jira-config.properties") |
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.
It looks error prone. What if we add jira.autoexport = false
. It will still work, but will not be detected by grep.
It's still better than before, so I would not block the review 👍
We may also not need the property. I think it doesn't work like we expected (https://ecosystem.atlassian.net/browse/JPERF-344).
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.
And AFAIK all our datasets already have the property set :)
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 think we could improve the grep, but I am going away till the end of Apr, so could do that in 2 weeks time. And yes, all our datasets have that already, my problem was that the jira-config.properties file was always overwritten, so I changed this to be less invasive. But if we can get rid of this altogether through the issue you linked, then I would be just as happy.
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.
👍 Just add the issue key and changelog and we can merge. (Remember to rebase!)
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.
If this fixes JPERF-344, I wonder if the integration tests will become faster here. I hope we see it in the CI results.
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.
If this fixes JPERF-344, I wonder if the integration tests will become faster here. I hope we see it in the CI results.
It doesn't fix JPERF-344. AFAIK we see the export even if the flag is set.
@@ -52,7 +52,8 @@ internal class StandaloneNodeFormula( | |||
jiraIp = ssh.host.ipAddress | |||
) | |||
connection.execute("echo jira.home=`realpath $jiraHome` > $unpackedProduct/atlassian-jira/WEB-INF/classes/jira-application.properties") | |||
connection.execute("echo jira.autoexport=false > $jiraHome/jira-config.properties") | |||
connection.execute("touch $jiraHome/jira-config.properties") | |||
connection.execute("grep -qxF \"jira.autoexport=false\" $jiraHome/jira-config.properties || echo -e \"\\njira.autoexport=false\" >> $jiraHome/jira-config.properties") |
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.
If this fixes JPERF-344, I wonder if the integration tests will become faster here. I hope we see it in the CI results.
The autoexport property will be added only if it does not already exist in the file or the file does not exist at all. In other words, the jira-config.properties file that has already been restored with the dataset will remain unchanged or will get the autoexport=false property appended to it.