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

Fix tomcat_version variable usage #97

Merged
merged 4 commits into from
Mar 30, 2021

Conversation

agimenez
Copy link
Contributor

Description of the Change

In the "Download & Extract Tomcat" task we try to detect if the tomcat
version to install is the same as the configured in the variables.

The check used the literal tomcat_version instead of
interpolating the Jinja2 value like {{ tomcat_version }}.

NOTE: this opens a new changelog "Fixed" section as well as #96. I will set this as draft as it would cause conflicts on merge. If the other PR is merged in, I will rebase this branch against the latest develop to avoid conflicts.

Benefits

The check that tries to figure out whether the installed Tomcat is the wanted version in the tomcat_version variable should work as expected.

Possible Drawbacks

TBH, I'm not sure how this was working before. I guess that the particular version check was yelding false always.

Also, if I understand correctly, the check should be != instead of ==, since I believe that this task will download & install if the installed version is different from the one we want. Is that right? In such case, I can fix the conditional as well.

Applicable Issues

N/A

In the "Download & Extract Tomcat" task we try to detect if the tomcat
version to install is the same as the configured in the variables.

The check used the literal `tomcat_version` instead of
interpolating the Jinja2 value like `{{ tomcat_version }}`.
@agimenez agimenez changed the title Fix tomcat_version variable usage WIP: Fix tomcat_version variable usage Mar 16, 2021
@agimenez
Copy link
Contributor Author

OK, "draft" is not what I thought. Setting to Ready for review but adding WIP to the title.

@agimenez agimenez marked this pull request as ready for review March 16, 2021 14:08
@vicsufer
Copy link
Collaborator

vicsufer commented Mar 29, 2021

Hi @agimenez thanks for noticing this missbehaviour, I've verified the mentioned issues.
If you could also fix the conditional for the version check (using != instead of ==) it would be awesome!

We were executing the download and extract task if the currently
installed version was the same as the wanted one.

This fixes the condition, and only executes the task if versions are
different, as intended.
@agimenez
Copy link
Contributor Author

@vicsufer branch updated with the comparison fix. Thanks!

tasks/install.yml Outdated Show resolved Hide resolved
@agimenez agimenez changed the title WIP: Fix tomcat_version variable usage Fix tomcat_version variable usage Mar 30, 2021
Copy link
Collaborator

@vicsufer vicsufer left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@vicsufer vicsufer merged commit 273c49d into idealista:develop Mar 30, 2021
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