Skip to content

Fix CI project include error when a project is invalid

Furkan Ayhan requested to merge 406813-fa-fix-ci-project-include-bug into master

What does this MR do and why?

This MR fixes the CI project-include error defined in #406813 (closed) which was introduced by !114279 (merged).

In this MR, we will

  • return nil for can_access_local_content and sha if project is nil
  • force-load the project when calculating the batch key

These changes are still behind the FF ci_batch_project_includes_context (#392746 (comment 1367065552)).

Screenshots or screen recordings

include:
  - project: root/project-a
    file: .gitlab-ci.yml
  - project: invalid/project
    file: xyz.yml

build:
  script: exit 0

Before this MR:

Screenshot_2023-04-25_at_20.09.30

After this MR:

Screenshot_2023-04-25_at_20.10.32

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Furkan Ayhan

Merge request reports