[COMPASS-7313] [Remove Platform Specific] Remove direct usage of Stats type from compass-aggregations Created: 09/Oct/23  Updated: 07/Nov/23  Resolved: 19/Oct/23

Status: Closed
Project: Compass
Component/s: None
Affects Version/s: None
Fix Version/s: 1.41.0

Type: Task Priority: Major - P3
Reporter: Anna Henningsen Assignee: Anna Henningsen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by COMPASS-7361 [Remove Platform Specific] Remove har... Closed
Epic Link: COMPASS-7020
Story Points: 2
Documentation Changes: Not Needed
Sprint: Iteration Minmi

 Comments   
Comment by Githook User [ 23/Oct/23 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: chore(compass-user-data): refactor filesystem stats handling COMPASS-7313 (#5000)

  • Export `Stats` as a custom type, rather than relying on the Node.js `fs`
    module’s `Stats` type. While this means duplicating code, it also
    ensures that our interface for `UserData` is something that could be
    implemented without reliance on a Node.js environment.
  • Refactor the `UserData` class to avoid separate code paths for reading
    file contents with and without stats, to reduce code duplication.
  • Adjust tests that expect exceptions to fail if no exception was thrown
    (rather than only fail if the wrong one was thrown), and adjust one
    error message test to also run fine on Node.js 20.
    Branch: COMPASS-7292-run-ai-accuracy-tests
    https://github.com/mongodb-js/compass/commit/f8620f34f1875af09ffe0d57459be7117140902e
Comment by Githook User [ 23/Oct/23 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: chore(compass-user-data): refactor filesystem stats handling COMPASS-7313 (#5000)

  • Export `Stats` as a custom type, rather than relying on the Node.js `fs`
    module’s `Stats` type. While this means duplicating code, it also
    ensures that our interface for `UserData` is something that could be
    implemented without reliance on a Node.js environment.
  • Refactor the `UserData` class to avoid separate code paths for reading
    file contents with and without stats, to reduce code duplication.
  • Adjust tests that expect exceptions to fail if no exception was thrown
    (rather than only fail if the wrong one was thrown), and adjust one
    error message test to also run fine on Node.js 20.
    Branch: COMPASS-7308
    https://github.com/mongodb-js/compass/commit/f8620f34f1875af09ffe0d57459be7117140902e
Comment by Githook User [ 23/Oct/23 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: chore(compass-user-data): refactor filesystem stats handling COMPASS-7313 (#5000)

  • Export `Stats` as a custom type, rather than relying on the Node.js `fs`
    module’s `Stats` type. While this means duplicating code, it also
    ensures that our interface for `UserData` is something that could be
    implemented without reliance on a Node.js environment.
  • Refactor the `UserData` class to avoid separate code paths for reading
    file contents with and without stats, to reduce code duplication.
  • Adjust tests that expect exceptions to fail if no exception was thrown
    (rather than only fail if the wrong one was thrown), and adjust one
    error message test to also run fine on Node.js 20.
    Branch: wizard
    https://github.com/mongodb-js/compass/commit/f8620f34f1875af09ffe0d57459be7117140902e
Comment by Githook User [ 23/Oct/23 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: chore(compass-user-data): refactor filesystem stats handling COMPASS-7313 (#5000)

  • Export `Stats` as a custom type, rather than relying on the Node.js `fs`
    module’s `Stats` type. While this means duplicating code, it also
    ensures that our interface for `UserData` is something that could be
    implemented without reliance on a Node.js environment.
  • Refactor the `UserData` class to avoid separate code paths for reading
    file contents with and without stats, to reduce code duplication.
  • Adjust tests that expect exceptions to fail if no exception was thrown
    (rather than only fail if the wrong one was thrown), and adjust one
    error message test to also run fine on Node.js 20.
    Branch: beta-releases
    https://github.com/mongodb-js/compass/commit/f8620f34f1875af09ffe0d57459be7117140902e
Comment by Githook User [ 20/Oct/23 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: chore(compass-user-data): refactor filesystem stats handling COMPASS-7313 (#5000)

  • Export `Stats` as a custom type, rather than relying on the Node.js `fs`
    module’s `Stats` type. While this means duplicating code, it also
    ensures that our interface for `UserData` is something that could be
    implemented without reliance on a Node.js environment.
  • Refactor the `UserData` class to avoid separate code paths for reading
    file contents with and without stats, to reduce code duplication.
  • Adjust tests that expect exceptions to fail if no exception was thrown
    (rather than only fail if the wrong one was thrown), and adjust one
    error message test to also run fine on Node.js 20.
    Branch: bulk-update-modal
    https://github.com/mongodb-js/compass/commit/f8620f34f1875af09ffe0d57459be7117140902e
Comment by Githook User [ 19/Oct/23 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna.henningsen@mongodb.com', 'username': 'addaleax'}

Message: chore(compass-user-data): refactor filesystem stats handling COMPASS-7313 (#5000)

  • Export `Stats` as a custom type, rather than relying on the Node.js `fs`
    module’s `Stats` type. While this means duplicating code, it also
    ensures that our interface for `UserData` is something that could be
    implemented without reliance on a Node.js environment.
  • Refactor the `UserData` class to avoid separate code paths for reading
    file contents with and without stats, to reduce code duplication.
  • Adjust tests that expect exceptions to fail if no exception was thrown
    (rather than only fail if the wrong one was thrown), and adjust one
    error message test to also run fine on Node.js 20.
    Branch: main
    https://github.com/mongodb-js/compass/commit/f8620f34f1875af09ffe0d57459be7117140902e
Comment by Githook User [ 17/Oct/23 ]

Author:

{'name': 'Anna Henningsen', 'email': 'anna@addaleax.net', 'username': 'addaleax'}

Message: chore(compass-user-data): refactor filesystem stats handling COMPASS-7313

  • Export `Stats` as a custom type, rather than relying on the Node.js `fs`
    module’s `Stats` type. While this means duplicating code, it also
    ensures that our interface for `UserData` is something that could be
    implemented without reliance on a Node.js environment.
  • Refactor the `UserData` class to avoid separate code paths for reading
    file contents with and without stats, to reduce code duplication.
  • Adjust tests that expect exceptions to fail if no exception was thrown
    (rather than only fail if the wrong one was thrown), and adjust one
    error message test to also run fine on Node.js 20.
    Branch: 7313-dev
    https://github.com/mongodb-js/compass/commit/a0cc6ebc99de8526d90fff61ff8c9b3550323518
Generated at Wed Feb 07 22:46:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.