#5 Remove the "type" attribute from artifact?
Closed 5 years ago Opened 5 years ago by psss.

Currently we have the information about the brew build artifact type duplicated:

  • topic name: brew-build.test.complete
  • artifact attribute: "type": "brew-build"

The same applies for koji-build. This means that the two artifact definitions are in fact almost the same (basically just naming):

An alternative way would be to have just a single artifact definition called rpm-build and reference it from both koji-build and brew-build messages. The type attribute could be removed.


We could also use just a single definition for both koji & brew builds like suggested in this pull request:

Although this approach does not ensure the type is correct (enum lists both koji and brew build). But I don't think it is a big deal...

I have to say I don't like the idea of leaving the artifact.type attribute out. The problem that I see is that names of the topics are not part of the standard, so there's no guarantee on how they might evolve/change, unlike attributes that are part of the message.

Additionally, if the topic names do change, this would lead to necessary changes in the code that processes messages without the format changing, which again is not optimal.

I would personally go for the solution mentioned in PR #7, but I don't have a strong preference.

Although this approach does not ensure the type is correct (enum lists both koji and brew build). But I don't think it is a big deal...

Yeah, current solution seems fine. I would not remove also artifact.type.

#7 was merged. Closing this.

Metadata Update from @mvadkert:
- Issue assigned to mvadkert

5 years ago

Metadata Update from @mvadkert:
- Issue status updated to: Closed (was: Open)

5 years ago

Login to comment on this ticket.

Metadata