Conversation
| TEST_BBCLOUD_REPO: https://bitbucket.org/iterative-ai/cml-qa-tests-dummy | ||
| TEST_BBCLOUD_SHA: b511535a89f76d3d311b1c15e3e712b15c0b94e3 | ||
| TEST_BBCLOUD_ISSUE: 1 | ||
| TEST_BITBUCKET_TOKEN: ${{ secrets.TEST_BITBUCKET_TOKEN }} |
There was a problem hiding this comment.
Rename nonsensical variables, for the sake of beauty
There was a problem hiding this comment.
Move all the logger setup code to a separate file, so it can be invoked properly before each test, avoiding tons of messages like this clogging the console output:
console.error
[winston] Attempt to write logs with no transports, which can increase memory usage: {"message":"POST /repos/iterative/cml_qa_tests_dummy/actions/runners/registration-token - 201 in 209ms","level":"info"}
at DerivedLogger._transform (node_modules/winston/lib/winston/logger.js:302:15)
at DerivedLogger.Object.<anonymous>.Transform._read (node_modules/winston/node_modules/readable-stream/lib/_stream_transform.js:177:10)
at DerivedLogger.Object.<anonymous>.Transform._write (node_modules/winston/node_modules/readable-stream/lib/_stream_transform.js:164:83)
at doWrite (node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:409:139)
at writeOrBuffer (node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:398:5)
at DerivedLogger.Object.<anonymous>.Writable.write (node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:307:11)
at DerivedLogger.<computed> [as info] (node_modules/winston/lib/winston/create-logger.js:81:14)
at Object.exports.<computed> [as info] (node_modules/winston/lib/winston.js:110:68)
| if (typeof jest !== 'undefined') { | ||
| setupLogger({ log: 'debug', silent: true }); | ||
| } |
There was a problem hiding this comment.
Disable logger output when running jest tests, to avoid spamming developers.
| if (runnersToken === null) { | ||
| if (!body) body = new URLSearchParams(); | ||
| body.append('project_id', id); | ||
| body.append('runner_type', 'project_type'); | ||
| return (await this.request({ endpoint, method: 'POST', body })).token; | ||
| } |
There was a problem hiding this comment.
GitLab decided to change the way of registering runners, breaking the old approach; now we support both for good measure, and "infer [sic] which to use automatically" like in the good ol' CML times. 🙃
https://docs.gitlab.com/ee/ci/runners/new_creation_workflow.html
| if (new Date() > new Date('2024-01-01')) { | ||
| logger.error('TensorBoard.dev has been shut down as of January 1, 2024'); | ||
| return; | ||
| } |
There was a problem hiding this comment.
TensorBoard.dev has been shut down as of January 1, 2024; yes, they don't exist anymore, rendering this command pointless (and untestable). Still, leaving the dead code for the sake of good memories.
|
Pointless to ask for reviews on this; at 3:25 on the early morning Mr. Hyde feels like using BDFL powers. |
| test('cml send-comment to current repo', async () => { | ||
| const report = `## Test Comment`; | ||
|
|
||
| await fs.writeFile(path, report); | ||
| await exec('node', './bin/cml.js', 'send-comment', path); | ||
| }); | ||
|
|
||
| test('cml send-comment --publish to current repo', async () => { | ||
| const report = `## Test Comment\n`; | ||
|
|
||
| await fs.writeFile(path, report); | ||
| await exec('node', './bin/cml.js', 'send-comment', '--publish', path); | ||
| }); |
There was a problem hiding this comment.
I'll miss this spam on every single CML pull request. 😸
Miscellaneous changes needed to push a new CML release