#41 Add brew-build-group.build.* message type
Merged 5 years ago by mvadkert. Opened 5 years ago by psss.

file modified
+1
@@ -80,6 +80,7 @@ 

  

  where `event` is one of the recognized events, for example:

  

+ * build - tracking progress of building artifacts

  * test - for testing progression and results

  * gate - for gating events of artifacts, i.e. events blocking progression of the artifact in the release pipeline

  

@@ -0,0 +1,36 @@ 

+ {

+     "contact": {

+         "name": "BaseOS CI",

+         "team": "BaseOS",

+         "url": "https://somewhere.com",

+         "docs": "https://somewhere.com/user-documentation",

+         "irc": "#baseosci",

+         "email": "baseos-ci@somewhere.com",

+         "environment": "production"

+     },

+     "artifact": {

+         "type": "rpm-build-group",

+         "id": "selinux-update-345",

+         "repository": "https://some.url/repo",

+         "builds":

+             [{

+                 "type": "brew-build",

+                 "id": 14546276,

+                 "issuer": "plautrba",

+                 "component": "libselinux",

+                 "nvr": "libselinux-2.8-6.el7.x86_64",

+                 "scratch": false,

+                 "source": "git+https://src.fedoraproject.org/rpms/libselinux.git?#5e0ae23a"

+             }, {

+                 "type": "brew-build",

+                 "id": 14546277,

+                 "issuer": "plautrba",

+                 "component": "libsepol",

+                 "nvr": "libsepol-2.8-3.el7.x86_64",

+                 "scratch": false,

+                 "source": "git+https://src.fedoraproject.org/rpms/libsepol.git?#5e0ae23a"

+             }]

+     },

+     "generated_at": "2018-05-10 08:58:31.222602",

+     "version": "0.2.2"

+ }

@@ -0,0 +1,40 @@ 

+ {

+     "contact": {

+         "name": "BaseOS CI",

+         "team": "BaseOS",

+         "url": "https://somewhere.com",

+         "docs": "https://somewhere.com/user-documentation",

+         "irc": "#baseosci",

+         "email": "baseos-ci@somewhere.com",

+         "environment": "production"

+     },

+     "artifact": {

+         "type": "rpm-build-group",

+         "id": "selinux-update-345",

+         "repository": "https://some.url/repo",

+         "builds":

+             [{

+                 "type": "brew-build",

+                 "id": 14546276,

+                 "issuer": "plautrba",

+                 "component": "libselinux",

+                 "nvr": "libselinux-2.8-6.el7.x86_64",

+                 "scratch": false,

+                 "source": "git+https://src.fedoraproject.org/rpms/libselinux.git?#5e0ae23a"

+             }, {

+                 "type": "brew-build",

+                 "id": 14546277,

+                 "issuer": "plautrba",

+                 "component": "libsepol",

+                 "nvr": "libsepol-2.8-3.el7.x86_64",

+                 "scratch": false,

+                 "source": "git+https://src.fedoraproject.org/rpms/libsepol.git?#5e0ae23a"

+             }]

+     },

+     "error": {

+         "reason": "ODCS repository preparation failed.",

+         "issue_url": "http://sentry.somewhere.com/baseos/production/issues/1149/"

+     },

+     "generated_at": "2018-05-10 08:58:31.222602",

+     "version": "0.2.2"

+ }

@@ -0,0 +1,25 @@ 

+ $id: https://pagure.io/fedora-ci/messages/brew-build-group.build.complete

+ $schema: http://json-schema.org/draft-07/schema#

+ 

+ description:

+     Preparation of the build group has been finished.

+     The side-tag with its associated builds is ready for testing.

+     Repository with relevant packages has been created.

+ 

+ properties:

+     contact:

+         $ref: contact.json

+     artifact:

+         $ref: rpm-build-group.json

+     generated_at:

+         $ref: common.json#properties/generated_at

+     version:

+         $ref: common.json#properties/version

+ 

+ required:

+     - contact

+     - artifact

+     - generated_at

+     - version

+ 

+ type: object

@@ -0,0 +1,26 @@ 

+ $id: https://pagure.io/fedora-ci/messages/brew-build-group.build.error

+ $schema: http://json-schema.org/draft-07/schema#

+ 

+ description:

+     Preparation of the build group failed.

+ 

+ properties:

+     contact:

+         $ref: contact.json

+     artifact:

+         $ref: rpm-build-group.json

+     error:

+         $ref: error.json

+     generated_at:

+         $ref: common.json#properties/generated_at

+     version:

+         $ref: common.json#properties/version

+ 

+ required:

+     - contact

+     - artifact

+     - error

+     - generated_at

+     - version

+ 

+ type: object

@@ -0,0 +1,38 @@ 

+ $id: https://pagure.io/fedora-ci/messages/rpm-build-group

+ $schema: http://json-schema.org/draft-07/schema#

+ 

+ description:

+     Details about the rpm build group being tested.

+ 

+ properties:

+     id:

+         description:

+             The package group is identified by assigned side-tag.

+         examples:

+             - selinux-update-345

+         type: string

+     type:

+         description:

+             Artifact type, in this case 'rpm-build-group'.

+         enum:

+             - rpm-build-group

+         type: string

+     builds:

+         type: array

+         items:

+             $ref: rpm-build.json

+     repository:

+         description:

+             Url of the repository with packages from the side-tag.

+         examples:

+             - https://some.url/repo

+         type: string

+         format: uri

+ 

+ required:

+     - id

+     - type

+     - builds

+     - repository

+ 

+ type: object

These messages will be used to denote that a group of brew builds
gathered under a side-tag is ready for testing and corresponding
repository containing relevant packages has been created.

Thanks @psss, seems I again confused you.

I think for the clarity and compliance to the current standard, we should stick to the schema for topic:
<artifact>.<event>.<status>

So what we really need here is to define 2 messages:
brew-build-group.build.complete
brew-build-group.build.error

where the former means that the artifact was successfully built, the latter that the artifact failed to built.

I see, thanks for clarification. Will update PR accordingly.

Still, one more question: So we will send brew-build-group.build.complete when the build group is ready for testing (e.g. user hits a button or update is created). But if buidling of the artifact fails what would be included in the message if artifact is not there? Just error message?

rebased onto 00054b3d37cfd35ffef0ee2cc9c242beb8e27ef1

5 years ago

I've updated the pull request to define brew-build-group.build.complete and brew-build-group.build.error messages. Regarding the question above: For now the error message example contains identical information as complete plus the error section.

rebased onto a657f8fe5cf1959e4eb859b57483004cc48d77d3

5 years ago

@mvadkert, @bgoncalv could you please review last update?

rebased onto 1c965eec527a0662d48796568c23041c2571398c

5 years ago

lgtm, please add contact info #45

rebased onto 9c3e95e

5 years ago

Pull-Request has been merged by mvadkert

5 years ago