| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This decorator enabled us to use the functionality of the Actions toolcache within the runner too. Now that we've deleted the runner we no longer need it.
|
Rebased to fix a merge conflict in one of the sourcemap files. |
Sorry, something went wrong.
There was a problem hiding this comment.
I sometimes run the runner locally in order to test out changes before pushing them. Does this PR essentially break the runner? (Even if so, it's not a reason not to merge this change, but it's just something I'd like to be aware of.
Sorry, something went wrong.
| if [ ! -z "$(git status --porcelain)" ]; then | ||
| # If we get a fail here then the PR needs attention | ||
| >&2 echo "Failed: JavaScript files are not up to date. Run 'npm run-script build' to update" | ||
| >&2 echo "Failed: JavaScript files are not up to date. Run 'rm -rf lib && npm run-script build' to update" |
There was a problem hiding this comment.
minor: We should probably just move rm -rf lib into the npm build script itself.
Sorry, something went wrong.
There was a problem hiding this comment.
Hmm, wouldn't that break incremental compilation though?
Sorry, something went wrong.
There was a problem hiding this comment.
Incremental compilation is done through tsc --watch. At least that's how I run it. tsc --build is always a full build.
Sorry, something went wrong.
There was a problem hiding this comment.
My understanding is tsc --build does some incremental stuff to speed itself up: https://www.typescriptlang.org/docs/handbook/project-references.html#build-mode-for-typescript. It's unfortunate tsc doesn't have support for deleting unneeded js/jsmap files, but I'd rather keep the distinction between a build and a clean build. Personally I chain npm run build into other commands and end up running it fairly frequently, but only delete TypeScript files rarely.
Sorry, something went wrong.
To an extent, yes. All the PR checks that involve the runner continue to work, but the runner can no longer manage its own CodeQL bundle. |
Sorry, something went wrong.
There was a problem hiding this comment.
This would also be a good time to uninstall any unused dependencies.
Are these still being used?
import * as toolrunner from "@actions/exec/lib/toolrunner";
import * as io from "@actions/io";
import * as actionsToolcache from "@actions/tool-cache";
import * as safeWhich from "@chrisgavin/safe-which";
import del from "del";
import * as semver from "semver";
import { v4 as uuidV4 } from "uuid";
If not, then let's remove them from the node_modules. I guess it can be in a future PR, but let's not forget them.
Sorry, something went wrong.
Good idea. I checked and these dependencies are all still being used. |
Sorry, something went wrong.
There was a problem hiding this comment.
Minor comment. This can be merged without making the change, especially if there is a reason for doing this that I'm not seeing.
Sorry, something went wrong.
| const finalHeaders = Object.assign( | ||
| { "User-Agent": "CodeQL Action" }, | ||
| headers | ||
| ); |
There was a problem hiding this comment.
Was this header not being set previously? Is there any reason why you are creating a new object here and not setting "User-Agent" when you initially create the headers object?
eg-
const headers: OutgoingHttpHeaders = {
accept: "application/octet-stream",
"User-Agent": "CodeQL Action"
};
Sorry, something went wrong.
There was a problem hiding this comment.
This is just existing code being moved — we can take this as an opportunity to revisit it though. Since this PR has been open for a while, I'll merge without making the change since I'd like to get a confirmation that the toolcache isn't expecting this particular user agent.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This decorator enabled us to use the functionality of the Actions toolcache within the runner too. Now that we no longer release the runner we no longer need it.
Merge / deployment checklist