#6 Implement brew-build gating messages
Merged 5 years ago by psss. Opened 5 years ago by psss.

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

+ {

+     "artifact": {

+         "type": "brew-build",

+         "id": 14546276,

+         "issuer": "ovasik",

+         "component": "setup",

+         "nvr": "setup-2.8.71-7.el7_4",

+         "scratch": false,

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

+     },

+     "gate": {

+         "name": "OSCI Compose Gating Bot",

+         "team": "OSCI",

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

+         "email": "osci@somewhere.com",

+         "irc": "#osci",

+         "environment": "production"

+     },

+     "summary": "1 of 1 required tests passed",

+     "decision": "go",

+     "decision_url": "https://datagrepper.somewhere.com/id?id=2018-21cc85d6",

+     "web_url": "https://dashboard.com/job/1234/",

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

+     "version": "0.1.0"

+ }

@@ -0,0 +1,24 @@ 

+ {

+     "artifact": {

+         "type": "brew-build",

+         "id": 14546276,

+         "issuer": "ovasik",

+         "component": "setup",

+         "nvr": "setup-2.8.71-7.el7_4",

+         "scratch": false,

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

+     },

+     "gate": {

+         "name": "OSCI Compose Gating Bot",

+         "team": "OSCI",

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

+         "email": "osci@somewhere.com",

+         "irc": "#osci",

+         "environment": "production"

+     },

+     "reason": "No test results available after 24 hours.",

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

+     "web_url": "https://dashboard.com/job/1234/",

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

+     "version": "0.1.0"

+ }

@@ -0,0 +1,22 @@ 

+ {

+     "artifact": {

+         "type": "brew-build",

+         "id": 14546276,

+         "issuer": "ovasik",

+         "component": "setup",

+         "nvr": "setup-2.8.71-7.el7_4",

+         "scratch": false,

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

+     },

+     "gate": {

+         "name": "OSCI Compose Gating Bot",

+         "team": "OSCI",

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

+         "email": "osci@somewhere.com",

+         "irc": "#osci",

+         "environment": "production"

+     },

+     "web_url": "https://dashboard.com/job/1234/",

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

+     "version": "0.1.0"

+ }

@@ -0,0 +1,22 @@ 

+ {

+     "artifact": {

+         "type": "brew-build",

+         "id": 14546276,

+         "issuer": "ovasik",

+         "component": "setup",

+         "nvr": "setup-2.8.71-7.el7_4",

+         "scratch": false,

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

+     },

+     "gate": {

+         "name": "OSCI Compose Gating Bot",

+         "team": "OSCI",

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

+         "email": "osci@somewhere.com",

+         "irc": "#osci",

+         "environment": "production"

+     },

+     "web_url": "https://dashboard.com/job/1234/",

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

+     "version": "0.1.0"

+ }

@@ -3,6 +3,7 @@ 

      "name": "BaseOS CI",

      "team": "BaseOS",

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

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

      "irc": "#baseosci",

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

      "environment": "production"

@@ -3,6 +3,7 @@ 

      "name": "BaseOS CI",

      "team": "BaseOS",

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

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

      "irc": "#baseosci",

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

      "environment": "production"

@@ -3,6 +3,7 @@ 

      "name": "BaseOS CI",

      "team": "BaseOS",

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

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

      "irc": "#baseosci",

      "email": "baseos-ci@redhat.com",

      "environment": "production"

@@ -3,6 +3,7 @@ 

      "name": "BaseOS CI",

      "team": "BaseOS",

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

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

      "irc": "#baseosci",

      "email": "baseos-ci@redhat.com",

      "environment": "production"

@@ -3,6 +3,7 @@ 

      "name": "BaseOS CI",

      "team": "BaseOS",

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

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

      "irc": "#baseosci",

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

      "environment": "production"

@@ -3,6 +3,7 @@ 

      "name": "BaseOS CI",

      "team": "BaseOS",

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

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

      "irc": "#baseosci",

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

      "environment": "production"

@@ -3,6 +3,7 @@ 

      "name": "BaseOS CI",

      "team": "BaseOS",

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

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

      "irc": "#baseosci",

      "email": "baseos-ci@redhat.com",

      "environment": "production"

@@ -3,6 +3,7 @@ 

      "name": "BaseOS CI",

      "team": "BaseOS",

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

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

      "irc": "#baseosci",

      "email": "baseos-ci@redhat.com",

      "environment": "production"

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

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

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

+ 

+ description:

+     Gating of the brew build has been completed.

+     The decision has been made and applied.

+     This is a mandatory message.

+ 

