Implement commenting on failure based on config#2182
Implement commenting on failure based on config#2182softwarefactory-project-zuul[bot] merged 1 commit intopackit:mainfrom
Conversation
7174532 to
b47208b
Compare
This comment was marked as outdated.
This comment was marked as outdated.
e451537 to
d5b2f7c
Compare
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 53s |
| return | ||
|
|
||
| formatted_message = configured_message.format( | ||
| commit_sha=self.db_project_event.commit_sha |
There was a problem hiding this comment.
I quite like the job_name variable, or, maybe some links might be requested. But we can freely stay with this and add on request later on.
There was a problem hiding this comment.
I removed it since users can define their custom messages per-job which can replace this, but I am not strongly against
maybe @martinpitt could help us with the feedback here: would you be interested in Packit providing some other variables besides commit_sha (see the docs in preparation) that you could utilise in the configuration of the custom failure messages? :)
There was a problem hiding this comment.
The big enabler here is to get a configurable list of people to ping, all the details can then be examined on the PR page.
Personally I liked the first version (i.e. just the first commit) a bit better: it's (mildly) useful to have the job name in the message, and it is IMHO much better to not interpolate configured_message -- adding variables to the text sounds like a recipe for bugs.
But it's not a strong opinion -- I'd be happy either way (and really looking forward to this!)
There was a problem hiding this comment.
thanks for the feedback! I can see that as @lachmanfrantisek wrote before, some users would like to have this completely customizable and by providing the commit_sha, actually, the duplication of the comment in the PR can be configured as well: when {commit_sha} is not present in the configured message, there will be only one Packit comment per PR and when it will be present, Packit will place a new comment for each failure for different commit
I would probably test it in staging in the current form and we can still easily tweak the content of the comment if needed
d5b2f7c to
94bd0ff
Compare
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 46s |
If there is the failure_comment_message defined in the config, notify users via comment on failure using the configured message. Check for previous comment by Packit for duplication. Fixes packit#1911
94bd0ff to
c2dbd61
Compare
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 44s |
|
Build succeeded (gate pipeline). ✔️ pre-commit SUCCESS in 1m 44s |
|
Amazing, thank you! Can't wait to trying it out next week! 💯 |
|
Tested here. |
|
@lbarcziova This is awesome. podman team will be relieved to have this so they won't have to manually tag me going forward :D |
When creating issues/commenting in issue_repository, use the configured notifications.failure_comment.message in downstrem jobs. Followup of packit#2182
When creating issues/commenting in issue_repository, use the configured notifications.failure_comment.message in downstrem jobs. Followup of packit#2182
…bs (#2199) Use configured failure message as suffix in comment for downstream jobs When creating issues/commenting in issue_repository, use the configured notifications.failure_comment.message in downstrem jobs. Followup of #2182 RELEASE NOTES BEGIN You can now configure notifications.failure_comment.message also for downstream jobs, where the configured message will be used as an extension of the comment added by default by Packit. RELEASE NOTES END Reviewed-by: František Lachman <flachman@redhat.com>
If there is the failure_comment_message defined in the config, notify users via comment on failure using the configured message. Comment only once per commit SHA and job (utilising check of previous identical Packit comment).
Fixes #1911
TODO:
packit/packit.dev. (Document notifications.failure_comment.message packit.dev#735)RELEASE NOTES BEGIN
We have introduced a new configuration option
notifications.failure_comment.messagethat enables notifying users on failure via a comment using the configured message.RELEASE NOTES END