-
Notifications
You must be signed in to change notification settings - Fork 79
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
base: master
Are you sure you want to change the base?
Conversation
glehmann
commented
Feb 28, 2025
•
edited
Loading
edited
Looks like a good candidate for a sync review. |
There was a problem hiding this 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?
You can't get the koji build ID and links to the web interface from repos directly. |
There was a problem hiding this 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
scripts/pkg_in_pipe.py
Outdated
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) |
There was a problem hiding this comment.
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?
scripts/pkg_in_pipe.py
Outdated
tags = [f'v{v}-{p}' for v in ['8.2', '8.3'] for p in ['incoming', 'ci', 'testing', 'candidates', 'lab']] | ||
for tag in tags: |
There was a problem hiding this comment.
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
55ae5cb
to
6f29e52
Compare
scripts/pkg_in_pipe/README.md
Outdated
# Run in docker | ||
|
||
```sh | ||
docker build -f pkg_in_pipe . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/
There was a problem hiding this comment.
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:
There was a problem hiding this comment.
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
!
scripts/pkg_in_pipe/README.md
Outdated
|
||
```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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
336d713
to
f14946b
Compare
@nathanael-h I have also added the last generation time and generation interval in the report |
scripts/pkg_in_pipe/pkg_in_pipe.py
Outdated
def print_footer(out): | ||
now = datetime.now() | ||
print(f''' | ||
Last generated at {now}. Generated every 5 minutes. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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"
?
There was a problem hiding this comment.
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
592e2e3
to
4b42ed2
Compare
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>