+ properties:

+     artifact:

+         $ref: brew-build.json

+     gate:

+         $ref: contact.json

+     summary:

+         $ref: gate.json#properties/summary

+     decision:

+         $ref: gate.json#properties/decision

+     decision_url:

+         $ref: gate.json#properties/decision_url

+     web_url:

+         $ref: common.json#properties/web_url

+     generated_at:

+         $ref: common.json#properties/generated_at

+     version:

+         $ref: common.json#properties/version

+ 

+ required:

+     - artifact

+     - gate

+     - summary

+     - decision

+     - decision_url

+     - generated_at

+     - version

+ 

+ type: object

@@ -0,0 +1,32 @@ 

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

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

+ 

+ description:

+     Gating of the brew build has failed.

+     The decision is unknown because of an infrastructure problem.

+     This is a mandatory message.

+ 

+ properties:

+     artifact:

+         $ref: brew-build.json

+     gate:

+         $ref: contact.json

+     reason:

+         $ref: common.json#properties/reason

+     web_url:

+         $ref: common.json#properties/web_url

+     issue_url:

+         $ref: common.json#properties/issue_url

+     generated_at:

+         $ref: common.json#properties/generated_at

+     version:

+         $ref: common.json#properties/version

+ 

+ required:

+     - artifact

+     - gate

+     - reason

+     - generated_at

+     - version

+ 

+ type: object

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

+ $id: https://pagure.io/fedora-ci/messages/brew-build.gate.queued

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

+ 

+ description:

+     Gating of the brew build has been queued.

+ 

+ properties:

+     artifact:

+         $ref: brew-build.json

+     gate:

+         $ref: contact.json

+     web_url:

+         $ref: common.json#properties/web_url

+     generated_at:

+         $ref: common.json#properties/generated_at

+     version:

+         $ref: common.json#properties/version

+ 

+ required:

+     - artifact

+     - gate

+     - generated_at

+     - version

+ 

+ type: object

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

+ $id: https://pagure.io/fedora-ci/messages/brew-build.gate.running

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

+ 

+ description:

+     Gating of the brew build is in progres.

+ 

+ properties:

+     artifact:

+         $ref: brew-build.json

+     gate:

+         $ref: contact.json

+     web_url:

+         $ref: common.json#properties/web_url

+     generated_at:

+         $ref: common.json#properties/generated_at

+     version:

+         $ref: common.json#properties/version

+ 

+ required:

+     - artifact

+     - gate

+     - generated_at

+     - version

+ 

+ type: object

@@ -7,7 +7,7 @@ 

  

  properties:

      ci:

-         $ref: ci.json

+         $ref: contact.json

      run:

          $ref: run.json

      artifact:

@@ -9,7 +9,7 @@ 

  

  properties:

      ci:

-         $ref: ci.json

+         $ref: contact.json

      run:

          $ref: run.json

      artifact:

@@ -7,7 +7,7 @@ 

  

  properties:

      ci:

-         $ref: ci.json

+         $ref: contact.json

      run:

          $ref: run.json

      artifact:

@@ -7,7 +7,7 @@ 

  

  properties:

      ci:

-         $ref: ci.json

+         $ref: contact.json

      run:

          $ref: run.json

      artifact:

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

              Reason of the failure.

          examples:

              - CI pipeline aborted.

+             - No test results available after 24 hours.

          type: string

      recipients:

          items:

schemas/contact.yaml schemas/ci.yaml
file renamed
+29 -13
@@ -1,48 +1,64 @@ 

- $id: https://pagure.io/fedora-ci/messages/ci

+ $id: https://pagure.io/fedora-ci/messages/contact

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

  

  description:

-     Information about the CI system performing the testing.

+     Information about the team and the system which is performing

+     testing or gating.

  

  properties:

+     # Required attributes

      name:

          description:

-             A human readable name for the CI system.

+             A human readable name for the system.

          examples:

              - BaseOS CI

+             - OSCI Compose Gating Bot

          type: string

      team:

          description:

-             A human readable name of the team running the testing. This is

-             useful to distinguish multiple teams which running on the same

-             Jenkins CI instance.

+             A human readable name of the team running the testing

+             or gating. This is useful for example to distinguish

+             multiple teams running on the same Jenkins instance.

          examples:

              - BaseOS QE

              - Libvirt QE

              - RTT

+             - OSCI

          type: string

-     url:

+     docs:

          description:

-             URL link to the CI system.

+             Link to documentation with details about the system.

          examples:

-             - https://jenkins-continuous-infra.apps.ci.centos.org

