Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packages in pipe report #680

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

packages in pipe report #680

wants to merge 2 commits into from

Conversation

glehmann
Copy link

@glehmann glehmann commented Feb 28, 2025

image

@stormi stormi requested review from stormi and ydirson March 3, 2025 11:35
@stormi
Copy link
Member

stormi commented Mar 3, 2025

Looks like a good candidate for a sync review.

Copy link
Contributor

@ydirson ydirson left a comment

Choose a reason for hiding this comment

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

There seems to be some overlap with #677 here. Also, do we want to depend on koji, when we can get the info from the repos directly?

@stormi
Copy link
Member

stormi commented Mar 3, 2025

There seems to be some overlap with #677 here. Also, do we want to depend on koji, when we can get the info from the repos directly?

You can't get the koji build ID and links to the web interface from repos directly.

Copy link
Contributor

@ydirson ydirson left a comment

Choose a reason for hiding this comment

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

Also note the "hmtl" typo in commit message

koji_output = check_output(['koji', 'buildinfo', build[0]]).decode('utf8')
kv_lines = [line.split(': ') for line in koji_output.splitlines()]
build_info = dict(kv for kv in kv_lines if len(kv) == 2)
print(build_info)
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like debugging output, do we want to keep it?

Comment on lines 71 to 89
tags = [f'v{v}-{p}' for v in ['8.2', '8.3'] for p in ['incoming', 'ci', 'testing', 'candidates', 'lab']]
for tag in tags:
Copy link
Contributor

Choose a reason for hiding this comment

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

It does not seem necessary to precompute a list of tags. This and the lack of specific details about what exactly gets parallelized makes reading the patch harder than necessary

@glehmann glehmann force-pushed the pkg-in-pipe branch 2 times, most recently from 55ae5cb to 6f29e52 Compare March 6, 2025 10:40
# Run in docker

```sh
docker build -f pkg_in_pipe .
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
docker build -f pkg_in_pipe .
docker buildx build . -t pkg_in_pipe

docker buildx replaces docker build see the "Important" note here https://docs.docker.com/reference/cli/docker/build-legacy/

Copy link
Author

@glehmann glehmann Mar 7, 2025

Choose a reason for hiding this comment

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

docker build is an alias to docker buildx build and buildkit is the default build engine since docker 23, so I think we should be good with docker build :-)

unless we need to run an older version somewhere?

ref:

Copy link
Author

Choose a reason for hiding this comment

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

good catch for the -t!


```sh
docker build -f pkg_in_pipe .
docker run -v ~/.koji:/root/.koji:z -e PLANE_TOKEN=<plane token> -v /out/dir:/output:z pkg_in_pipe /output/index.html
Copy link
Member

Choose a reason for hiding this comment

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

We should document in README that a directory from the host should me mounted in the container, and that a positional argument is used to specify the output path and filename inside the container, shouldn't we?

Copy link
Author

Choose a reason for hiding this comment

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

agreed

@@ -0,0 +1 @@
report.html
Copy link
Member

Choose a reason for hiding this comment

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

Not needed anymore as the output is flexible, and the example in README.md is outside of the repo.

Copy link
Author

Choose a reason for hiding this comment

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

while not strictly needed, I think it's still nice to have it for local development

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, it is still the default output file.

@glehmann glehmann force-pushed the pkg-in-pipe branch 2 times, most recently from 336d713 to f14946b Compare March 7, 2025 18:20
@glehmann
Copy link
Author

glehmann commented Mar 7, 2025

@nathanael-h I have also added the last generation time and generation interval in the report

def print_footer(out):
now = datetime.now()
print(f'''
Last generated at {now}. Generated every 5 minutes.
Copy link
Contributor

Choose a reason for hiding this comment

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

While the "last generated" is useful info, hardcoding the interval of an external cron job does not feel right.

Copy link
Author

Choose a reason for hiding this comment

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

do you think it should be a command line option?

Copy link
Contributor

Choose a reason for hiding this comment

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

Could be a --generated-info="Generated every 5 minutes."? --cron-info="5 minutes"?

Copy link
Author

Choose a reason for hiding this comment

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

@nathanael-h as a consequence of this change, we'll have to add --generated-info "Generated every 5 minutes." on the command line when calling pkg_in_pipe.py

@glehmann glehmann force-pushed the pkg-in-pipe branch 2 times, most recently from 592e2e3 to 4b42ed2 Compare March 10, 2025 09:41
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants