Remove unused package callback [RUN ALL RSPEC] [RUN AS-IF-FOSS]
🔍 What does this MR do?
Adds a feature flag around a callback that is not needed and is currently broken and just throwing errors (example sentry error).
We will remove the callback entirely when we remove the feature flag, but this allows us to safely test disabling it to be sure there are no unaccounted for side effects.
🏛 Context
Work was being done to resolve #290288 (closed), which addressed a performance problem with the Composer package registry. Along the way, it was discovered that the performance concerns were fixed in v2 Composer, and if we added support for v2 Composer, this would fix the problem for most users. We added support for v2 Composer with #259840 (closed), and put #290288 (closed) in the backlog to await more demand.
The work in the original issue, #290288 (closed), involved creating a cache file that stored package information for each namespace containing Composer packages. This file was to be updated anytime a package was created or deleted in a given namespace. The callback to be removed was where the cache file was triggered to update after a file was deleted. The problem is the callback is called after_commit
. This happens after the package
and associated composer_metadatum
records are deleted, so composer_metadatum
is nil
when it is called
We can also feel safe about disabling/removing this callback because the cache file that is supposed to be updated is also never used (see this investigation if you want more details).
Does this MR meet the acceptance criteria?
Conformity
-
I have included changelog trailers, or none are needed. (Does this MR need a changelog?) - [-] I have added/updated documentation, or it's not needed. (Is documentation required?)
-
I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?) - [-] I have added information for database reviewers in the MR description, or it's not needed. (Does this MR have database related changes?)
-
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides. -
This change is backwards compatible across updates, or this does not apply.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.) -
I have tested this MR in all supported browsers, or it's not needed. -
I have informed the Infrastructure department of a default or new setting change per definition of done, or it's not needed.
Related to #331768 (closed)