Extended Jobs don't override CI/CD values

Hey all, am I missing something about variables set in extended jobs? I’m trying to reuse a job but change some of the variables, but if the original variables are defined in CI/CD then they don’t get replaced. I’ve recreated the issue in this project, it should be set to public deploy_dr (#2594443421) · Jobs · myarbrou / cicd-test · GitLab

Steps to reproduce:

In a project under Settings > CI/CD > Variables add a new value named MIKES_TEST_VALUE with the value !!! I should NOT see this value echoed in the dr job !!!

Create a gitlab-ci.yaml with the contents


deploy_prod:
  rules:
    - when: never
  script:
    - echo $MIKES_TEST_VALUE
    - echo $SECOND_TEST_VALUE

deploy_dr:
  rules:
    - when: always
  extends: deploy_prod
  variables:
    MIKES_TEST_VALUE: 'The correct DR value'
    SECOND_TEST_VALUE: 'The correct second DR value'

Observe the job that gets created called deploy_dr which prints the incorrect value in the log
The expected result being that the exteded job should override MIKES_TEST_VALUE with the value The correct DR value

Actually I see the precedence is that job variables are overridden by project variables

I see that I can override those variables by running a pipeline manually, but is there a way to have a job replace the project level variables automatically?