- Issue created by @kevin.dutra
- Merge request !103Issue #3489058: Remove non-production code from release → (Merged) created by kevin.dutra
- ivnish Kazakhstan
Thank you, but not all files in your MR should be removed (some files used in Drupal CI process). I will create a new issue with chores in JS files and their compile scripts
-
ivnish →
committed 5b40fbab on 8.x-4.x authored by
kevin.dutra →
Issue #3489058: Remove non-production code from release
-
ivnish →
committed 5b40fbab on 8.x-4.x authored by
kevin.dutra →
- 🇨🇭Switzerland berdir Switzerland
never seen a project remote test files, are we certain that's a good idea? Core doesn't do that either. Might also affect Gitlab CI?
- ivnish Kazakhstan
Gitlab CI is not affected, I checked it.
I haven't seen this before, but the documentation does describe it https://www.drupal.org/node/1068944#s-excluding-non-production-code-from... →
- 🇨🇭Switzerland berdir Switzerland
I'm specifically talking about the tests folder.
What about a project that extends the flag module and has tests using a trait or base class from Flag? If it's not explicitly depending on the de version, it will get a tagged release through composer without the tests folder.
- ivnish Kazakhstan
Yeah, looks like there might be more problems than benefits. Let me revert this commit.
- 🇨🇭Switzerland berdir Switzerland
Yeah. Also note that Drupal already has a global flag that will not discover or find modules in tests folders which is off by default, in that case the runtime and disk overhead of this is neglectable.
- 🇺🇸United States kevin.dutra
I can understand the use case for leaving the test files in, but can we still remove the other cruft? The main reason I had opened this is that our automated security scans of production infrastructure kept flagging issues among the non-prod files, like packages defined in the Yarn lock file that had open flaws.
- ivnish Kazakhstan
@kevin.dutra I removed some JS garbage here https://git.drupalcode.org/project/flag/-/commit/1aa7bc96950e16b127d126a...