Skip to content

Cleanup#1008

Merged
mdellweg merged 5 commits intopulp:mainfrom
mdellweg:cleanup
Feb 27, 2026
Merged

Cleanup#1008
mdellweg merged 5 commits intopulp:mainfrom
mdellweg:cleanup

Conversation

@mdellweg
Copy link
Member

No description provided.

@mdellweg mdellweg force-pushed the cleanup branch 3 times, most recently from 73f4ef9 to c13c1ea Compare February 26, 2026 06:47
@github-actions github-actions bot added the wip label Feb 26, 2026
@mdellweg mdellweg marked this pull request as ready for review February 26, 2026 13:17
@github-actions github-actions bot removed the wip label Feb 26, 2026
Copy link
Member

@pedro-psb pedro-psb left a comment

Choose a reason for hiding this comment

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

There are lot of changes in the before_install / install scripts. From reading it that looks fine, but I would like to see a test PR.
Btw, looking much better, thanks!

echo "No formatting change needed"
fi
fi

Copy link
Member

Choose a reason for hiding this comment

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

The convenience about this (idea) was having a separate commit for formatting, because the CI update PRs squash all changes from plugin-templates in a single PR. But In the end I think this wasn't even working properly, since we have a format call on the plugin-template apply itself.

Copy link
Member Author

Choose a reason for hiding this comment

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

My idea is to not even make the first commit before the format linter accepts it. If that reformats a bigger part of the codebase, well that's fine for me too.

Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member Author

Choose a reason for hiding this comment

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

This isn't even yet renderd by default. But I think we want to go the Makefile route and one needs a place to start from.

if: "steps.create_pr_changelog.outputs.pull-request-number"
env:
GH_TOKEN: "{{ '${{ secrets.RELEASE_TOKEN }}' }}"
continue-on-error: true
Copy link
Member

Choose a reason for hiding this comment

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

We've seen some flaky bugs with changes aggregation but 99% it just works.
And we've reviewed the fragment on the PRs already. I'm fine with that.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this ignore error only applies to the attempt to mark the PR automerge.



def check_pyproject_dependencies(repo, from_commit, to_commit):
def check_pyproject_dependencies(repo: Repo, from_commit:str, to_commit:str) -> list[str]:
Copy link
Member

Choose a reason for hiding this comment

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

Why black didn't complain about that from_commit:str in the CI here?
If this file is applied at the target repository and we run black against it, it will fail.

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess, since reformatting is part of the templating there is nothing to complain about afterwards.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, true

return 1

branches = [branch for branch in available_branches if branch in branches]
branches.reverse()
Copy link
Member

Choose a reason for hiding this comment

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

Reverse doesn't sort the branches. Maybe .sort(reverse=True)?

Copy link
Member Author

Choose a reason for hiding this comment

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

They are already sorted at this point.


{% include 'header.j2' %}

set -euo pipefail
Copy link
Member

Choose a reason for hiding this comment

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

Can you put a headline comment here with what is the responsability of this script.
Similar to how you've added in templates/github/.github/workflows/scripts/before_script.sh.j2

cmd_prefix bash -c "usermod -a -G wheel pulp"
echo
echo "# pip list outside the container"

Copy link
Member

Choose a reason for hiding this comment

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

I don't see the pip list foor outside the container.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, it's on the install.sh. I guess before_script is after install, right? We can move it here, then.

Copy link
Member

Choose a reason for hiding this comment

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

It would be nice to have the github grouping thing, if you agree.

echo ::group::GROUP_NAME
...
echo ::endgroup::

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm trying to regroup all the stuff on the jobs.steps level now. This extra folding sadly, is implemented by adding noise to the output.
But I'll try to remove the -v from the bash settings. Since this file is really only for dumping information (now) we don't want to see all the noise from reading the script.
Let's look at that and decide from there.

Copy link
Member

Choose a reason for hiding this comment

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

Ok. Its fine not having the github group thing too. Having it all on one script is already quite helpful.

@mdellweg
Copy link
Member Author

I tried the changes here: pulp/pulp_gem#420

@mdellweg mdellweg enabled auto-merge (rebase) February 27, 2026 14:44
@mdellweg mdellweg merged commit 7de6499 into pulp:main Feb 27, 2026
11 checks passed
@mdellweg mdellweg deleted the cleanup branch February 27, 2026 14:50
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.

2 participants