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: update to turbo v2 #6083

Closed
wants to merge 1 commit into from
Closed

chore: update to turbo v2 #6083

wants to merge 1 commit into from

Conversation

threepointone
Copy link
Contributor

@threepointone threepointone commented Jun 19, 2024

Updates to turbo v2.

Author has addressed the following

  • Tests
    • TODO (before merge)
    • Included
    • Not necessary because: no functional changes
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required / Maybe required
    • Not required because: already covered
  • Changeset (Changeset guidelines)
    • TODO (before merge)
    • Included
    • Not necessary because: no functional change
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Not necessary because: chore

@threepointone threepointone requested review from a team as code owners June 19, 2024 07:19
Copy link

changeset-bot bot commented Jun 19, 2024

⚠️ No Changeset found

Latest commit: 10686b5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Jun 19, 2024

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9583693363/npm-package-wrangler-6083

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6083/npm-package-wrangler-6083

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9583693363/npm-package-wrangler-6083 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9583693363/npm-package-create-cloudflare-6083 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9583693363/npm-package-cloudflare-kv-asset-handler-6083
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9583693363/npm-package-miniflare-6083
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9583693363/npm-package-cloudflare-pages-shared-6083
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/9583693363/npm-package-cloudflare-vitest-pool-workers-6083

Note that these links will no longer work once the GitHub Actions artifact expires.


[email protected] includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240610.1
workerd 1.20240610.1 1.20240610.1
workerd --version 1.20240610.1 2024-06-10

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@threepointone threepointone marked this pull request as draft June 19, 2024 07:58
@threepointone threepointone force-pushed the update-turbo-v2 branch 4 times, most recently from d626d6b to bc584bb Compare June 19, 2024 08:48
@threepointone threepointone added the e2e Run e2e tests on a PR label Jun 19, 2024
@threepointone threepointone force-pushed the update-turbo-v2 branch 2 times, most recently from 1a5340f to ff2e3bb Compare June 19, 2024 09:26
@threepointone threepointone marked this pull request as ready for review June 19, 2024 09:26
"build": {
"env": ["TEST_PM", "TEST_PM_VERSION", "npm_config_user_agent", "CI"],
"env": [
"TMPDIR",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

turbo needs you to whitelist any nv vars that you'd use. We have to add these new ones so that os.tmpdir() works correctly (which depend on them)

"build": {
"inputs": ["src/**", "scripts/**", "types/**", "*.mjs", "*.js", "*.json"],
"outputs": ["dist/**", "bootstrap.js", "worker-metafiles/**"],
"env": ["CI_OS"]
"env": ["CI_OS", "NODE_EXTRA_CA_CERTS"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

without this, the miniflare test Miniflare: HTTPS fetches using browser CA certificates will fail

Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

A couple of concerns that need resolving (either by fixing or telling me I'm wrong).

Comment on lines 115 to 143
"NODE_EXTRA_CA_CERTS",
"CLOUDFLARE_ACCOUNT_ID",
"SOURCEMAPS",
"NODE_ENV",
"SPARROW_SOURCE_KEY",
"ALGOLIA_APP_ID",
"ALGOLIA_PUBLIC_KEY",
"NO_SCRIPT_SIZE_WARNING",
"CLOUDFLARE_API_TOKEN",
"CLOUDFLARE_ACCOUNT_ID",
"WRANGLER_AUTH_DOMAIN",
"PATH",
"WRANGLER_LOG",
"EXPERIMENTAL_MIDDLEWARE",
"FORMAT_WRANGLER_ERRORS",
"CF_PAGES",
"CI",
"CF_PAGES_UPLOAD_JWT",
"NO_SCRIPT_SIZE_WARNING",
"EXPERIMENTAL_MIDDLEWARE",
"NO_D1_WARNING",
"NO_HYPERDRIVE_WARNING",
"WRANGLER",
"WRANGLER_IMPORT",
"CUSTOM_BUILD_VAR",
"PWD",
"LC_ALL",
"WRANGLER_SEND_METRICS",
"https_proxy",
"HTTPS_PROXY",
"http_proxy",
"HTTP_PROXY",
"CI_OS",
"SENTRY_DSN",
"SYSTEMROOT",
Copy link
Contributor

Choose a reason for hiding this comment

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

All these feel unnecessary. If they are only in the source files then they are already covered by the build task. Here we should only be declaring the env vars that are referenced in the input files (i.e. "e2e/**").

Copy link
Contributor

Choose a reason for hiding this comment

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

Similarly for the test:ci above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If they're read dynamically, then they have to be whitelisted. I considered being more precise, but that would make this more confusing for the future. Instead, I duplicate them across tasks because it's easier to make changes in the future too (where the instruction will be "hey just add it to both"

packages/wrangler/turbo.json Show resolved Hide resolved
},
"test:ci": {
"inputs": ["test/**"],
"dependsOn": ["build"]
"dependsOn": ["build"],
"env": ["CI_OS", "NODE_EXTRA_CA_CERTS"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Necessary? This should be covered by the build task?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the test runner reads it dynamically, and it has to be whitelisted here for it to be added to the environment

Comment on lines 5 to 7
"build": {
"outputs": ["dist/**"]
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Does overriding this here also override the dependsOn field at the top level?
Do we need to include that?
I see that this package depends upon the eslint and tsconfig packages, so we need those deps marked in turbo so that we don't fail to rebuild this package when those change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thin kI can just remove this one, I can't recollect why I put it here at all.

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess it improves the upstream tasks that rely upon this task?

@penalosa
Copy link
Contributor

penalosa commented Nov 5, 2024

Apologies, completely missed this PR, and did this separately in #7076

@penalosa penalosa closed this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Run e2e tests on a PR
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants