Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
0dc76a9
feat: use http agent that respects environment proxy settings when st…
NlightNFotis Dec 4, 2024
8f2cb3a
build: add undici to node_modules folder - CI fails without it
NlightNFotis Dec 4, 2024
78be2f1
ci: add configuration tto run proxy with zstd package to test streami…
NlightNFotis Dec 3, 2024
9c48c8b
ci: add capability to handle container initialisation steps to sync.py
NlightNFotis Dec 5, 2024
b4bc093
ci: remove patch file and cleanup justfile
NlightNFotis Dec 5, 2024
b706e37
chore: add changelog entry
NlightNFotis Dec 5, 2024
182c5e7
chore: reword description in CHANGELOG.md
NlightNFotis Dec 6, 2024
a89fbc8
docs: add readme for justfile/pr-checks update
NlightNFotis Dec 9, 2024
c901aee
ci: remove dns for container running proxy steps (experimental)
NlightNFotis Dec 9, 2024
3951a82
Merge branch 'main' into NlightNFotis/detect_use_proxy_when_streaming
NlightNFotis Dec 9, 2024
51e71f8
docs: add documentation for the reason why we need to have a setup st…
NlightNFotis Dec 9, 2024
4c20d4f
feat: cleanup destination directory if we fail during streaming of th…
NlightNFotis Dec 9, 2024
c6454d5
Merge branch 'main' into NlightNFotis/detect_use_proxy_when_streaming
henrymercer Dec 10, 2024
9323695
Update PR checks readme instructions
aeisenberg Dec 9, 2024
88bcf64
feat: change wording of error reporting when a failure occurs during …
NlightNFotis Dec 11, 2024
9e8cd42
fix: move changelog entry to appropriate place
NlightNFotis Dec 11, 2024
1e5b591
Merge branch 'main' into NlightNFotis/detect_use_proxy_when_streaming
NlightNFotis Dec 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: cleanup destination directory if we fail during streaming of th…
…e extraction
  • Loading branch information
NlightNFotis committed Dec 9, 2024
commit 4c20d4f58ac2e73745e8a46eb4050bdee9e92115
5 changes: 4 additions & 1 deletion lib/tools-download.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/tools-download.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/tools-download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't prefix a warning with Error.

Suggested change
core.warning(`Error: ${getErrorMessage(e)}`);
core.warning(`Warning: ${getErrorMessage(e)}`);

But, do we even need the prefix at all?

Maybe reverting this is better:

Suggested change
core.warning(`Error: ${getErrorMessage(e)}`);
core.warning(getErrorMessage(e));

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The 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();
Expand Down