Skip to content

Add architecture info to list command TF request output#369

Merged
kkaarreell merged 1 commit into
mainfrom
ks_list_arch
Jun 1, 2026
Merged

Add architecture info to list command TF request output#369
kkaarreell merged 1 commit into
mainfrom
ks_list_arch

Conversation

@kkaarreell

@kkaarreell kkaarreell commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Display architecture alongside artifacts URL in 'newa list' output to help users quickly identify which architecture a test request was executed on.

Resolves: #368

🤖 Generated with Claude Code

Summary by Sourcery

New Features:

  • Display the architecture of each test request in the newa list command output when available.

Display architecture alongside artifacts URL in 'newa list' output to help
users quickly identify which architecture a test request was executed on.

Resolves: #368

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@kkaarreell kkaarreell self-assigned this Jun 1, 2026
@sourcery-ai

sourcery-ai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds architecture information to the newa list test request output by appending an architecture suffix next to the artifacts URL when available, while preserving existing colored state/result formatting.

Flow diagram for updated newa list architecture output

flowchart TD
    A[Execute newa list] --> B[Iterate execute_job]
    B --> C[Get artifacts_url from execute_job.execution]
    B --> D[Get arch from execute_job.request]
    D --> E{arch is not None?}
    E -- Yes --> F[arch_suffix = ', arch: ' + arch.value]
    E -- No --> G[arch_suffix = empty string]
    C --> H[Format line with colored_state, colored_result, artifacts_url + arch_suffix]
    F --> H
    G --> H
    H --> I[Print formatted line]
Loading

File-Level Changes

Change Details Files
Display architecture alongside artifacts URL in list command output when available.
  • Retrieve architecture from the request object using getattr with a safe default
  • Format architecture as a suffix string only when an architecture value exists
  • Append the architecture suffix to the artifacts URL in the printed output while keeping state and result colorization intact
newa/cli/commands/list_cmd.py

Assessment against linked issues

Issue Objective Addressed Explanation
#368 Modify the newa list command output so that each listed request includes its architecture (when available) alongside state, result, and artifacts URL.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • When building arch_suffix, you assume arch has a .value attribute; if arch can be a plain string or another type in some cases, consider using str(arch) (or handling both Enum and non-Enum) to avoid potential attribute errors.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- When building `arch_suffix`, you assume `arch` has a `.value` attribute; if `arch` can be a plain string or another type in some cases, consider using `str(arch)` (or handling both Enum and non-Enum) to avoid potential attribute errors.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@kkaarreell

Copy link
Copy Markdown
Collaborator Author

Hey - I've left some high level feedback:

* When building `arch_suffix`, you assume `arch` has a `.value` attribute; if `arch` can be a plain string or another type in some cases, consider using `str(arch)` (or handling both Enum and non-Enum) to avoid potential attribute errors.

Prompt for AI Agents

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

The converter=Arch ensures that any value assigned to arch is automatically converted to an Arch enum. This means arch should only ever be:

  1. An Arch enum instance, or
  2. None

@kkaarreell kkaarreell merged commit f19eacc into main Jun 1, 2026
16 checks passed
@kkaarreell kkaarreell deleted the ks_list_arch branch June 1, 2026 09:37
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.

Add arch info into "newa list" output

1 participant