Skip to content

Conversation

@nicholas-codecov
Copy link

Description

This PR adds debug logging to each provider on all the different getter functions so that we can provide a better debugging experience for users.

Notable Changes

  • Update all providers to debug log all upload params when debug is enabled

@codecov-notifications
Copy link

codecov-notifications bot commented Sep 24, 2024

Codecov Report

Attention: Patch coverage is 99.59880% with 4 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...s/bundler-plugin-core/src/utils/providers/Local.ts 92.85% 3 Missing ⚠️
...r-plugin-core/src/utils/providers/GitHubActions.ts 98.24% 1 Missing ⚠️
Components Coverage Δ
Plugin core 97.07% <99.59%> (+0.37%) ⬆️
Rollup plugin 10.81% <ø> (ø)
Vite plugin 11.02% <ø> (ø)
Webpack plugin 49.88% <ø> (ø)

📢 Thoughts on this report? Let us know!

@codecov
Copy link

codecov bot commented Sep 24, 2024

Codecov Report

Attention: Patch coverage is 99.59880% with 4 lines in your changes missing coverage. Please review.

Project coverage is 79.12%. Comparing base (7e99416) to head (8de35cb).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...s/bundler-plugin-core/src/utils/providers/Local.ts 92.85% 3 Missing ⚠️
...r-plugin-core/src/utils/providers/GitHubActions.ts 98.24% 1 Missing ⚠️
Additional details and impacted files
Components Coverage Δ
Plugin core 97.07% <99.59%> (+0.37%) ⬆️
Rollup plugin 10.81% <ø> (ø)
Vite plugin 11.02% <ø> (ø)
Webpack plugin 49.88% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@spalmurray-codecov spalmurray-codecov left a comment

Choose a reason for hiding this comment

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

Did a quick skim, seems good.

@codecov-staging
Copy link

codecov-staging bot commented Sep 24, 2024

Bundle Report

Changes will increase total bundle size by 2.6MB (365803.94%) ⬆️⚠️, exceeding the configured threshold of 5%.

Bundle name Size Change
@codecov/nextjs-webpack-plugin-cjs 2.1kB 2.1kB (100%) ⬆️⚠️
@codecov/nextjs-webpack-plugin-esm 1.11kB 1.11kB (100%) ⬆️⚠️
@codecov/vite-plugin-cjs 2.79kB 2.79kB (100%) ⬆️⚠️
@codecov/bundler-plugin-core-esm 12.29kB 12.29kB (100%) ⬆️⚠️
@codecov/remix-vite-plugin-esm 1.09kB 1.09kB (100%) ⬆️⚠️
@codecov/solidstart-plugin-cjs 1.33kB 1.33kB (100%) ⬆️⚠️
@codecov/example-rollup-app-iife 95.46kB 95.46kB (100%) ⬆️⚠️
@codecov/bundler-plugin-core-cjs 59.16kB 59.16kB (100%) ⬆️⚠️
@codecov/solidstart-plugin-esm 949 bytes 949 bytes (100%) ⬆️⚠️
@codecov/nuxt-plugin-esm 830 bytes 830 bytes (100%) ⬆️⚠️
@codecov/example-next-15-app-server-cjs 359.11kB 359.11kB (100%) ⬆️⚠️
@codecov/vite-plugin-esm 1.24kB 1.24kB (100%) ⬆️⚠️
@codecov/webpack-plugin-cjs 4.4kB 4.4kB (100%) ⬆️⚠️
@codecov/rollup-plugin-esm 2.32kB 2.32kB (100%) ⬆️⚠️
@codecov/sveltekit-plugin-cjs 1.32kB 1.32kB (100%) ⬆️⚠️
@codecov/example-next-app-server-cjs 340.72kB 340.72kB (100%) ⬆️⚠️
@codecov/sveltekit-plugin-esm 1.09kB 1.09kB (100%) ⬆️⚠️
@codecov/webpack-plugin-esm 3.36kB 3.36kB (100%) ⬆️⚠️
@codecov/bundle-analyzer-cjs 4.33kB 4.33kB (100%) ⬆️⚠️
@codecov/example-next-app-client-array-push 687.06kB 687.06kB (100%) ⬆️⚠️
@codecov/remix-vite-plugin-cjs 1.31kB 1.31kB (100%) ⬆️⚠️
@codecov/bundle-analyzer-esm 3.45kB 3.45kB (100%) ⬆️⚠️
@codecov/example-next-15-app-client-array-push 934.96kB 934.96kB (100%) ⬆️⚠️
@codecov/example-webpack-app-array-push 71.19kB 71.19kB (100%) ⬆️⚠️
@codecov/rollup-plugin-cjs 2.81kB 2.81kB (100%) ⬆️⚠️
@codecov/nuxt-plugin-cjs 1.4kB 1.4kB (100%) ⬆️⚠️

@codecov
Copy link

codecov bot commented Sep 24, 2024

Bundle Report

Changes will decrease total bundle size by 17.33kB (-0.3%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
@codecov/bundler-plugin-core-cjs 59.16kB 12.35kB (26.39%) ⬆️
@codecov/bundler-plugin-core-esm 12.29kB 29.47kB (-70.58%) ⬇️
@codecov/webpack-plugin-esm 3.36kB 6 bytes (-0.18%) ⬇️
@codecov/solidstart-plugin-esm 1.09kB 142 bytes (14.96%) ⬆️
@codecov/bundle-analyzer-esm 3.11kB 347 bytes (-10.05%) ⬇️

Copy link
Contributor

@suejung-sentry suejung-sentry left a comment

Choose a reason for hiding this comment

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

looks good to me - thanks for doing this tedious work!

uploadToken: process.env.BUNDLE_ANALYZER_UPLOAD_TOKEN,
retryCount: 3,
apiUrl: "https://api.codecov.io",
apiUrl: process.env.BUNDLE_ANALYZER_API_URL,
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, thanks for updating these! Agreed it's better to pull from env than hardcoding

const { envs } = inputs;
return envs?.BITRISE_BUILD_URL ?? null;
const buildURL = envs?.BITRISE_BUILD_URL ?? null;
debug(`Using buildURL: ${buildURL}`, { enabled: output.debug });
Copy link
Contributor

Choose a reason for hiding this comment

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

I did a little checking around if any of these buildURLs contain any ?token=abcd or sensitive info we shouldn't log - seems like we're good to go!

return envs?.APPVEYOR_JOB_ID ?? null;

const build = envs?.APPVEYOR_BUILD_ID ?? null;
debug(`Using build: ${build}`, { enabled: output.debug });
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably not needed right now but devs that are debugging may find it helpful in the future if we log the source as well (as in from args or env).

branch: _getBranch(inputs),
build: _getBuild(inputs),
buildURL: _getBuildURL(inputs),
branch: _getBranch(inputs, output),
Copy link
Contributor

@suejung-sentry suejung-sentry Sep 24, 2024

Choose a reason for hiding this comment

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

I personally found the arg name output a bit confusing since if that is passed as an arg I'd wonder if that's something passed by reference expecting to get mutated.

Fine to leave as is since the pattern is already well-established across the rest of the code, just a passing musing

@nicholas-codecov nicholas-codecov merged commit 168610b into main Nov 12, 2024
62 checks passed
@nicholas-codecov nicholas-codecov deleted the chore-add-in-debug-logs-for-all-upload-params branch November 12, 2024 17:59
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.

5 participants