Artifacts in child pipelines are never expired and always marked as latest
Summary
When using artifact expiration with the setting "Never expire artifacts from last successful job" this does not apply to child pipelines correctly. Child Pipelines are never evaluated in the context of the parent pipeline and thus their artifacts are always the latest and never expire
Steps to reproduce
- Create a .gitlab-ci.yml file that has a job that triggers a child pipeline. That child pipeline must create an artifact
- Trigger the pipeline twice
- Check the output of the child pipeline, especially the artifact section. It should say:
Job artifacts
These artifacts are the latest. They will not be deleted (even if expired) until newer artifacts are available.
- No matter how many jobs are triggered each child pipeline will display this
What is the current bug behavior?
All child pipeline artifacts are considered the latest. None are ever expired.
What is the expected correct behavior?
Child pipelines follow their parent pipelines in the sense that they are the latest only if their parent pipeline is the latest