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

Allow jira-config.properties file to become part of the dataset. #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bornatow
Copy link

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.

The autoexport property will be added only if it does not already exist in the file or the file does not exist at all.
@wyrzyk
Copy link
Contributor

wyrzyk commented Apr 18, 2019

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")
Copy link
Contributor

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).

Copy link
Contributor

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 :)

Copy link
Author

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.

Copy link
Contributor

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!)

Copy link
Contributor

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.

Copy link
Contributor

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")
Copy link
Contributor

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.

@dagguh dagguh requested a review from a team as a code owner February 10, 2023 16:06
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.

5 participants