Skip to content

Redundant information on job responses #42

@juanpablo-santos

Description

@juanpablo-santos

Hi,

currently a generic-webhook trigger invocation returns too much information, as it contains the response of all jobs, whether they're "triggered or not" by the generic webhook. Those "not triggered" jobs include the resolved variables, which doesn't add anything, as they haven't been used because the job hasn't been triggered.

Furthermore, for a given invocation, the resolved variables are always the same for all the pinged jobs, so they could be extracted to their own variable on GenericWebHookRequestReceiver, and returned only once.

Also, as of 1.22 onwards, because of the actual json/xml being contributed as a resolved variable, it also means that the resolved variables content is returned twice, for each job, first one consisting of the sum of each "json/xml leaf" variable, and the other one because of the contributed variable (although I suppose we can manually remove the contributed variable on the pipeline from the triggered jobs).

Why is this a problem? We're using gitea's webhooks to trigger some jobs on jenkins and because all of this, we're beginning to have some webhook responses which are more than 65K characters, which is the maximum allowed by the column which stores the webhook response, so Gitea doesn't store the response, doesn't swallow the unexpected error and doesn't update their appropiate tbale's row, so the webhook remains as not sent, so, on the next webhook call, the webhook is called again, and again, etc. This has become more pressing when we updated to latest version of the plugin, which doubled the output's response.

I understand we've most probably hit a bug on the gitea side, but it would be nice to be able to control the amount of information returned by the generic-webhook-trigger-plugin, or at least to have not returning duplicated info. I can prepare a PR for the latter if needed, as I'm not really sure how to the former could be accomplished..

br,
juan pablo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions