Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error annotations from post-run step #144

Closed
Nemo157 opened this issue May 22, 2023 · 5 comments
Closed

Error annotations from post-run step #144

Nemo157 opened this issue May 22, 2023 · 5 comments

Comments

@Nemo157
Copy link

Nemo157 commented May 22, 2023

In https://github.com/Nullus157/.github/actions/runs/5048663303 I'm seeing a bunch of error annotations:

Error: ENOENT: no such file or directory, opendir '/home/runner/.cargo/registry/index'

stepping into one of the jobs these are coming from the post-run action when it goes to clean the registry before caching, presumably because I have no dependencies so no registry data is downloaded https://github.com/Nullus157/.github/actions/runs/5048663303/jobs/9057129303#step:7:31 (this workflow is using rust-cache implicitly via actions-rust-lang/setup-rust-toolchain).

@Nemo157
Copy link
Author

Nemo157 commented May 23, 2023

Just noticed on another project there's a similar annotation on jobs that don't create target, like running cargo fmt

Error: ENOENT: no such file or directory, opendir '/home/runner/work/bs58-rs/bs58-rs/target'

@Swatinem
Copy link
Owner

There is a ton of places where we guard try/catch and log errors. I believe this is just a log, and does not interfere with the rest of the action, so you should be able to just ignore this. ofc it would be nicer to ignore that error completely

@Nemo157
Copy link
Author

Nemo157 commented May 24, 2023

Yeah, this doesn't fail the action, but it's a little more than just a log, it gets shown up at the top level of the run along with actual errors which make it harder to see why a run failed.

@rivy
Copy link

rivy commented May 29, 2023

I think that a missing directory/file while trying to clean and remove it should be a non-error. If so, adding something like

if ((e as any)?.code === "ENOENT") { continue; }

to the catch statements in the several "...Cleaning..." code sections in save.ts could clear up several of the possible error messages.

rust-cache/src/save.ts

Lines 42 to 44 in 988c164

} catch (e) {
core.error(`${(e as any).stack}`);
}

rust-cache/src/save.ts

Lines 51 to 53 in 988c164

} catch (e) {
core.error(`${(e as any).stack}`);
}

rust-cache/src/save.ts

Lines 58 to 60 in 988c164

} catch (e) {
core.error(`${(e as any).stack}`);
}

rust-cache/src/save.ts

Lines 65 to 67 in 988c164

} catch (e) {
core.error(`${(e as any).stack}`);
}

@filips123
Copy link

This also happens in my project, once in a job where only rustfmt is run so no target is generated, and once when I conditionally build the crate. I agree with others that even though it's just a log message, it's quite annoying as it's displayed on the main workflow page:

slika

Potentially, this could also make it harder to identify real problems with the build. So, I also agree that this error message should be hidden, or somehow prevented from showing up on the main page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants