Apollo icon indicating copy to clipboard operation
Apollo copied to clipboard

doc request: apollo deploy does not delete cached classes in target

Open alpapan opened this issue 3 years ago • 1 comments

Hello

I came across this whilst trying to change the work or temp directories. The change was done correctly on the config and apollo deploy was rerun.

This finds no matches

grep /scratch_cory/sysadmin/apollo/work apollo-2.6.2-SNAPSHOT.war

but:

grep /scratch_cory/sysadmin/apollo/work * -R
Binary file classes/apollo-config$_run_closure2$_closure13$_closure17.class matches
Binary file classes/apollo-config$_run_closure2$_closure13$_closure16.class matches
Binary file classes/apollo-config$_run_closure2$_closure13$_closure14.class matches
Binary file classes/apollo-config$_run_closure2$_closure13$_closure15.class matches

which shouldn't be an issue but:

rm -rf  /scratch_cory/sysadmin/tomcat/gpi/webapps/*
root@cory:/scratch_cory/sysadmin/tomcat/gpi/webapps# grep '/scratch_cory/sysadmin/apollo/work' /scratch_cory/sysadmin/tomcat/gpi/webapps/* -R
grep: /scratch_cory/sysadmin/tomcat/gpi/webapps/*: No such file or directory # no output, good
cp ../../../apollo/git/target/apollo-2.6.2-SNAPSHOT.war apollo.war && chown tomcat:tomcat apollo.war
grep '/scratch_cory/sysadmin/apollo/work' /scratch_cory/sysadmin/tomcat/gpi/webapps/* -R  # no output, good

#wait a minute
grep '/scratch_cory/sysadmin/apollo/work' /scratch_cory/sysadmin/tomcat/gpi/webapps/* -R
Binary file /scratch_cory/sysadmin/tomcat/gpi/webapps/apollo/WEB-INF/classes/apollo-config$_run_closure2$_closure13$_closure17.class matches
Binary file /scratch_cory/sysadmin/tomcat/gpi/webapps/apollo/WEB-INF/classes/apollo-config$_run_closure2$_closure13$_closure16.class matches
Binary file /scratch_cory/sysadmin/tomcat/gpi/webapps/apollo/WEB-INF/classes/apollo-config$_run_closure2$_closure13$_closure14.class matches
Binary file /scratch_cory/sysadmin/tomcat/gpi/webapps/apollo/WEB-INF/classes/apollo-config$_run_closure2$_closure13$_closure15.class matches

So after auto deployment old classes are used.

Of course this can be fixed with:

./apollo clean
./apollo deploy

But it is not immediately obvious that this particular variable is cached.

May I suggest the doc recommends ./apollo clean && ./apollo deploy when changing the config?

alpapan avatar Oct 15 '20 23:10 alpapan

Hey, feel free to create prs. I may or Mah not have time to get to all these right away

Nathan

On Oct 15, 2020, at 4:59 PM, Alexie Papanicolaou [email protected] wrote:

 Hello

I came across this whilst trying to change the work or temp directories. The change was done correctly on the config and apollo deploy was rerun.

This finds no matches

grep /scratch_cory/sysadmin/apollo/work apollo-2.6.2-SNAPSHOT.war but:

grep /scratch_cory/sysadmin/apollo/work * -R Binary file classes/apollo-config$_run_closure2$_closure13$_closure17.class matches Binary file classes/apollo-config$_run_closure2$_closure13$_closure16.class matches Binary file classes/apollo-config$_run_closure2$_closure13$_closure14.class matches Binary file classes/apollo-config$_run_closure2$_closure13$_closure15.class matches which shouldn't be an issue but:

rm -rf /scratch_cory/sysadmin/tomcat/gpi/webapps/* root@cory:/scratch_cory/sysadmin/tomcat/gpi/webapps# grep '/scratch_cory/sysadmin/apollo/work' /scratch_cory/sysadmin/tomcat/gpi/webapps/* -R grep: /scratch_cory/sysadmin/tomcat/gpi/webapps/: No such file or directory # no output, good cp ../../../apollo/git/target/apollo-2.6.2-SNAPSHOT.war apollo.war && chown tomcat:tomcat apollo.war grep '/scratch_cory/sysadmin/apollo/work' /scratch_cory/sysadmin/tomcat/gpi/webapps/ -R # no output, good

#wait a minute grep '/scratch_cory/sysadmin/apollo/work' /scratch_cory/sysadmin/tomcat/gpi/webapps/* -R Binary file /scratch_cory/sysadmin/tomcat/gpi/webapps/apollo/WEB-INF/classes/apollo-config$_run_closure2$_closure13$_closure17.class matches Binary file /scratch_cory/sysadmin/tomcat/gpi/webapps/apollo/WEB-INF/classes/apollo-config$_run_closure2$_closure13$_closure16.class matches Binary file /scratch_cory/sysadmin/tomcat/gpi/webapps/apollo/WEB-INF/classes/apollo-config$_run_closure2$_closure13$_closure14.class matches Binary file /scratch_cory/sysadmin/tomcat/gpi/webapps/apollo/WEB-INF/classes/apollo-config$_run_closure2$_closure13$_closure15.class matches

So after auto deployment old classes are used.

Of course this can be fixed with:

./apollo clean ./apollo deploy But it is not immediately obvious that this particular variable is cached.

May I suggest the doc recommends ./apollo clean && ./apollo deploy when changing the config?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

nathandunn avatar Oct 16 '20 01:10 nathandunn