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

Fix logging #1074

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Fix logging #1074

wants to merge 3 commits into from

Conversation

jsoref
Copy link

@jsoref jsoref commented Aug 11, 2023

Description:
The logging is really frustrating.

I created a run that covers 3 items (2 issues and 1 PR): https://github.com/jsoref/stale-bot-debug/actions/runs/5828506506/job/15806335430

  • Some of the code understands that humans believe that PRs are not issues and that it's better to call the ambiguous set items, but a lot of the code doesn't.
  • The overuse of quotation marks around an error made it look like it was the name of a label.
  • Clarify that an item may not yet be marked as stale even though it may be marked as stale moments later.

Related issue:
Add link to the related issue.

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

The issue that the stale action finds in this log excerpt *is* stale,
it just isn't marked that way yet. Saying that the issue isn't stale
is misleading and contradictory.

https://github.com/jsoref/stale-bot-debug/actions/runs/5828506506/job/15806335430#step:2:97

::group::[actions#2] Issue actions#2
[actions#2] Issue actions#2
  [actions#2] Found this issue last updated at: 2023-08-09T14:33:12Z
...
  [actions#2] This issue is not stale
...
  [actions#2] This issue should be stale based on the last update date the 09-08-2023 (2023-08-09T14:33:12Z)
  [actions#2] This issue should be marked as stale based on the option days-before-issue-stale (​https://github.com/actions/stale#days-before-issue-stale​) (1)
  [actions#2] Marking this issue as stale
https://github.com/jsoref/stale-bot-debug/actions/runs/5828506506/job/15806335430#step:2:97

::group::[actions#2] Issue actions#2
[actions#2] Issue actions#2
...
  [actions#2] Removing all the labels specified via the labels-to-remove-when-stale (​https://github.com/actions/stale#labels-to-remove-when-stale​) option.
  [actions#2] Removing the label "label-to-add-when-unstale" from this issue...
  Error: [actions#2] Error when removing the label: "Label does not exist"

The quotes on this last line make it look like the action was trying to
remove a label named `Label does not exist`.

This change removes the quotes to make it clear that the text is just an
error message (which is implied by the `:`) as opposed to the name of a
label, which is the reading one gets from the inclusion of additional
quotes around the text.
https://github.com/jsoref/stale-bot-debug/actions/runs/5828506506/job/15806335430#step:2:56

Processing the batch of issues  actions#1  containing  3  issues...
::group::[actions#3] Pull request actions#3
[actions#3] Pull request actions#3
...
::group::[actions#2] Issue actions#2
[actions#2] Issue actions#2
...
::group::[actions#1] Issue actions#1
[actions#1] Issue actions#1
...
Batch  actions#1  processed.
No more issues found to process. Exiting...
Statistics:
Processed items: 3
├── Processed issues: 2
└── Processed PRs   : 1

Clearly this action sometimes understands that users do not view all
items as issues.

This change applies the `items` nomenclature to this initial logging.
@jsoref jsoref requested a review from a team as a code owner August 11, 2023 14:42
@dsame
Copy link
Contributor

dsame commented Aug 14, 2023

Hello @jsoref for your efforts, we are starting to review the PR

@dsame dsame self-assigned this Aug 14, 2023
@dsame dsame added the investigation The issue is under investigation label Aug 14, 2023
@dsame dsame removed their assignment Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigation The issue is under investigation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants