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

core:archive exits with 1 when only warnings occur #18596

Open
ghost opened this issue Jan 10, 2022 · 4 comments
Open

core:archive exits with 1 when only warnings occur #18596

ghost opened this issue Jan 10, 2022 · 4 comments
Labels
Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced.

Comments

@ghost
Copy link

ghost commented Jan 10, 2022

Warnings during runs of core:archive will always cause it to exit with an exit code of 1, even if the task didn't encounter any errors:

Error: error or warning logs detected, exit 1

This behavior is not helpful and IMO unexpected. *nix programs usually only return a non-zero return code when the operation requested by the user failed entirely. core:archive's current behavior makes it unreasonably complicated to decide whether it failed or not; a script that reports errors to an administrator by mail would have to parse core:archive's output to make that decision.

It would be very helpful if this behavior was either removed entirely, or if it could be disabled with a flag.

@ghost ghost added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Jan 10, 2022
@justinvelluppillai justinvelluppillai added this to the For Prioritization milestone Nov 14, 2022
@tfunq
Copy link

tfunq commented Jan 2, 2023

I would really like to have this fixed. Any estimate on when it might be fixed?

@aleho
Copy link

aleho commented Nov 18, 2024

Doesn't --ignore-warn work to disable that behavior?

@phaitc
Copy link

phaitc commented Dec 26, 2024

@aleho I don't see that flag being available in this doc?

@aleho
Copy link

aleho commented Dec 28, 2024

From the Docker container:

/var/www/html# ./console core:archive --help       
Description:
  Runs the CLI archiver. It is an important tool for general maintenance and to keep Piwik very fast.

Usage:
  core:archive [options]

Options:
     […]
      --ignore-warn                                                        Return 0 exit code even if there are warning logs or error logs detected in the command output.

It's a bit chaotic, because, according to the description, also ignores errors. 🤷🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced.
Projects
None yet
Development

No branches or pull requests

4 participants