Remove workaround and reinstate deps.dev as the source for Cargo Feeder
Description
A recent change introduced a temporary workaround that switches the data source for the Cargo Feeder from deps.dev
to registry
. This workaround was implemented to address an issue tracked in the merge request 62. The workaround is not ideal and needs to be reverted to restore deps.dev
as the primary data source.
Problem
Currently, the Cargo Feeder is using registry
as its data source due to a temporary hack. The hardcoded registry
source needs to be removed, and the system should be reverted to use deps.dev
for fetching package data.
Solution
Revert the changes made in the commit and re-enable deps.dev
as the data source for the Cargo Feeder. Ensure all relevant code segments are updated to reflect this change, and any tests are adjusted accordingly.
Implementation Plan
-
Update Source in Code:
- Modify the
publish
function infeeder.go
to directly usesource
instead ofhackSourceForCargo
. - Ensure the
packageVersionsQuery
incargofeeder.go
usesdeps.dev
correctly.
- Modify the
-
Remove Hack Function:
- Remove the
hackSourceForCargo
function from thefeeder.go
file.
- Remove the
-
Update Test Cases:
- Update the
cargofeeder_test.go
to usedeps.dev
in the relevant test cases.
- Update the
-
Testing:
- Run all existing tests to ensure they pass with the updated changes.
- Add any additional tests if necessary to validate the data source switch.
-
Documentation:
- Update any relevant documentation to reflect that
deps.dev
is being used again as the data source.
- Update any relevant documentation to reflect that
Tasks
-
Remove the hackSourceForCargo
function. https://gitlab.com/gitlab-org/security-products/license-db/license-feeder/-/merge_requests/76 -
Run all tests to ensure they pass. https://gitlab.com/gitlab-org/security-products/license-db/license-feeder/-/merge_requests/76 -
Merge changes and release a new version. https://gitlab.com/gitlab-org/security-products/license-db/deployment/-/merge_requests/275 -
Test the changes end-to-end in DEV. https://gitlab.com/gitlab-org/security-products/license-db/deployment/-/merge_requests/275
References
- Merge Request 62