cirruslabs / cirrus-ci-agent

Agent to execute Cirrus CI tasks
Mozilla Public License 2.0
13 stars 6 forks source link

Failed collect CIRRUS_ENV subsystem results #208

Closed probonopd closed 2 years ago

probonopd commented 2 years ago

Getting the error Failed collect CIRRUS_ENV subsystem results, possibly coming from

https://github.com/cirruslabs/cirrus-ci-agent/blob/5937b3e26191005aeb966faa2f66a26f05cf186d/internal/executor/executor.go#L460

Build log: https://cirrus-ci.com/task/6738285727842304?logs=Build#L4873-L4873

This is the last change I made in the repository: https://github.com/helloSystem/LinuxRuntime/commit/b36b71279e9be669d899c945066d98d9bc543cf0

Earlier builds of the same repository did not have this error. Any hints appreciated. Thanks!

edigaryev commented 2 years ago

Hello, thanks for reporting this!

Earlier builds of the same repository did not have this error.

The behavior was indeed changed recently in https://github.com/cirruslabs/cirrus-ci-agent/pull/205.

Before this PR, the agent was holding the CIRRUS_ENV file open until the end of the task, which caused some issues on Windows.

Looking at your setup, it seems that a new tmpfs filesystem gets mounted on top of the existing/tmp , which results in CIRRUS_ENV file created at the beginning of the step no more available to the agent, and thus the error.

@fkorotkov we can turn this into an agent warning instead of failing the instruction, what do you think?

fkorotkov commented 2 years ago

@edigaryev I think we should just handle the missing file case. Print something in the agent logs and treat it as just empty map. In this case rm $CIRRUS_ENV will be an option to remove all the custom variables at some step.

probonopd commented 2 years ago

Thank you very much. You rock! :+1: