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

feature(peridot-cli): add task logs command #195

Open
wants to merge 2 commits into
base: feat/build-peridot-cli-rpm
Choose a base branch
from

Conversation

NeilHanlon
Copy link
Member

@NeilHanlon NeilHanlon commented Jul 25, 2024

feature(peridot-cli): add task logs command

peridot task logs will accept either a build ID or package name. In
the latter case, the project will be queried for the latest build for
the given package name. With the build task ID in hand, the task can be
queried for its BUILD_ARCH subtasks, which contain the logs for the
binary RPM builds.

Passing -C or --cwd with a directory will change into that directory
before writing files. That directory must exist beforehand.
Otherwise, $PWD is used.

By default, a separate file will be created for each
$taskId-$subtaskId-$architecture tuple, which accounts for modular packages
with multiple outputs.

Passing the -c or --combined flag will combine all the logs into a
single file, named $taskId.log

@resf-prow
Copy link
Contributor

resf-prow bot commented Jul 25, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link
Member Author

NeilHanlon commented Jul 25, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @NeilHanlon and the rest of your teammates on Graphite Graphite

@NeilHanlon NeilHanlon force-pushed the 07-25-wip_dump_logs_from_a_given_parent_task_id branch from 1308522 to 50e5ab7 Compare July 25, 2024 23:32
@NeilHanlon NeilHanlon changed the title WIP: dump logs from a given parent task ID feature(peridot-cli): add task logs command Jul 25, 2024
@NeilHanlon NeilHanlon marked this pull request as ready for review July 25, 2024 23:35
@NeilHanlon NeilHanlon force-pushed the 07-25-wip_dump_logs_from_a_given_parent_task_id branch from 50e5ab7 to d56d8f8 Compare July 25, 2024 23:38
@NeilHanlon NeilHanlon force-pushed the 07-25-wip_dump_logs_from_a_given_parent_task_id branch from d56d8f8 to d63f8fd Compare July 25, 2024 23:51
`peridot task logs` will accept either a build ID or package name. In
the latter case, the project will be queried for the latest build for
the given package name. With the build task ID in hand, the task can be
queried for its BUILD_ARCH subtasks, which contain the logs for the
binary RPM builds.

Passing `-C` or `--cwd` with a directory will change into that directory
before writing files. That directory **must** exist beforehand.
Otherwise, $PWD is used.

By default, a separate file will be created for each
<task>-<subtask>-<architecture> tuple, which accounts for modular packages
with multiple outputs.

Passing the `-c` or `--combined` flag will combine all the logs into a
single file, named <task id>.log
@NeilHanlon NeilHanlon force-pushed the 07-25-wip_dump_logs_from_a_given_parent_task_id branch from d63f8fd to 2899472 Compare July 26, 2024 01:44
@NeilHanlon NeilHanlon changed the base branch from feat/import-skip-upload to feat/build-peridot-cli-rpm July 26, 2024 01:44
Copy link

@MatthewHink MatthewHink left a comment

Choose a reason for hiding this comment

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

Thank you!

@resf-prow
Copy link
Contributor

resf-prow bot commented Jul 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MatthewHink, NeilHanlon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

* refactor some code into utils
* prep for task info
@NeilHanlon NeilHanlon force-pushed the 07-25-wip_dump_logs_from_a_given_parent_task_id branch from 2ede824 to 0d3255c Compare July 27, 2024 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants