Needs: vs dependencies: [] how to avoid default artifacts uploads ?

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

I use this config for multiple jobs, by default I do not want any artifacts/cache and override it in a job when needed.

.docker-env:                       &docker-env
  image:                           some-image
  dependencies:                    []
  cache:                           {}
  before_script:
    - some script
  only:
    - master
    - web
  interruptible:                   true
  tags:
    - linux-docker

test:
  stage:                           test
  <<:                              *docker-env
  script:
    - some test

build:
  stage:                           build
  <<:                              *docker-env
  needs:
    - job:                         test
      artifacts:                   false

Now pipelines are failing and now I'm forced to remove dependencies: [].

There is needs: [], but it's not really documented and I'm not sure it does the same, does it?

Steps to reproduce

(How one can reproduce the issue - this is very important)

Example Project, What is the current bug behaviour?, Relevant logs and/or screenshots

https://gitlab.parity.io/parity/substrate/pipelines/94122

What is the expected correct behaviour?

I want a good way to avoid default downloading the artifacts by every job.

Possible fixes

I think needs: [] or

needs:
  artifacts: false

would be good ways to sort it out.

Edited by 🤖 GitLab Bot 🤖