Skip to content

Add and exlude riscv64 architecture - #403

Merged
kkaarreell merged 2 commits into
mainfrom
ks_no_riscv64
Oct 6, 2026
Merged

kkaarreell merged 2 commits into
mainfrom
ks_no_riscv64

Conversation

@kkaarreell

@kkaarreell kkaarreell commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by Sourcery

Handle riscv64 and prevent artifacts with no supported architectures from being scheduled.

New Features:

  • Add riscv64 as a recognized architecture and exclude unsupported-architecture-only artifacts from scheduling.

Bug Fixes:

  • Preserve explicitly empty artifact architecture metadata instead of falling back to default architectures.

Enhancements:

  • Use architecture metadata from both errata and RoG artifacts when resolving scheduling targets.

Tests:

  • Add coverage for architecture filtering, metadata resolution, fallback behavior, and skipping unsupported artifacts.

@kkaarreell kkaarreell self-assigned this Oct 6, 2026
@sourcery-ai

sourcery-ai Bot commented Oct 6, 2026 •

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

Reviewer's Guide

The architecture model now recognizes riscv64 by adding it to the Arch enum, alongside the existing supported architectures.

File-Level Changes

Change Details Files
Add riscv64 as a recognized architecture in the model layer.
  • Extend the architecture enum with the RISCV64 value mapped to riscv64.
newa/models/base.py

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 found 3 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="newa/models/base.py" line_range="35" />
<code_context>
     S390X = 's390x'
     PPC64LE = 'ppc64le'
     PPC64 = 'ppc64'
+    RISCV64 = 'riscv64'
     NOARCH = 'noarch'
     MULTI = 'multi'
</code_context>
<issue_to_address>
**Errata schedule on unrelated architectures**

When an erratum lists only `riscv64`, which `Arch.architectures` filters out, `_determine_architectures` treats the resulting empty `Erratum.archs` list as missing metadata and falls back to defaults, so the erratum is scheduled on architectures it does not target.

Distinguish missing architecture metadata from an explicitly empty supported-architecture set, and skip scheduling the erratum in the latter case.

Also at `newa/models/base.py:36`.
</issue_to_address>

### Comment 2
<location path="newa/models/base.py" line_range="35" />
<code_context>
     S390X = 's390x'
     PPC64LE = 'ppc64le'
     PPC64 = 'ppc64'
+    RISCV64 = 'riscv64'
     NOARCH = 'noarch'
     MULTI = 'multi'
</code_context>
<issue_to_address>
**Excluded recipe architecture is scheduled**

When a recipe explicitly defines `riscv64` in its `arch` dimension, `_configure_recipe` preserves the explicit dimension, and request generation accepts `Arch.RISCV64` and submits it to Testing Farm without applying the supported-architecture filter, so the recipe schedules an excluded architecture.

Filter or reject excluded architectures in explicit recipe dimensions before building requests.

Also at `newa/models/base.py:36`.
</issue_to_address>

### Comment 3
<location path="newa/models/base.py" line_range="35" />
<code_context>
     S390X = 's390x'
     PPC64LE = 'ppc64le'
     PPC64 = 'ppc64'
+    RISCV64 = 'riscv64'
     NOARCH = 'noarch'
     MULTI = 'multi'
</code_context>
<issue_to_address>
**Explicit architecture request is dropped**

When a caller explicitly requests `riscv64`, such as with `--arch riscv64`, `_determine_architectures` parses the option as `Arch.RISCV64`, but `Arch.architectures` filters it out because `_valid` omits it, leaving no RISC-V architecture in the scheduled list.

Handle an explicitly requested architecture that is absent from `_valid` explicitly instead of silently filtering it out.

Also at `newa/models/base.py:36`.
</issue_to_address>

Sourcery assessment

Approval pending. 3 findings to address first.

Blocking findings: newa/models/base.py:35, newa/models/base.py:35, newa/models/base.py:35


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

Comment thread newa/models/base.py Resolved
Comment thread newa/models/base.py Resolved
Comment thread newa/models/base.py Resolved
An erratum or RoG MR whose architectures are all filtered out by
Arch.architectures (e.g. riscv64-only) produced an empty arch list, which
_determine_architectures treated as missing metadata and replaced with the
defaults - scheduling the artifact on architectures it does not target.

Honor the artifact's architecture metadata verbatim (including an empty
list) and skip scheduling when the supported-architecture set is empty.
RoG MRs now consult their own archs too, mirroring errata.

Add unit tests for Arch.architectures excluded-only handling,
_determine_architectures across erratum/RoG/noarch/excluded scenarios, and
the _process_jira_job skip path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kkaarreell
kkaarreell merged commit c7a83a1 into main Oct 6, 2026
18 checks passed
@kkaarreell
kkaarreell deleted the ks_no_riscv64 branch October 6, 2026 09:25
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.

1 participant