Add PDS endpoint constants for licenses (without switching sync location)
What does this MR do and why?
Groundwork for moving the package-licenses sync onto the PMDB Distribution Service (PDS). No behaviour change: nothing in this MR is reachable at runtime yet.
- Adds
PDS_LICENSES_ENDPOINTandPDS_LICENSES_STAGING_ENDPOINT, plus alicenses_pds_endpointhelper. No resolver references them yet. - Extracts the environment ternary from
malware_pds_endpointinto a sharedpds_endpoint(production:, staging:). Same condition, so malware sync is unchanged. for_licensesstill returns[:gcp, LICENSES_BUCKET], with the vendored-directory checks still taking precedence.
Why this is split from the switch
Three things have to land together for the switch:
for_licensesreturning the PDS endpoint- the licenses
version_formatbumping to v3 LicensesSyncWorkercallingLicenseV3SyncServiceinstead ofSyncService.execute(data_type: 'licenses')
Version format is part of checkpoint identity, so flipping only the location makes an existing instance send its stale GCS cursor to PDS as a delta cursor, and /all is never reached. Flipping only the version format points the GCS connector at a v3/ prefix that does not exist. LicenseV3SyncService already exists on this branch but has no caller yet. The malware side already works this way: MalwareAdvisoriesSyncWorker calls MalwareAdvisorySyncService.execute(lease:) directly and bypasses SyncService.
Both the reasoning and the regression spec are in Switch package-licenses sync to PDS, the v3 for... (!251527 - merged) • Orin Naaman • 19.4. The TODO above for_licenses points at the tracking issue, Fetch licenses from PDS (#611228) • Orin Naaman • 19.4 ("Fetch licenses from PDS").
This preparation work is its own merge request because the switch is blocked until the full sync, connectors, and ingestion flow are in place. Splitting it out lets the reviewable, no-behaviour-change part merge now, and keeps the switch merge request down to just the switch itself plus its regression spec.
How to test
bundle exec rspec ee/spec/models/package_metadata ee/spec/services/package_metadata ee/spec/lib/gitlab/package_metadata ee/spec/workers/package_metadataAll pass. RuboCop is clean on the changed files. No documentation changes, since nothing user-facing changes.