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

lib.ts: adjust status logging levels #1033

Merged
merged 1 commit into from Feb 16, 2022
Merged

Conversation

hemberger
Copy link
Contributor

@hemberger hemberger commented Feb 13, 2022

GitHub reports when workflow runs log messages with notice or higher
logging levels, e.g.:

There are 0 failures, 0 warnings, and 1 notices.

Since notice was being used regardless of status, these reports were
misleading, because everything was working correctly on successes and
no-ops.

Therefore, the successes and no-ops now only log with info, and the
failures now only log with notice.

Description

Testing Instructions

Additional Notes

GitHub reports when workflow runs log messages with `notice` or higher
logging levels, e.g.:

> There are 0 failures, 0 warnings, and 1 notices.

Since `notice` was being used regardless of status, these reports were
misleading, because everything was working correctly on successes and
no-ops.

Therefore, the successes and no-ops now only log with `info`, and the
failures now only log with `notice`.
@codecov-commenter
Copy link

Codecov Report

Merging #1033 (358b916) into dev (76a601a) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1033      +/-   ##
==========================================
- Coverage   99.59%   99.58%   -0.01%     
==========================================
  Files           7        7              
  Lines         245      243       -2     
  Branches       66       64       -2     
==========================================
- Hits          244      242       -2     
  Misses          1        1              
Impacted Files Coverage Δ
src/lib.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 76a601a...358b916. Read the comment docs.

@JamesIves
Copy link
Owner

Is this style of reporting preferred? These were being marked as a notice so you could see at a glance the status of the action without it being marked as a warn or error.

@hemberger
Copy link
Contributor Author

When you say "seeing it at a glance", do you mean through the workflow annotations?
image

If it were just that, I don't think I'd have as strong a preference. However, when this workflow runs, GitHub sends me this Discord notification:
image
which suggests to me that something happened that warrants my attention (albeit at a low priority level). That's how I interpret a "notice", but obviously there is some room for interpretation here.

To me at least, it is not relevant whether the workflow succeeded because there was nothing to do or because it pushed a new commit. If I'm trying to figure out why commits aren't being pushed, I'm going to be digging into the logs either way, notice or not.

Obviously it's your call here, but I would definitely prefer not to see a notice when things are working correctly.

Thanks for all your work on this great tool!

@JamesIves
Copy link
Owner

Yep and that makes sense. Appreciate the feedback and use case. I'll push this into the next release.

@JamesIves JamesIves merged commit 642a797 into JamesIves:dev Feb 16, 2022
JamesIves added a commit that referenced this pull request Feb 16, 2022
* Update README.md

* Release 4.2.3 📣

* Bump JamesIves/github-pages-deploy-action from 4.2.2 to 4.2.3 (#1025)

* Bump @types/node from 17.0.13 to 17.0.14 (#1024)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.13 to 17.0.14.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump jest-circus from 27.4.6 to 27.5.0 (#1027)

Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 27.4.6 to 27.5.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v27.5.0/packages/jest-circus)

---
updated-dependencies:
- dependency-name: jest-circus
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump eslint-plugin-jest from 26.0.0 to 26.1.0 (#1028)

Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 26.0.0 to 26.1.0.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](jest-community/eslint-plugin-jest@v26.0.0...v26.1.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/node from 17.0.14 to 17.0.15 (#1029)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.14 to 17.0.15.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/node from 17.0.15 to 17.0.16 (#1030)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.15 to 17.0.16.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump jest-circus from 27.5.0 to 27.5.1 (#1031)

Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 27.5.0 to 27.5.1.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v27.5.1/packages/jest-circus)

---
updated-dependencies:
- dependency-name: jest-circus
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/node from 17.0.16 to 17.0.17 (#1032)

* Update README.md

* lib.ts: adjust status logging levels (#1033)

GitHub reports when workflow runs log messages with `notice` or higher
logging levels, e.g.:

> There are 0 failures, 0 warnings, and 1 notices.

Since `notice` was being used regardless of status, these reports were
misleading, because everything was working correctly on successes and
no-ops.

Therefore, the successes and no-ops now only log with `info`, and the
failures now only log with `notice`.

* Bump @types/node from 17.0.17 to 17.0.18 (#1035)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.17 to 17.0.18.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump eslint-plugin-jest from 26.1.0 to 26.1.1 (#1036)

Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 26.1.0 to 26.1.1.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](jest-community/eslint-plugin-jest@v26.1.0...v26.1.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dan Hemberger <846186+hemberger@users.noreply.github.com>
@hemberger hemberger deleted the patch-2 branch February 16, 2022 16:50
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.

None yet

3 participants