Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Conversation

@oxyc
Copy link
Collaborator

@oxyc oxyc commented Dec 23, 2016

Would be nicer if this could be done upstream in the php extension roles though... Now stuff such as solr is rebuilt as well.

@geerlingguy
Copy link
Owner

Hmm... I'd be willing to do things in the php role, but it's a lot more effort to try to change all the php-* roles.

@geerlingguy
Copy link
Owner

Especially since all the annoying changes are for Debian only (RHEL repos use the same package names, paths, etc. and unless you use Software Collections you just install one version at a time).

@oxyc
Copy link
Collaborator Author

oxyc commented Dec 23, 2016

This one affects RHEL as well. The extensions never re-compile even if the PHP version changes. It's just moved back into place (workspace commit is the actual fix, second one is just to tidy things up from before). My bad, not sure how I missed this while testing.... I guess after 20 provisions I sort of stopped thinking.

@oxyc
Copy link
Collaborator Author

oxyc commented Dec 23, 2016

Also, it's pretty rare that people switch PHP versions. Re-building solr/daemonize/etc isnt ideal, but it barely increases the build time even if they do switch versions.

@oxyc
Copy link
Collaborator Author

oxyc commented Dec 23, 2016

Nevermind, they are re-compiled, just not moved into place, sorry about my confusion :) @joestewart #1076 (comment)

@geerlingguy
Copy link
Owner

This would still be needed after the upstream fix in the Xdebug role, correct? And would we need to fix anything in the XHProf role too?

@oxyc
Copy link
Collaborator Author

oxyc commented Dec 24, 2016

@geerlingguy actually this is the only PR that is required for the fix. This is the solution suggested by @thom8 in geerlingguy/ansible-role-php-xdebug#41 (comment).

The fix is to use a clean workspace for xdebug/xhprof/uploadprogress extensions when re-provisioning with a new PHP version. That way all extensions get re-compiled and moved into place. Before this PR, they just re-used the old compiled modules because no changes were detected.

Unfortunately I don't have time to test it and I'll be offline until Monday. I don't see why it wouldn't work though.

In addition to this @joestewart #1076 (comment) mentioned that the XDebug extension doesn't upgrade when you change the version (the extension version), this is a separate issue though. geerlingguy/ansible-role-php-xdebug#41 has his fix rebased but bundled with some other commits that should not be merged if we go with assigning the workspace here in the playbook instead.

with_items:
- "/usr/lib/php5/modules"
- "/usr/lib/php/modules"

Copy link
Collaborator Author

@oxyc oxyc Dec 24, 2016

Choose a reason for hiding this comment

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

Actually, I think we need to test that memcached/redis extensions still work on version change without this. Unfortunately I wont have time to do that until monday. As this is just a code cleanup, 8c7ed34 can be reverted from this PR and tested more later as well.

@geerlingguy
Copy link
Owner

@oxyc - I merged geerlingguy/ansible-role-php-xdebug#42, so it might be easier to just pull in the updated version of that role (2.3.0).

@oxyc
Copy link
Collaborator Author

oxyc commented Dec 27, 2016

That only fixed xdebug version change, not php version change.

@geerlingguy
Copy link
Owner

Ah, true. Post-holiday confusion from having like 40 new issues across my roles :D

@geerlingguy
Copy link
Owner

(Apparently everyone but me works on my roles over Christmas.)

@geerlingguy geerlingguy merged commit fd3d086 into geerlingguy:master Dec 28, 2016
@oxyc oxyc deleted the issue-1076 branch April 24, 2017 16:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants