-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Respect proxy settings when streaming the download and extraction of the CodeQL bundle #2624
Changes from 6 commits
0dc76a9
8f2cb3a
78be2f1
9c48c8b
b4bc093
b706e37
182c5e7
a89fbc8
c901aee
3951a82
51e71f8
4c20d4f
c6454d5
9323695
88bcf64
9e8cd42
1e5b591
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# PR Checks | ||
|
||
This folder contains the code supporting the workflows run when a PR is created. | ||
|
||
## Update | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can simplify this. I can give some suggestions, but not quite right now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for this! I agree it looks cleaner. Will |
||
|
||
If you need to make a change to any of the PR checks, you need to perform the following | ||
steps: | ||
|
||
1. Make the change - the code for the PR checks is under the `pr-checks/checks/` folder. | ||
2. Run the `sync.py` file to produce (and sync) the final workflow files under `.github/` | ||
|
||
The second part requires some associated steps (create a virtual environment, download | ||
the dependencies for the Python script, etc), so we have automated this with the `justfile` | ||
included in this folder. | ||
|
||
### 1-step update | ||
|
||
1. Install https://github.com/casey/just by whichever way you prefer. | ||
2. Run `$ just update-pr-checks` in your terminal. | ||
|
||
If you don't wish to install `just`, you can also manually perform the steps | ||
outlined in the `justfile` under the `update-pr-checks` action. |
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -127,7 +127,11 @@ export async function downloadAndExtract( | |||||||||
core.warning( | ||||||||||
`Failed to download and extract CodeQL bundle using streaming. Falling back to downloading the bundle before extracting.`, | ||||||||||
); | ||||||||||
core.warning(getErrorMessage(e)); | ||||||||||
core.warning(`Error: ${getErrorMessage(e)}`); | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't prefix a warning with
Suggested change
But, do we even need the prefix at all? Maybe reverting this is better:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for catching this. Seeing it reported now, I agree it looks a bit silly. My rationale for changing this was that this was rendering an error that was generated in the process of unpacking as a simple warning, with no other context whatsoever, which could be confusing to a user when interpreting the runner log (example). I'm still motivated to decorate it somehow, as reverting may not satisfy this concern, but I will think about a cleaner decoration that doesn't look weird/silly. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, this is what I came up with: 88bcf64 I've reworded the warnings to flow a bit more naturally for me, and to allow me to embed the error message in an indicative but non-invasive way. Is this workable for you @aeisenberg ? Or do you have a strong preference for the previous state of affairs? |
||||||||||
|
||||||||||
// If we failed during processing, we want to clean up the destination directory | ||||||||||
// before we try again. | ||||||||||
await cleanUpGlob(dest, "CodeQL bundle", logger); | ||||||||||
} | ||||||||||
|
||||||||||
const toolsDownloadStart = performance.now(); | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this line added due to a bad merge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I will have a look.
This was reported as a conflict in the GitHub UI, but when I did a
git merge
locally, it had no problem automatically resolving the conflict. Perhaps it did a weird thing because of my.gitconfig
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot find precisely what went wrong here, as the merge log is past my terminal character limit. I remember it saying that it resolved it automatically using the
ort
method, but it apparently went wrong there.This is now fixed in 9e8cd42.
Going forward I will be more careful validating these merges went right.