Hi, since few days our CI automation which relies on gitlab.com events hook and API calls is experiencing issues with the merge_requests endpoint.
As soon as a MR is created, we receive an event from gitlab.com then our automation query the API to get more details about the MR via the api/v4/projects/<:repo:>/merge_requests/<:id:>. Then the automation expects to find the diff_refs object with relevant data.
However since few days the diff_refs attribute is reported as None by the python JSON decoder.
{ā¦, ālatest_build_finished_atā: None, āfirst_deployed_to_production_atā: None, āpipelineā: None, āhead_pipelineā: None, ādiff_refsā: None, āmerge_errorā: None, āfirst_contributionā: False, āuserā: {ācan_mergeā: True}}
We discovered that adding some delay after we received the āmerge requested created eventā (few seconds) then the diff_refs becomes an object with the expected base_sha, head_sha and start_sha attributes.
So my questions are:
- did any changes happen on gitlab.com that added or increased the delay for the diff_refs attribute to be available and correctly set ?
- should we expect a delay and update our automation to keep retry fetching the MR details via the API until the diff_refs attribute is available ?
Thanks for your help
Fabien