CI/CD catalog seeder creates no releases, so seeded resources are unusable
gitlab:seed:ci_catalog_resources creates catalog resources but never releases them. Every seeded resource shows as Unreleased, so a seeded GDK cannot exercise most of the catalog UI.
Steps to reproduce
bundle exec rake "gitlab:seed:ci_catalog_resources[flightjs, 25]"Then open /explore/catalog.
What happens
- Every row shows the
Unreleasedbadge and no "Published by" line. - On a resource detail page, the version selector reads No versions available.
- The Components tab shows Component details not available.
Ci::Catalog::Resources::Version.countis0.
The seeder does write a README.md and a templates/component.yml with a spec: block, so the content exists in the repository. It is only the release that is missing, and component metadata is built from a release.
Why it matters
The seeder is the documented way to get catalog data into a GDK. Without versions, none of these can be checked locally: the version dropdown, component metadata and the inputs table, the rendered README tab, the released-version badge, or the "Published by" line. This blocked a Vue 3 migration verification for the catalog page until releases were created by hand.
Suggested fix
After create_readme and create_template_yml, create a release. Releases::CreateService already calls Ci::Catalog::Resources::ReleaseService with metadata: nil (app/services/releases/create_service.rb:64), which builds the version and its components from the repository.
This worked:
Releases::CreateService.new(
project, user,
tag: 'v1.0.0', ref: project.default_branch,
name: 'Release v1.0.0', description: '...'
).executeSeeding a couple of resources with more than one tag would also make the version selector testable.
Two smaller points found alongside this:
Gitlab::Seeders::Ci::Catalog::ResourceSeeder#create_projectcallsproject.saved?on the result ofProjects::CreateService#execute, which can benil. That raisesNoMethodError: undefined method 'saved?' for niland hides the real error, which is logged separately asUnable to save project. Error: .... A nil guard would surface the cause.- The rake task itself has no CI coverage.
spec/lib/gitlab/seeders/ci/catalog/resource_seeder_spec.rbunit-tests the seeder class, anddb:seed_fuin CI runs thedb/fixtures/development/seeders, but nothing runsgitlab:seed:ci_catalog_resourcesend to end.