Skip to content

Allow configuring the name of the shared artifact aggregation repository #5073

Description

@thrix-vault

Summary

The prepare: artifact plugin aggregates artifacts into a single shared repository whose name is currently hardcoded. There is no way for a user to override it. This should be configurable so integrators can pick a name that fits their environment.

Current behavior

The shared aggregation repository name is fixed to tmt-artifact-shared:

  • Defined in tmt/steps/prepare/artifact/providers/__init__.py:31 (SHARED_REPO_NAME)
  • Passed to create_repository() in tmt/steps/prepare/artifact/__init__.py:235

The plugin schema (tmt/schemas/prepare/artifact.yaml) exposes only how, provide, default-repository-priority and verify — no option for the repository name.

The underlying create_repository() helper already accepts a repo_name argument (tmt/steps/prepare/artifact/providers/repository.py:114), so the plumbing exists; it is just not surfaced as a user-facing option.

Motivation

Downstream users rely on a stable, known repository name. For example, Testing Farm needs to keep the test-artifacts repository name to avoid breaking existing users who reference it. With the name hardcoded to tmt-artifact-shared, those workflows cannot migrate to the artifact plugin without breaking.

Proposed change

Add an option to the prepare: artifact plugin to set the shared aggregation repository name, for example:

prepare:
    how: artifact
    provide:
      - koji:<build-id>
    repository-name: test-artifacts

When unset, the current default (tmt-artifact-shared) is kept for backward compatibility.

Implementation would involve:

  • Adding the option to tmt/schemas/prepare/artifact.yaml
  • Adding the corresponding field to the plugin data class
  • Threading the value into the create_repository(..., repo_name=...) call in place of the hardcoded SHARED_REPO_NAME

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

  • Status
    review
  • Status
    triaged

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions