Skip to content

Conversation

glehmann
Copy link
Member

@glehmann glehmann force-pushed the gln/koji-build-command-lwny branch 7 times, most recently from a0fb373 to c4eb3d8 Compare September 15, 2025 13:57
@glehmann glehmann force-pushed the gln/cli-refactor-improve-qskr branch from 2fab0de to 2512e0b Compare September 15, 2025 14:00
@glehmann glehmann force-pushed the gln/koji-build-command-lwny branch from c4eb3d8 to f2e4ce2 Compare September 15, 2025 14:00
@glehmann glehmann force-pushed the gln/cli-refactor-improve-qskr branch from 2512e0b to ba4edca Compare September 15, 2025 14:05
@glehmann glehmann force-pushed the gln/koji-build-command-lwny branch from f2e4ce2 to e910f3a Compare September 15, 2025 14:07
@@ -0,0 +1,16 @@
from xcp_ng_dev.koji.build import koji_build, koji_build_init_parser

# from icecream import ic
Copy link

Choose a reason for hiding this comment

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

icecream?

Copy link
Member Author

Choose a reason for hiding this comment

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

https://github.com/gruns/icecream

A function similar to rust's dbg!() macro

def cd(dir):
"""Change to a directory temporarily. To be used in a with statement."""
prevdir = os.getcwd()
os.chdir(dir)
Copy link

Choose a reason for hiding this comment

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

This can fail if the directory fails, maybe try and catch it the same way as in check_dir?

Copy link
Member Author

Choose a reason for hiding this comment

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

You don't think the default error message is enough?

FileNotFoundError: [Errno 2] No such file or directory: '/tsrntsrn'

Copy link

Choose a reason for hiding this comment

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

I usually prefer not to show stack traces for errors if they are not needed, we can leave it like this for now

Copy link
Member Author

Choose a reason for hiding this comment

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

So am I, but not everyone agrees with that.
In my projects, I usually have a command-line flag to change the verbosity and turn on the stack traces on the trace log level. I might do that here as well, in the future.

Base automatically changed from gln/cli-refactor-improve-qskr to master September 16, 2025 17:58
Copy link

@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.

As we discussed this week, this would not be the right tool to merge the koji support into

@stormi
Copy link
Member

stormi commented Sep 19, 2025

We need a design, something, before such PRs.

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