Skip to content

Conversation

@alilleybrinker
Copy link
Collaborator

Did these concurrent with my work on the new authz API. The fixups are organized by-commit, so reviewing by-commit might be easier. Opted to bundle them into a single PR to make review simpler; happy to split them out if that's preferable.

The changes are:

  • Moved the pull request template file into the .github/ folder.
  • Made some code quality fixups to the 5.0 upload script.
  • Cleaned up the Markdown in the testing README.
  • Set NODE_ENV=test consistently on unit tests.
  • Removed unused dependencies and renamed the "clean" task to "depcheck" since that is what it actually does.
  • Removed duplicative npm scripts.
  • Updated testing info in the testing README to be accurate to how tests are run today.
  • Relocated the 5.0 upload script into src/scripts/
  • Documented the need to configure a replSet for MongoDB to work correctly.

Put it into the .github folder instead of the top-level folder
of the repo.

Signed-off-by: Andrew Lilley Brinker <abrinker@mitre.org>
This makes some basic Python code quality improvements
to the 5.0 upload script.

Signed-off-by: Andrew Lilley Brinker <abrinker@mitre.org>
This corrects some broken Markdown in the test README file,
and also removes some incorrect information about pre-push hooks
that don't exist.

Signed-off-by: Andrew Lilley Brinker <abrinker@mitre.org>
The `action:test` script previously did not set the `NODE_ENV`
environment variable, which caused warnings to be emitted by
winston, our logging library, indicating that it had nowhere
to send the logs it was producing. This is because the log
initialization code in cve-services checks `NODE_ENV` to figure
out how to configure the "transport" (Winston's term for a log
sink), so without `NODE_ENV` being set, the transport is never
configured.

This fix just sets the environment variable, causing the warnings
to disappear.

Signed-off-by: Andrew Lilley Brinker <abrinker@mitre.org>
@alilleybrinker alilleybrinker self-assigned this Jan 23, 2026
@alilleybrinker alilleybrinker added Chore Code refactor, cleaning etc documentation labels Jan 23, 2026
@alilleybrinker
Copy link
Collaborator Author

Looks like tests are failing due to a networking issue connecting to MITRE's artifact repository. Will have to investigate.

@alilleybrinker
Copy link
Collaborator Author

Ah, it seems MITRE's changes to NPM are breaking the build here, because package-lock.json is now resolved to use our artifact registry instead of NPM directly. I'll have to figure out how to fix this behavior, because it makes building from the public package-lock.json completely impossible.

@alilleybrinker alilleybrinker force-pushed the alilleybrinker/minor-fixups branch from e946d0c to b6f9b51 Compare January 23, 2026 17:22
Did three things:

- Ran `npm run clean` to identify unused deps. Confirmed each
  is unused manually before removing.
- For two false positives, modified the `clean` command to
  ignore them.
- Renamed the `clean` command to `depcheck`, to more accurately
  describe what it's doing.

Signed-off-by: Andrew Lilley Brinker <abrinker@mitre.org>
Several NPM scripts were duplicative of others, and have been
removed. This also reorders scripts to make sure the ordering
is more consistent.

Signed-off-by: Andrew Lilley Brinker <abrinker@mitre.org>
This info said to run a command that doesn't exist.

This also introduces a guide for running integration tests.

Signed-off-by: Andrew Lilley Brinker <abrinker@mitre.org>
Felt odd to have a script sitting in the root of the repo.
This relocates it to `src/scripts/`, which is technically odd
because it's a Python script not a JavaScript one, but this is
already a grab-bag of miscellaneous scripts that get run during
development, so I think it's fine.

Signed-off-by: Andrew Lilley Brinker <abrinker@mitre.org>
This also cleans up the Markdown formatting of the top-level
project README.md.

Signed-off-by: Andrew Lilley Brinker <abrinker@mitre.org>
@alilleybrinker alilleybrinker force-pushed the alilleybrinker/minor-fixups branch from b6f9b51 to 327469b Compare January 23, 2026 20:32
@alilleybrinker
Copy link
Collaborator Author

I figured out the right incantation to fully clear Artifactory mentions, so packages should now all pull from NPM properly.

@alilleybrinker
Copy link
Collaborator Author

Huh, for some reason the tests were hanging after an hour and a half with a MongoDB error that was not causing the test infrastructure to give up. That tells me:

  1. We should put CI timeouts in place so we don't just burn CI minutes doing nothing productive.
  2. There's an issue with how the MongoDB connection is happening (perhaps I made an error while refactoring commits?) which I ought to resolve.

@alilleybrinker
Copy link
Collaborator Author

MongoDB issue observed in prior runs appears to be transient and non-reproducible on my local device. I'm hopeful it's just a GitHub Actions issue that will disappear on a retry now that it's been about a week.

@alilleybrinker
Copy link
Collaborator Author

Nope, errors still appearing. Mongo is claiming that it's trying to use a session that's ended. Time to dive into debugging then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Chore Code refactor, cleaning etc documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants