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: dataImport task should not run tomcatClean and tomcatDeploy tasks #281

Merged
merged 4 commits into from
Aug 26, 2019

Conversation

jgribonvald
Copy link
Contributor

Checklist
Description of change

This permit to avoid to undeploy and deploy apps when only a dataImport is run

Should solve issue #252

@ChristianMurphy
Copy link
Member

@ChristianMurphy
Copy link
Member

Also note #252 (comment)

@jgribonvald
Copy link
Contributor Author

@ChristianMurphy modifying the dependOn or running before the deploy won't help and I'm not sure that you understood the problem and my change, so let me trying explaining the problem, or tell me what is wrong on my change :

When I want to update a portlet-definition (at any moment during the day) from a file I run the target ./gradlew :overlays:uPortal:dataImport -Dfile=/PATH/TO/FILE/my.portlet-definition.xml.
So only for a such change you will clean the project and deploy the portal whereas it is already deployed and running on the same version. More in production if you don't disable the context refresh on the tomcat (that is the default purposed conf in uPortal-start) it will get out all users and relaunch the uPortal context (so the service will be unavailable few minutes).

My change only disable tomcatClean and tomcatDeploy when you run as primary/main/initial command the dataImport target but not on other uPortal task which have the dataImport task as dependency.

@ChristianMurphy
Copy link
Member

My change only disable tomcatClean and tomcatDeploy when you run as primary/main/initial command the dataImport target but not on other uPortal task which have the dataImport task as dependency.

Exactly, so the tomcat tasks are not depended on by dataInit.
So the dependsOn relationship should be represented in a different task.
Only a shouldRunAfter is needed to ensure the task will appear in the correct order in the task graph.

@jgribonvald
Copy link
Contributor Author

@ChristianMurphy so for you if we replace dependsOn project.rootProject.tasks.portalProperties, project.tasks.tomcatDeploy by something like

dependsOn project.rootProject.tasks.portalProperties
mustRunAfter project.tasks.tomcatDeploy

this will have the same effect ? I'm sorry I don't know a lot of gradle...

This permit to avoid to undeploy and deploy apps when only a dataImport is run
Should solve issue uPortal-Project#252
@jgribonvald
Copy link
Contributor Author

@ChristianMurphy: Ok I've tested and rewrote my PR on this way, it's really better. Thanks to show me the right way 👼

On an other side do you think that other tasks dataExport, dataDelete, dataList should benefit of a such change or not ? I think that they should expect maybe dataList.

@jgribonvald
Copy link
Contributor Author

jgribonvald commented Apr 5, 2019

I've pushed one commit per task change like that you will be able to make your choice 😉

@ChristianMurphy ChristianMurphy requested review from drewwills, bjagg and jonathanmtran and removed request for drewwills April 5, 2019 16:36
Copy link
Member

@bjagg bjagg left a comment

Choose a reason for hiding this comment

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

👍

@bjagg bjagg merged commit dd9cf18 into uPortal-Project:master Aug 26, 2019
@jgribonvald jgribonvald deleted the fix_252 branch February 5, 2020 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants