Consolidate base CI support into a new base class.
Review Request #12831 — Created Feb. 13, 2023 and submitted
Information | |
---|---|
chipx86 | |
rbintegrations | |
release-3.x | |
|
|
12831 | |
Reviewers | |
rbintegrations | |
This introduces a new
rbintegrations.baseci
module, containing a
BaseCIIntegration
class. This class is responsible for listening to
publish and manual run requests, handling configuration queries, and
providing standard management of status updates.There are new helpers for updating status updates with arbitrary fields,
or putting them into specific (standardized) modes. These are smart in
that they'll only make changes to status updates for fields that are
given new values.Subclasses no longer need to implement separate code paths for publish
and manual run. Instead, they just implement an optional
prepare_build()
method to filter configurations or supply state for
builds, andstart_build()
for actually performing the build.Build state generation and validation is taken care of in the base
class, and errors on status updates are automatically set based on
whetherstart_build()
raises aCIBuildError
or a plain exception.This will soon be followed up by a change to make use of new
StatusUpdate
methods for status changes, and to correctly handle
manual run requests for the right configuration. Both of those will
be available in Review Board 5.0.3.
Unit tests pass on all supported versions of Python.
This will be pending a test in production by a customer.
Summary | |
---|---|
Description | From | Last Updated |
---|---|---|
In your description, 3rd paragraph, "Status Updates" should be "status updates" |
|
|
Should add a docstring to rbintegrations/baseci/__init__.py. |
![]() |
|
Should be either "StatusUpdate" (probably with a link), or "status update" |
|
|
Should be either "StatusUpdate" (with a link) or "status updates". Same throughout the rest of the change. |
|
|
Let's change "They" to "It" here just to be a bit more clear. |
|
|
Small nitpick: can use StatusUpdate here |
![]() |
|
Looks like the end of the sentence got cut off. |
![]() |
|
Could add a Returns section to the docstring while you're here. |
![]() |
-
-
-
rbintegrations/baseci/errors.py (Diff revision 1) Should be either "StatusUpdate" (probably with a link), or "status update"
-
rbintegrations/baseci/integration.py (Diff revision 1) Should be either "StatusUpdate" (with a link) or "status updates". Same throughout the rest of the change.
-
rbintegrations/baseci/integration.py (Diff revision 1) Let's change "They" to "It" here just to be a bit more clear.
Change Summary:
Switched terminology to
StatusUpdate
(with a link) orstatus update
(often with:term:
) where appropriate.
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Commits: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 2 (+5110 -1632) |
Checks run (2 succeeded)
Change Summary:
Posted the right revision of the update for review feedback.
Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+5136 -1632) |
Checks run (2 succeeded)

-
-
-
-
rbintegrations/baseci/tests/test_base_ci_integration.py (Diff revision 3) Looks like the end of the sentence got cut off.
-
rbintegrations/jenkinsci/integration.py (Diff revision 3) Could add a Returns section to the docstring while you're here.
Change Summary:
- Added missing documentation.
- Fleshed out and improved other docs.
Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 4 (+5166 -1630) |