| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| logger: Logger, | ||
| configFile?: string | ||
| ) { | ||
| ): Promise<boolean> { |
There was a problem hiding this comment.
Just looking at this function, it's not clear what the return value is for. Can you add @return to the jsdoc above to document it?
Sorry, something went wrong.
There was a problem hiding this comment.
Yep, this is a good point. I've expanded the documentation.
Sorry, something went wrong.
| injectedMlQueries || | ||
| (await parseQueryUses( |
There was a problem hiding this comment.
Is this right? It looks like if a previous query input injected ML queries, then we won't parse any further ones. Do we want to call parseQueryUses no matter what?
Sorry, something went wrong.
There was a problem hiding this comment.
Eek, yes you're right. We definitely don't want to short-circuiting of the || to happen here and need to call parseQueryUses regardless. I've fixed that.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Between the time when I ported the Action's code for parsing config files to the CLI and when we actually switched the Action to using the new code, the Action's code gained an interesting new effect that was not in the ported code: If the feature flag for ATM was set the Action would, while it was parsing the file, also add the ATM packs to it if they weren't already present. When we switched over to using the parsing in the CLI, this effect was lost and we stopped running ATM queries (!!).
This PR is a rather hacky fix that addresses this by recording (when the Action parses the config file - which it still does even if it later doesn't need it) whether it injected the ML queries. Then, when we pass the full config to the CLI we also augment it with the ML queries if we injected them before. It's not how I would like to do it, but there's a couple of reasons we can't do something more elegant:
This code is also missing tests, we have an internal issue tracking this. I'll manually test this for now, and before we touch this code again we should have an integration test that actually runs ATM queries, so we don't accidentally disable them again.
Merge / deployment checklist