Skip to content
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

chore: add logging to snyk code bundles for troubleshooting #700

Merged
merged 16 commits into from
Oct 17, 2024

Conversation

bastiandoetsch
Copy link
Collaborator

Description

Provide description of this PR and changes, if linked Jira ticket doesn't cover it in full.

Checklist

  • Tests added and all succeed
  • Linted
  • README.md updated, if user-facing
  • License file updated, if new 3rd-party dependency is introduced

Copy link
Contributor

@cmars cmars left a comment

Choose a reason for hiding this comment

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

The logging changes seem reasonable but there are other drive-by changes here I have some concerns about, see below.

infrastructure/code/snyk_code_http_client.go Outdated Show resolved Hide resolved
infrastructure/code/snyk_code_http_client.go Outdated Show resolved Hide resolved
Copy link
Contributor

@cmars cmars left a comment

Choose a reason for hiding this comment

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

Question about some test changes below. I'd still like to see those landed as separate commits (if not separate PRs) for better isolation & bisect-ability but I'm not going to block this any further.

@@ -53,6 +54,8 @@ func TestInit(t *testing.T) {
defer initMutex.Unlock()
t.Helper()
c := config.CurrentConfig()
// we want to isolate CLI fake installs
c.CliSettings().SetPath(filepath.Join(t.TempDir(), "fake-cli"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this (and/or the server test changes below) fix the test flakes I've seen around the CLI downloads? :excited-conan-obrien-emoji:

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I hope so - had to add it at a few places.

@bastiandoetsch bastiandoetsch merged commit 68655f0 into main Oct 17, 2024
17 checks passed
@bastiandoetsch bastiandoetsch deleted the chore/add-snyk-code-trace-logging-for-bundles branch October 17, 2024 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants