Skip to content

Conversation

@DEiselt
Copy link

@DEiselt DEiselt commented May 14, 2025

closes: #1175

@DEiselt
Copy link
Author

DEiselt commented May 28, 2025

Hi @hstct @quba42 could you take a look and give some feedback if this can be included / what needs to be improved?

Copy link
Contributor

@hstct hstct left a comment

Choose a reason for hiding this comment

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

This looks promising so far!

If it's possible it would be great if you could add or extend a publication test that verifies the creation of the file and it's contents.

@DEiselt
Copy link
Author

DEiselt commented Jun 4, 2025

Thanks for the review!

If it's possible it would be great if you could add or extend a publication test that verifies the creation of the file and it's contents.

I will try to add a test for this. I just don't have much experience with pulp yet 🙂

@DEiselt
Copy link
Author

DEiselt commented Jul 2, 2025

@hstct i am struggling with implementing the test case for my change. As there are more changes in the pipeline, would it be possible to get in contact directly (e.g. via call or IM) to get a primer on how the tests work?

@hstct
Copy link
Contributor

hstct commented Jul 2, 2025

There is a pulp-debian channel on matrix where you can reach us too. I'm okay with chatting there or answer any questions you have here.

@DEiselt
Copy link
Author

DEiselt commented Jul 23, 2025

Update: The current way of creating those release files during publish is not clean and complicated to test. The current plan is to rework the PR to properly sync and publish the Legacy per-component-and-architecture Release files like other files.

Copy link
Contributor

@hstct hstct left a comment

Choose a reason for hiding this comment

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

The main worry here is the manual building of the strings in the release file. Using the deb822 helper should fix it.

Afterwards I'm inclined to use this as a minimal implementation, meaning we don't need an extra test for it.

We can worry on a proper implementation another time, this would entail creating a own model for these Release file.

# Publish per-component/architecture Release files
for release_path in self.release_file_paths.values():
release = PublishedMetadata.create_from_file(
publication=self.parent.publication, file=File(open(release_path, "rb"))
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure we need to loop over this. Can't we just say release.save() ? maybe not call it release.

this way we don't need the self.release_file_paths variable

Copy link
Author

Choose a reason for hiding this comment

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

Great idea and i really appreciate the help. I updated the PR with the file creation in its own function as you suggested in the other change.

I still used the self.release_file_paths variable for publishing because i don't fully understand what you mean with release.save(). I still would want to change it.

@hstct
Copy link
Contributor

hstct commented Jul 23, 2025

Update: The current way of creating those release files during publish is not clean and complicated to test. The current plan is to rework the PR to properly sync and publish the Legacy per-component-and-architecture Release files like other files.

Yea, I had some more time looking into this and I think a minimal solution should be the goal of this PR. It's close already!

@daviddavis
Copy link
Contributor

Does this impact all publications or just verbatim ones? I am wondering if a setting to enable/disable publishing of these files makes sense since I don't think we need them and they'll add more traffic for us, etc.

@hstct
Copy link
Contributor

hstct commented Jul 24, 2025

Does this impact all publications or just verbatim ones? I am wondering if a setting to enable/disable publishing of these files makes sense since I don't think we need them and they'll add more traffic for us, etc.

This change affects all publications. However, from a sync perspective nothing changes as pulp has always fetched these files from the remote repository. But yea okay it might have consequences for the published repository now serving more files.

Normally we have flags on the remote but I don't know if there are consequences if we don't sync these files anymore. I don't mind if we add a flag for this on a Publication. Would that be okay?

@daviddavis
Copy link
Contributor

daviddavis commented Jul 24, 2025

We don't sync at all so I am guessing we don't have these files in our system.

A flag on a publication would mean having it set every time one publishes? I think a global setting might be easier at least for us in this regard. But I suppose some users might want to customize it per publication. A flag on a publication would work for us.

@hstct
Copy link
Contributor

hstct commented Jul 24, 2025

We can set the default to false so not setting the flag won't change current behavior

@DEiselt
Copy link
Author

DEiselt commented Sep 15, 2025

@hstct will you be able to take a look here soon?

@DEiselt
Copy link
Author

DEiselt commented Oct 21, 2025

Hi @hstct @quba42 , i've did some changes since the last review and requested a new one. Is it possible to get feedback on this if time allows?

@hstct
Copy link
Contributor

hstct commented Oct 21, 2025

@DEiselt yea I put it on my list for this week. I kinda lost track of this one, sorry about that.

@hstct
Copy link
Contributor

hstct commented Nov 4, 2025

@DEiselt sorry for taking longer than expected. I think most of the this change is fine as is. But I noticed you are trying to merge it into the 3.5 branch.

Could you change this to the main branch? It might require some rebasing. I can add a backport to 3.5 for this change after we merge it on the main branch.

@daviddavis
Copy link
Contributor

@hstct do you typically backport features? I thought Pulp projects typically created new z-stream/minor releases for new features.

@hstct
Copy link
Contributor

hstct commented Nov 4, 2025

@hstct do you typically backport features? I thought Pulp projects typically created new z-stream/minor releases for new features.

Oh, yea sorry you are right, I wasn't thinking and treated it as a bugfix. We don't usually backport features without good reason

@DEiselt
Copy link
Author

DEiselt commented Nov 5, 2025

@hstct do you typically backport features? I thought Pulp projects typically created new z-stream/minor releases for new features.

Oh, yea sorry you are right, I wasn't thinking and treated it as a bugfix. We don't usually backport features without good reason

So how would we continue here? Should i still rebase to the main branch and we just don't add it to 3.5?

@hstct
Copy link
Contributor

hstct commented Nov 6, 2025

It needs to go to the main branch either way, we cannot add a feature into a release branch and not have it in the latest version. With the next release this feature will be available. If there is a good reason to backport the feature we will take this under consideration but it's not something we normally do.

@DEiselt
Copy link
Author

DEiselt commented Nov 6, 2025

That's fine. We use this as a patch already. I initially opened this PR against 3.5 because that was the version i developed it for and created the patch. But we can use the patch until our installation gets updated to a version which includes this change.

I will update the PR to use the main branch and squash the commits. Sorry if there was some confusion and thank you for your patience. I haven't done many upstream contributions yet.

@DEiselt DEiselt force-pushed the 3.5_per_release_arch branch from b1da152 to 32654f6 Compare November 7, 2025 10:14
@DEiselt DEiselt changed the base branch from 3.5 to main November 7, 2025 10:15
@DEiselt DEiselt force-pushed the 3.5_per_release_arch branch from a87b8e9 to 07228d9 Compare November 7, 2025 10:23
Rework creation of legacy release files.

Restore CHANGES.md

Add flag to toggle publish of legacy release files.

Reformat files
@DEiselt DEiselt force-pushed the 3.5_per_release_arch branch from 548cb4e to 8d2669b Compare November 7, 2025 11:18
@DEiselt
Copy link
Author

DEiselt commented Nov 7, 2025

@hstct i now updated the PR to compare to main and rebased. So from my side, the PR is ready for a "final" review.

Note: i'm not sure why the "Update Changelog" commit is here but looking at the changed files, only my changes are part of the PR.

@DEiselt
Copy link
Author

DEiselt commented Nov 18, 2025

@hstct do you have an explanation why those tests are failing? I tried to reproduce it locally but don't really understand the error.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support per-component/architecture Release files

3 participants