Skip to content

Remove unused package callback [RUN ALL RSPEC] [RUN AS-IF-FOSS]

Steve Abrams requested to merge 331768-remove-composer-callback into master

🔍 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 💥. It is likely this callback has never worked and always errored.

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

Availability and Testing

Related to #331768 (closed)

Edited by Danger bot

Merge request reports