#913 backend: fix wrong message validation class
Merged 3 months ago by praiskup. Opened 3 months ago by praiskup.
copr/ praiskup/copr fix-messaging-classes  into  master

file modified
+2 -2

@@ -60,12 +60,12 @@ 

              'chroot.start': {

                  'what': "chroot start: chroot:{chroot} user:{user}" \

                          " copr:{copr} pkg:{pkg} build:{build} ip:{ip} pid:{pid}",

-                 'class': schema.BuildChrootEndedV1,

+                 'class': schema.BuildChrootStartedV1DontUse,

              },

              'build.end': {

                  'what': "build end: user:{user} copr:{copr} build:{build}" \

                          " pkg:{pkg} version:{version} ip:{ip} pid:{pid} status:{status}",

-                 'class': schema.BuildChrootStartedV1DontUse,

+                 'class': schema.BuildChrootEndedV1,

              },

          }

  

Reported by @redi on #fedora-admin channel:
<redi> I got an email for each of the chroots, fairly soon after
submitting the build (maybe right away, not sure)
<redi> the email said "finished with 'running'"

I probably understand the change, but I don't understand why we use BuildChrootStartedV1DontUse.

The chroot.start message is some weird historical non-sense message IMO (help me, if you can...); it IMO just simply duplicates build.start message - so I view it as useless. Anyways, I don't feel comfortable to remove it entirely now.

That said -- nobody should have a need to consume those messages, but somebody still can. That's the reason why I haven't added a direct support for that message type into copr-messaging consuming handlers...

I was just confused by it, but the PR makes sense and it doesn't introduce the BuildChrootStartedV1DontUse, it was already there, so +1 from me.

Pull-Request has been merged by praiskup

3 months ago