+             - https://somewhere.com/user-documentation

          type: string

          format: uri

      email:

          description:

-             Contact email.

+             Contact email address.

+         examples:

+             - osci@somewhere.com

+         type: string

+         format: email

+     # Optional attributes

+     url:

+         description:

+             URL link to the system or system's web interface.

          examples:

-             - baseos-ci@somewhere.com

+             - https://jenkins-continuous-infra.apps.ci.centos.org

          type: string

+         format: uri

      irc:

          description:

              IRC contact for help (prefix with '#' for channel).

          examples:

-             - '#baseosci'

+             - '#osci'

          type: string

      environment:

          description:

              Environment indication.

+         enum:

+             - production

+             - stage

          examples:

              - production

              - stage
@@ -51,7 +67,7 @@ 

  required:

      - name

      - team

-     - url

+     - docs

      - email

  

  type: object

file added
+31
@@ -0,0 +1,31 @@ 

+ $id: https://pagure.io/fedora-ci/messages/gate

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

+ 

+ description:

+     Common attributes used in gating messages.

+ 

+ properties:

+     summary:

+         description:

+             Short text summarizing the gating decision.

+         examples:

+             - "1 of 1 required tests passed"

+         type: string

+     decision:

+         description:

+             Gating decision. One of "go" or "no-go".

+         enum:

+             - go

+             - no-go

+         examples:

+             - go

+         type: string

+     decision_url:

+         description:

+             Url of the detailed results of the Greenwave decision.

+         examples:

+             - https://datagrepper.somewhere.com/id?id=2018-21cc85d6

+         type: string

+         format: uri

+ 

+ type: object

@@ -7,7 +7,7 @@ 

  

  properties:

      ci:

-         $ref: ci.json

+         $ref: contact.json

      run:

          $ref: run.json

      artifact:

@@ -9,7 +9,7 @@ 

  

  properties:

      ci:

-         $ref: ci.json

+         $ref: contact.json

      run:

          $ref: run.json

      artifact:

@@ -7,7 +7,7 @@ 

  

  properties:

      ci:

-         $ref: ci.json

+         $ref: contact.json

      run:

          $ref: run.json

      artifact:

@@ -7,7 +7,7 @@ 

  

  properties:

      ci:

-         $ref: ci.json

+         $ref: contact.json

      run:

          $ref: run.json

      artifact:

This is the first draft of the gating messages specification. It
mirrors the format of testing messages and adds a new "gating"
schema to define common gating attributes (to be used for koji
builds and possibly other artifacts as well in the future).

not sure, where we set version now, but I think this now will be 0.1.1

@psss We will need also add field about the gating system itself, and about some details. I am thinking about

"gate": {
"name": "OSCI Compose Gating Bot",
"team": "OSCI",
"documentation": "https://somewhere.com/user-doc",
"irc": "#osci",
"email": "osci@somewhere.com",
"environment": "production"
},

Pasting again to make it more readable:

"gate": {
    "name": "OSCI Compose Gating Bot",
    "team": "OSCI",
    "documentation": "https://somewhere.com/user-doc",
    "irc": "#osci",
    "email": "osci@somewhere.com",
    "environment": "production"
}

I understand that similar ci information is used for the test messages as there can be multiple CI systems performing the testing and sending results to the messages bus. But for gating, wouldn't there be always just a single service which says go/nogo? Do you expect there will be more bots taking care of the gating process? Who would be consumer of that information? Thanks.

I understand that similar ci information is used for the test messages as there can be multiple CI systems performing the testing and sending results to the messages bus. But for gating, wouldn't there be always just a single service which says go/nogo? Do you expect there will be more bots taking care of the gating process? Who would be consumer of that information? Thanks.

I am not expecting more systems. But this info is needed anyway, so the dashboard (pagure or CI dashbaord) can display more info about gating events and does not keep this info by itself. Does make sense?

OK, I see. I'll add gate to the spec.

1 new commit added

  • Add gate info to gating messages
5 years ago

I've added the gate info to examples and definition. I omitted the team attribute from the example above as this information seems to be relevant for testing only. Or is the team name needed as well, @mvadkert?

2 new commits added

  • Add gate info to gating messages
  • Implement brew-build gating messages
5 years ago

Forgot to add the new attribute to required. This should now be fixed.

rebased onto c669f0e

5 years ago

Updated based on the irc discussion.
@mvadkert, please review.

2 new commits added

  • Implement brew-build gating messages
  • Rename "ci" schema to "contact" to be more general
5 years ago

Included the issue_url attribute as well.

Pull-Request has been merged by psss

5 years ago