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

CRM_Extension_System - Only allow test.* extensions during headless testing. Hide from regular users. #14392

Merged
merged 2 commits into from
Jun 1, 2019

Conversation

totten
Copy link
Member

@totten totten commented Jun 1, 2019

The headless test suite includes integration tests for correct handling of the extension installation/removal process. This involves some dummy extensions. Unfortunately, the dummy extensions are often picked up on other deployments -- where they're a bit distracting/annoying.

Before

The test.* dummy extensions appear as available in all environments, including headless tests and live sites.

After

The test.* dummy extensions are only available in the headless test environment.

Comments

The extension list is used on every page-load, so one might be concerned: what's the performance impact of adding more filters to this scan process? Fortunately, the output of the scanning is cached post-filtering -- so there should be no discernible penalty.

totten added 2 commits May 31, 2019 17:11
This function allows one to filter down the list of extensions which are visible.

A few notes:

* The result of the scanning/filtering is stored in cache.  On a typical
  page-load, the system uses this cache -- which happily means that
  filtering shouldn't result in any extra page-load time.

* The extension-system is generally boot-critical.  I could imagine some
  scope-creep around making making the filter mechanism hookable, but that's
  a separate+complicated issue.  Optimistically...  if `array $containers`
  somehow becomes hookable, then one could use the same mechanism to
  manipulate the filters.
…st sites

The headless test suite includes integration tests for correct handling of
the extension installation/removal process. This involves some
dummy extensions. Unfortunately, the dummy extensions are often picked up on
live deployments -- where they're a bit distracting/annoying.

Before
------

The `test.*` dummy extensions appear as available in all environments,
including headless tests and live sites.

After
-----

The `test.*` dummy extensions are only available in the headless test
environment.
@civibot civibot bot added the master label Jun 1, 2019
@civibot
Copy link

civibot bot commented Jun 1, 2019

(Standard links)

@eileenmcnaughton
Copy link
Contributor

sure!

@eileenmcnaughton eileenmcnaughton merged commit 76143f4 into civicrm:master Jun 1, 2019
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.

2 participants