Skip to content

Allow configuring the shared artifact repository name - #5135

Open
HabibRh26 wants to merge 6 commits into
teemtee:mainfrom
HabibRh26:issue-5073
Open

Allow configuring the shared artifact repository name#5135
HabibRh26 wants to merge 6 commits into
teemtee:mainfrom
HabibRh26:issue-5073

Conversation

@HabibRh26

@HabibRh26 HabibRh26 commented Aug 20, 2026

Copy link
Copy Markdown

Fixes #5073

Pull Request Checklist

  • implement the feature
  • extend the test coverage
  • modify the json schema
  • include a release note

Comment thread tmt/steps/prepare/artifact/__init__.py Outdated
@happz happz added the ci | full test Pull request is ready for the full test execution label Aug 20, 2026

@LecrisUT LecrisUT left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that SHARED_REPO_NAME is used as a default in ArtifactInfo. You would have to pass the value from PrepareArtifactData down to those as well. Also might as well move the SHARED_REPO_NAME up to this level at this point

Comment thread tmt/steps/prepare/artifact/__init__.py Outdated
@github-project-automation github-project-automation Bot moved this to backlog in planning Aug 21, 2026
@LecrisUT LecrisUT added the plugin | artifact Related to the `prepare/artifact` plugin. label Aug 21, 2026
@LecrisUT LecrisUT moved this from backlog to review in planning Aug 21, 2026
@psss psss changed the title Allow configuring the shared artifact repository name (#5073) Allow configuring the shared artifact repository name Aug 24, 2026

@psss psss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats for your first pull request, @HabibRh26! 😁 Looks good, two thoughts:

As this is adding a new option, it would be good to include a release note. These are stored under the pending directory:

What about extending some of the existing tests to exercise the newly added option? I think the basic test could be a good candidate:

- name: Main artifact to test
how: artifact
provide:
- file:../rpms/bar/bar-1.0-1.noarch.rpm

Comment on lines +64 to +66
Name of the tmt generated repo containing all artifacts
that are generated.
""",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Name of the tmt generated repo containing all artifacts
that are generated.
""",
Name of the tmt generated repo containing all artifacts
that are generated.
""",

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed here

#: Repository ID this artifact is available from. Used during verification
#: to confirm the artifact was installed from the expected repository.
repo_id: str = SHARED_REPO_NAME
repo_id: str = 'tmt-artifact-shared'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import from the plugin, or, better, let plugin import from this library. At this moment, 'tmt-artifact-shared' string is duplicated, and we want just the single source of truth.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially moved SHARED_REPO_NAME up to __init__.py based on @LecrisUT's suggestion (If I understand it correctly) to move it to the level where PrepareArtifactData owns the configuration. However, that created a string duplication since providers/__init__.py still needs the value for the ArtifactInfo.repo_id default, and importing it back from __init__.py would cause a circular import (__init__.py already imports from providers/__init__.py).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted to keep the constant in providers/__init__.py as the single source of truth

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed here

@happz

happz commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

/packit build

Comment thread tests/prepare/artifact/basic/plan.fmf
@HabibRh26

Copy link
Copy Markdown
Author

/packit build

is the output of this command supposed to display here or somewhere else?

@tcornell-bus

Copy link
Copy Markdown
Contributor

/packit build

is the output of this command supposed to display here or somewhere else?

It will kick off the build jobs and subsequent test jobs in the "checks" box below, you might need to scroll around in the box to see what its doing

@therazix therazix added this to the 1.79 milestone Aug 27, 2026
@tcornell-bus

Copy link
Copy Markdown
Contributor

/packit build

@HabibRh26 HabibRh26 self-assigned this Aug 31, 2026
@HabibRh26

Copy link
Copy Markdown
Author

Congrats for your first pull request, @HabibRh26! 😁 Looks good, two thoughts:

As this is adding a new option, it would be good to include a release note. These are stored under the pending directory:

* https://github.com/teemtee/tmt/tree/main/docs/releases/pending

* see also https://tmt.readthedocs.io/en/stable/contribute.html#checklist

What about extending some of the existing tests to exercise the newly added option? I think the basic test could be a good candidate:

- name: Main artifact to test
how: artifact
provide:
- file:../rpms/bar/bar-1.0-1.noarch.rpm

Release note added in 9866a397, test coverage in 11ba5d0b and log assertion in 01fc4371

@therazix therazix left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Comment thread docs/releases/pending/5073.fmf Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci | full test Pull request is ready for the full test execution plugin | artifact Related to the `prepare/artifact` plugin.

Projects

Status: review

Development

Successfully merging this pull request may close these issues.

Allow configuring the name of the shared artifact aggregation repository

7 participants