Artifacts:reports:annotations property not allowed?

Replace this template with your information

I have created a release stage in my CI/CD pipeline that uploads binary build files to package registry, per this doc: Release fields | GitLab

I am now trying to have this link to the binary files be included in release evidence, using the artifacts:reports:annotations report type (GitLab CI/CD artifacts reports types | GitLab). Pipeline stage is below:

upload:
   stage: upload
   image: curlimages/curl:latest
   rules:
      - if: $CI_COMMIT_TAG
   script:
      - 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file $BUILD_ARTIFACT ${PACKAGE_REGISTRY_URL}/${CI_COMMIT_TAG}/${BUILD_ARTIFACT}' 
      # Create a json file containing the URL of the uploaded firmware, for inclusion as release evidence
      # See: https://docs.gitlab.com/ee/user/project/releases/release_evidence.html#include-report-artifacts-as-release-evidence
      - 'echo {\"build_output\":\"${PACKAGE_REGISTRY_URL}/${CI_COMMIT_TAG}/${BUILD_ARTIFACT}\"} > build_output.json'
   artifacts:
      expire_in: 1 week
      paths:
         - ./build_output.json
      reports:
         annotations: ./build_output.json

Pipeline fails with:

WARNING: Uploading artifacts as "annotations" to coordinator... POST https://gitlab.com/api/v4/jobs/5558238158/artifacts: 400 Bad Request (Validation failed: Data must be a valid json schema)  id=5558238158 responseStatus=400 Bad Request status=400 token=64_Tfx6U
WARNING: Retrying...                                context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts as "annotations" to coordinator... POST https://gitlab.com/api/v4/jobs/5558238158/artifacts: 400 Bad Request (Validation failed: Data must be a valid json schema)  id=5558238158 responseStatus=400 Bad Request status=400 token=64_Tfx6U
FATAL: invalid argument              

Pipeline editor complains about syntax with Property annotations is not allowed. Looks like this report type may not actually be available? I am using gitlab.com (GitLab Enterprise Edition 16.7.0-pre).

I am seeing the exact same issue here, but only on one of my pipeline files. I have a different template file with annotations in it that isn’t displaying the issue. I’ve even copied the entire file contents to the other project and the same content now displays the error about “annotations” being an invalid argument. I’m baffled.

I’ve found that, if I make the job hidden by starting with a “.” the validation error goes away. But if I remove the “.” and make it a regular job, the validation shows up again.