The artifacts download button was lost when the artifacts expire_in timeout was achieved. But artifacts can be downloaded from the page with the job log.
This is relevant to the latest artifacts only.
Steps to reproduce
Wait until the latest pipeline artifact timeout will be reached
This issue was automatically tagged with the label ~"group::continuous integration" by TanukiStan, a machine learning classification model, with a probability of 0.42.
If this label is incorrect, please tag this issue with the correct group label as well as automation:ml wrong to help me learn from my mistakes.
@AJIOB Thanks for submitting this issue; I don't see from the history that the labels reproduced on GitLab.com and ~bug were previously applied (and then lost) so I am adding those labels now. The severity/priority will be added when this issue is triaged with Engineering's input.
@cheryl.li I looked through the commit history here for the last 4 months and nothing stuck out that would have introduced a regression here...
I don't believe this is a regression but inconsistency between views. I took a look at the data the FE is getting back for an artifact that expires. The pipeline details response does not contain any artifact data in the response so we do not show the artifacts download button.
But for the job log view we use the jobs endpoint for a certain job ID and the artifact exists on the payload. So this might be some inconsistency between the endpoints. I'm going to put a backend label on this issue too until we get it in a milestone to further investigate.
Perhaps this is best resolved via another issue, but I will put it here for now until I find a better place to raise the concern:
In addition to the buttons disappearing on the UX Jobs and Pipelines views, there is another issue. Even for latest artifacts which should never expire, they will be removed from the Pages artifact storage location if Pages is enabled for that project:
If Pages is enabled for a project then any jobs (not just the pages job) that store artifacts will store them in the above link. This lets you do thinks like enable Review Apps for MRs and see the rendered Pages content before running the actual pages job against the default branch.
The artifacts are still available at this location even though the buttons are removed from the two views mentioned above:
For the most recent job that keeps artifacts around forever, I would expect its associated Pages artifacts to stay around forever too.
Note that I am not talking about the artifacts for the actual pages job itself. Those artifacts do stay around even after the job artifacts expire, as they appear to be copied to a separate space. The only way to remove them seems to be to remove the Pages content via the project's Pages settings.
@mclamb I think you'd be interested in this issue #228764. Pages artifacts should be able to be persisted for longer-term by explicitly setting long expiry period e.g expire_in: 1 year
@shinya.maeda Thanks for the link! The behavior I am seeing is that the most recent job's "direct access" artifacts are expiring even though they are supposed to persist forever or until a newer job occurs. The artifact .zip is still available to download on the job page. This is effectively the same thing that is happening with the disappearing buttons issue: The arfifacts zip archive and download button persists on the specific job page regardless of expire_in which is expected behavior. But certain things adhere to expire_in even though they should ignore it for the most recent job: the UI buttons on the Jobs page and Pipelines page, along with these "direct access"* (Pages-related) links.
I call "direct access" the artifacts made available at https://<namespace>.<pages_domain>/-/<project_path>/-/jobs/<job_number>/artifacts/public/* -- These are not exactly the Pages artifacts themselves as the pages job transfers the the public/ folder to the actual pages store, which is different from the above. However, when Pages is enable, the above artifacts become available for direct browsing. I make use of this to create Pages Review Apps for dev branches within environments. My most recent job's Review App URL contents will disappear after the expire_in time, even though I would expect it to persist.
@mclamb Thank you for the explanation. Let me clarify a couple of points.
The behavior I am seeing is that the most recent job's "direct access" artifacts are expiring even though they are supposed to persist forever or until a newer job occurs
IIRC, we haven't fixed some DB query so that expired-but-locked-artifacts are still treated as simply expired (in some places). We should handle such artifacts as non-expired artifacts i.e. showing a download link instead of hiding. cc @matteeyah
My most recent job's Review App URL contents will disappear after the expire_in time, even though I would expect it to persist.
This sounds like the artifacts-in-pages are deleted when the artifacts-in-gitlab is expired and doesn't take into account locked status. @vshushlin Do you happen to know the artifacts-in-pages deletion policy?
@shinya.maeda Yes to all of the above! And thanks for the proper terminology. Indeed artifacts-in-pages not being locked sounds like what I am talking about here.
GitLab Pages daemon doesn't persist any artifacts by itself, it just proxies gitlab artifacts using the API. Maybe API just considers this artifact expired the same way it happens with buttons?
I searched through issues and I couldn't find anything other than #217511 (closed). This was an issue specifically for fixing the UI quirks that started after implementing artifact locking.
What do you call these artifacts that I am referring to?
IIUC the only way to publish to Pages is via the pages job which has special handling in that it takes the public folder from artifacts and seems to copy it into what I am calling the "Pages store" which is at /var/opt/gitlab/gitlab-rails/shared/pages/<namespace>/<project_name_slug> on my Omnibus installation.
I can then of course view the site at https://<namespace>.<pages_domain>/<project_name_slug>
BUT, I can also view the same contents another way via https://<namespace>.<pages_domain>/-/<project_name_slug>/-/jobs/<job_number>/artifacts/public/
And the nice trick with the above URL is those artifacts are now available from any job, not just the pages job. So once the pages job has run at least once, I can then leverage the above in other jobs to do Review Apps and the like, without actually "publishing" to Pages.
And this URL is what becomes inaccessible independent of locked status. What do you call this and what is its relationship to artifacts and the Pages store?
Contributions like this are vital to help make GitLab a better product.
We would be grateful for your help in verifying whether your bug report requires further attention from the team. If you think this bug still exists, and is reproducible with the latest stable version of GitLab, please comment on this issue.
This issue has been inactive for more than 12 months now and based on the policy for inactive bugs, will be closed in 7 days.
Thanks for your contributions to make GitLab better!