Skip to content

Commit

Permalink
Improve timing for message commands (#110)
Browse files Browse the repository at this point in the history
* fix: Don't assume that video providers will respond within 3 seconds

* chore: Clarify header of `/test` results

* fix: Abort certain `fetch` requests after some time

* fix: Reduce API calls to handle message commands

* fix: Update vulnerable dependency

* chore: v2.0.4

* feat: Report test coverage in PRs

* fix(tests): Improved timeout resistance of tests

* fix(tests): Report test coverage in the correct place

* fix(tests): Don't try to run unit tests a second time to generate coverage

* fix(tests): Defer unit tests to `jest-coverage-report-action`

* fix(tests): Point to the existing coverage report file

* fix(tests): Longer timeout for Pony.fm tests

* fix(tests): Avoid re-running unit tests

* fix(tests): Trying again by deferring the test run to `jest-coverage-report-action`

* fix(tests): Don't run tests twice

* fix(tests): Point at the default coverage report

* fix(tests): Don't reinstall dependencies on test

* fix(timeout): Increase default timeout to 50 seconds

* docs: Update reported default timmeout

* fix(tests): Update `actions/checkout` package

* fix(tests): Attempt to diagnose eternally-running tests in Node 18

* chore: Remove useless comments

* fix(fetch): Don't depend on Node 18's `fetch` implementation yet

* fix(tests): Improved `leaked-handles` imports

* feat: Reduce number of database hits when opening the queue

* chore: Update changelog

* chore: Skip Pony.fm tests for now, while they 500
  • Loading branch information
AverageHelper authored Feb 8, 2023
1 parent 1520fcd commit 3b3169d
Show file tree
Hide file tree
Showing 65 changed files with 444 additions and 161 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: npm run test:src
- name: Run npm run test:src
uses: ArtiomTr/jest-coverage-report-action@v2.1.1
with:
skip-step: install # we already ran `npm ci`
test-script: npm run test:src
env:
CI: true
NODE_ENV: "test"
Expand All @@ -32,7 +36,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js 16.10.x (earliest version supported)
uses: actions/setup-node@v1
with:
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-exact=true
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHANGELOG.md
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.4] - 2023-02-08
### Changed
- Clarified the header to the results from `/test`.
- Reduced processing time for message commands by reducing the cases in which we fetch message data from Discord.
- Time-out HTTP requests after 50 seconds.
- More resilience to slow responses from media providers.
- Reduced the number of round-trip database calls when opening the queue.

## [2.0.3] - 2022-10-29
### Changed
- More thorough logging, especially around song request messages. This should help us debug some timing issues.
Expand Down Expand Up @@ -388,6 +396,7 @@ After updating, be sure to run `npm ci && npm run build:clean && npm run migrate
### Added
- Initial commit

[2.0.4]: https://github.com/AverageHelper/Gamgee/compare/v2.0.3...v2.0.4
[2.0.3]: https://github.com/AverageHelper/Gamgee/compare/v2.0.2...v2.0.3
[2.0.2]: https://github.com/AverageHelper/Gamgee/compare/v2.0.1...v2.0.2
[2.0.1]: https://github.com/AverageHelper/Gamgee/compare/v2.0.0...v2.0.1
Expand Down
4 changes: 0 additions & 4 deletions ormconfig.json

This file was deleted.

81 changes: 73 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gamgee",
"version": "2.0.3",
"version": "2.0.4",
"description": "A Discord bot for managing a song request queue.",
"private": true,
"scripts": {
Expand Down Expand Up @@ -98,6 +98,7 @@
"jest-environment-node": "28.1.3",
"jest-extended": "3.0.1",
"keep-a-changelog": "2.1.0",
"leaked-handles": "5.2.0",
"mocha": "10.0.0",
"nodemon": "2.0.19",
"prettier": "2.7.1",
Expand Down
Loading

0 comments on commit 3b3169d

Please sign in to comment.