Repository navigation
Add and exlude riscv64 architecture - #403
Merged
Merged
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe architecture model now recognizes riscv64 by adding it to the File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Handle riscv64 and prevent artifacts with no supported architectures from being scheduled.
New Features:
Bug Fixes:
Enhancements:
Tests: