#54 productmd-compose.build.* messages
Closed 4 years ago by pholica. Opened 4 years ago by pholica.
fedora-ci/ pholica/messages compose_build  into  master

@@ -0,0 +1,31 @@ 

+ {

+   "contact": {

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

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

+     "team": "OSCI",

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

+     "name": "OSCI"

+   },

+   "run": {

+     "url": "https://example.com/job/some_job/1/",

+     "log": "https://example.com/job/some_job/1/console",

+     "log_raw": "https://example.com/job/some_job/1/consoleText",

+     "log_stream": "https://example.com/job/some_job/1/consoleText"

+   },

+   "artifact": {

+     "type":  "productmd-compose",

+      "id" : "RHEL-8.0.0-20190401.0",

+      "product_stream": "rhel-8.0.0",

+      "compose_type" : "scratch",

+      "urls": [

+        "http://artifacts.osci.redhat.com/comp/RHEL-8.0.0-20190401.0/",

+        "http://some-proxy.redhat.com/composes/osci/RHEL-8.0.0-20190401.0/"

+      ]

+   },

+   "pipeline": {

+     "id" : "osci-compose-SOMEHASH",

+     "name" : "periodic rhel-8.0.0-candidate compose RHEL-8.0.0-20190401.0"

+   },

+   "generated_at": "2019-04-01 00:01:00.000000",

+   "version": "0.2.1"

+ }

@@ -0,0 +1,33 @@ 

+ {

+   "contact": {

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

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

+     "team": "OSCI",

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

+     "name": "OSCI"

+   },

+   "run": {

+     "url": "https://example.com/job/some_job/1/",

+     "log": "https://example.com/job/some_job/1/console",

+     "log_raw": "https://example.com/job/some_job/1/consoleText",

+     "log_stream": "https://example.com/job/some_job/1/consoleText"

+   },

+   "artifact": {

+     "type":  "productmd-compose",

+      "product_stream": "rhel-8.0.0",

+      "compose_type" : "scratch",

+      "urls": [

+        "http://artifacts.osci.redhat.com/comp/RHEL-8.0.0-20190401.0/",

+        "http://some-proxy.redhat.com/composes/osci/RHEL-8.0.0-20190401.0/"

+      ]

+   },

+   "pipeline": {

+     "id" : "osci-compose-SOMEHASH",

+     "name" : "periodic rhel-8.0.0-candidate compose RHEL-8.0.0-20190401.0"

+   },

+   "error" : {

+     "reason": "reason of the error"

+   },

+   "generated_at": "2019-04-01 00:01:00.000000",

+   "version": "0.2.1"

+ }

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

+ {

+   "contact": {

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

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

+     "team": "OSCI",

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

+     "name": "OSCI"

+   },

+   "run": {

+     "url": "https://example.com/job/some_job/1/",

+     "log": "https://example.com/job/some_job/1/console",

+     "log_raw": "https://example.com/job/some_job/1/consoleText",

+     "log_stream": "https://example.com/job/some_job/1/consoleText"

+   },

+   "artifact": {

+     "type":  "productmd-compose",

+      "product_stream": "rhel-8.0.0",

@pholica, nitpickiing, weird indentation here :)

+      "compose_type" : "scratch"

+   },

+   "pipeline": {

+     "id" : "osci-compose-SOMEHASH",

+     "name" : "periodic rhel-8.0.0-candidate compose RHEL-8.0.0-20190401.0"

+   },

+   "generated_at": "2019-04-01 00:01:00.000000",

+   "version": "0.2.1"

+ }

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

+ {

+   "contact": {

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

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

+     "team": "OSCI",

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

+     "name": "OSCI"

+   },

+   "run": {

+     "url": "https://example.com/job/some_job/1/",

+     "log": "https://example.com/job/some_job/1/console",

+     "log_raw": "https://example.com/job/some_job/1/consoleText",

+     "log_stream": "https://example.com/job/some_job/1/consoleText"

+   },

+   "artifact": {

+     "type":  "productmd-compose",

+      "product_stream": "rhel-8.0.0",

+      "compose_type" : "scratch"

+   },

+   "pipeline": {

+     "id" : "osci-compose-SOMEHASH",

+     "name" : "periodic rhel-8.0.0-candidate compose RHEL-8.0.0-20190401.0"

+   },

+   "generated_at": "2019-04-01 00:01:00.000000",

+   "version": "0.2.1"

+ }

@@ -0,0 +1,31 @@ 

+ $id: https://pagure.io/fedora-ci/messages/productmd-compose.build.complete

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

+ 

+ description:

+     Build of the compose has been completed.

+     This is a mandatory message.

+ 

+ properties:

+     contact:

+         $ref: contact.json

+     run:

+         $ref: run.json

+     artifact:

+         $ref: productmd-compose.json

+     pipeline:

+         $ref: pipeline.json

+     notification:

+         $ref: notification.json

+     generated_at:

+         $ref: common.json#properties/generated_at

+     version:

+         $ref: common.json#properties/version

+ 

+ required:

+     - contact

+     - run

+     - artifact

+     - generated_at

+     - version

+ 

+ type: object

@@ -0,0 +1,43 @@ 

+ $id: https://pagure.io/fedora-ci/messages/productmd-compose.build.error

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

+ 

+ description:

+     Build has aborted, it was not finished, e.g. because of infrastructure

+     error, build system error, etc. This is a mandatory message.

+ 

+ properties:

+     contact:

+         $ref: contact.json

+     run:

+         $ref: run.json

+     artifact:

+         $ref: productmd-compose.json

+     pipeline:

+         $ref: pipeline.json

+     test:

+         $ref: test-common.json

+     error:

+         $ref: error.json

+     notification:

+         $ref: notification.json

+     system:

+         type: array

+         items:

+             $ref: productmd-compose-system.json

+     image:

+         $ref: productmd-compose-image.json

+     generated_at:

+         $ref: common.json#properties/generated_at

+     version:

+         $ref: common.json#properties/version

+ 

+ required:

+     - contact

+     - run

+     - artifact

+     - pipeline

+     - error

+     - generated_at

+     - version

+ 

+ type: object

@@ -0,0 +1,30 @@ 

+ $id: https://pagure.io/fedora-ci/messages/productmd-compose.build.queued

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

+ 

+ description:

+     Build has been queued, but not started yet.

+     This is an optional message.

+ 

+ properties:

+     contact:

+         $ref: contact.json

+     run:

+         $ref: run.json

+     artifact:

+         $ref: productmd-compose.json

+     pipeline:

+         $ref: pipeline.json

+     generated_at:

+         $ref: common.json#properties/generated_at

+     version:

+         $ref: common.json#properties/version

+ 

+ required:

+     - contact

+     - run

+     - artifact

+     - pipeline

+     - generated_at

+     - version

+ 

+ type: object

@@ -0,0 +1,30 @@ 

+ $id: https://pagure.io/fedora-ci/messages/productmd-compose.build.running

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

+ 

+ description:

+     Build has been started and is in progress.

+     This is an optional message.

+ 

+ properties:

+     contact:

+         $ref: contact.json

+     run:

+         $ref: run.json

+     artifact:

+         $ref: productmd-compose.json

+     pipeline:

+         $ref: pipeline.json

+     generated_at:

+         $ref: common.json#properties/generated_at

+     version:

+         $ref: common.json#properties/version

+ 

+ required:

+     - contact

+     - run

+     - artifact

+     - pipeline

+     - generated_at

+     - version

+ 

+ type: object

@@ -29,10 +29,25 @@ 

              - updates

              - released

          type: string

+     product_stream:

+         description:

+             Stream of the product the compose is built from.

+         examples:

+             - rhel-8.0.0

+             - fedora-29

+         type: string

+     urls:

+         items:

+             description:

+                 URL to location where the compose is available

+             examples:

+                 - http://example.com/path/to/compose

+                 - http://mirror.example.com/path/to/compose

+             type: string

+         type: array

  

  required:

      - type

-     - id

@pholica why is this removed?

happz commented 4 years ago

type and id should stay required, having the same meaning across all artifact classes.

      - compose_type

  

  type: object

Those messages should be used by systems building composes.
Also dropping id from mandatory fields as it's not available
until the compose is actually built.

Just some small comments ...

type and id should stay required, having the same meaning across all artifact classes.

The id is removed, because it's not know at the beginning of the build process, it's known only once the build is finished. @astepano correct me please if I'm wrong

id is the ID of the artifact your pipeline's testing, the artifact for which you emit messages with test results. How could it not be known? :)

If there's no ID, you don't have to bother sending those messages anyway, since there would be no way to match them with other messages (those with the ID, sent when it's known).

But this pull request is about adding messages for build process of the artifact. The name of the artifact in case of compose is not known until it's built.

Metadata Update from @mvadkert:
- Pull-request tagged with: update-from-author-needed

4 years ago

@pholica so it makes sense to send out for you only complete and error messages really. But please lets keep id as required. It is required for all our artifact centric messages. Without an ID, the messages are unusable :(

Ok, the ID requirement makes sense. I'll discuss the possibility to have id with @astepano (I believe this should be possible - requesting specific compose id from the build system).
I'll close this pull request for now since we found out that we need to extend the message with some more information and re-open it once we're sure what we want.
Sorry for the noise and thank you for your feedback, I'll be back ;)

Pull-Request has been closed by pholica

4 years ago