Skip to content

Conversation

@MoralCode
Copy link
Contributor

This defaults to True to avoid infinite log growth unless explicitly opted in

Description
To give sysadmins more control over their instances, specifically with logging policy, this PR adds a new AUGUR_RESET_LOGS environment variable. If the variable is not set, it defaults to True (the current behavior).

Setting this variable to a value other than True (or one of a few common variations) signifies that the sysadmin is taking responsibility for managing logs, and augur should not reset or clear logs on startup.

If desired, I could also add a log message that says (in big scary letters) that log resetting is disabled and that the sysdmin is responsible for log management. Let me know if this would be preferable.

Signed commits

  • Yes, I signed my commits.

…t variable

this defaults to True to avoid infinite log growth unless explicitly opted in

Signed-off-by: Adrian Edwards <adredwar@redhat.com>
Copy link
Member

@sgoggins sgoggins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the pylint is failing because of variable scoping.

@MoralCode
Copy link
Contributor Author

I think the pylint is failing because of variable scoping.

None of that is related to the code in this PR. Could they be leftover warnings that werent fixed before #3218 got merged?

@Ulincsys
Copy link
Contributor

Ulincsys commented Jul 9, 2025

I don't think this failure has anything to do with the changes, it's just RD being RD. This is the failing line:

Raw Output:
augur/application/cli/backend.py:335:23: W0621: Redefining name 'logger' from outer scope (line 37) (redefined-outer-name)
Error: reviewdog: Too many results (annotations) in diff.
You may miss some annotations due to GitHub limitation for annotation created by logging command.
Please check GitHub Actions log console to see all results.

Limitation:
- 10 warning annotations and 10 error annotations per step
- 50 annotations per job (sum of annotations from all the steps)
- 50 annotations per run (separate from the job annotations, these annotations aren't created by users)

Basically, the task failed because too many warnings were emitted, not because an actual error occurred.

@sgoggins
Copy link
Member

I don't think this failure has anything to do with the changes, it's just RD being RD. This is the failing line:

Raw Output:
augur/application/cli/backend.py:335:23: W0621: Redefining name 'logger' from outer scope (line 37) (redefined-outer-name)
Error: reviewdog: Too many results (annotations) in diff.
You may miss some annotations due to GitHub limitation for annotation created by logging command.
Please check GitHub Actions log console to see all results.

Limitation:
- 10 warning annotations and 10 error annotations per step
- 50 annotations per job (sum of annotations from all the steps)
- 50 annotations per run (separate from the job annotations, these annotations aren't created by users)

Basically, the task failed because too many warnings were emitted, not because an actual error occurred.

But what I am seeing is a linting error, not a RTD error. @Ulincsys

@Ulincsys
Copy link
Contributor

@sgoggins my apologies for the confusion. When I used "RD", I meant reviewdog, not readthedocs.

The linter failed because of too many warnings, but not because any actual error occurred afaict

Copy link
Member

@sgoggins sgoggins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MoralCode / @Ulincsys : I am struggling to figure out if this PR is identifying an issue we need to do something about regarding all the linter feedback ... or if something else is going on. It seems like the former: This PR reveals a few new issues we need to deal with ... but Obviously I do not know.

@MoralCode
Copy link
Contributor Author

Just installed the vscode pylint extension and it seems like these lint errors exist as far back as the current release branch.

Not sure why RD chose this moment to make a fuss about them but i think it can be dealt with in a separate PR

@sgoggins sgoggins merged commit cca041d into chaoss:main Jul 11, 2025
12 of 14 checks passed
@MoralCode MoralCode deleted the reset-logs-var branch July 11, 2025 00:55
MoralCode added a commit to oss-aspen/infra-ansible that referenced this pull request Oct 25, 2025
MoralCode added a commit to oss-aspen/infra-ansible that referenced this pull request Oct 31, 2025
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

Successfully merging this pull request may close these issues.

3 participants