Skip to content

Conversation

@oliy
Copy link
Contributor

@oliy oliy commented Sep 4, 2024

What this PR solves / how to test

Adds new Cloudflare Pipelines commands: PIPE-27, PIPE-96, PIPE-110

Author has addressed the following

  • Tests
    • TODO (before merge)
    • Included
    • Not necessary because:
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required / Maybe required
    • Not required because:
  • Changeset (Changeset guidelines)
    • TODO (before merge)
    • Included
    • Not necessary because:
  • Public documentation

@oliy oliy requested a review from a team as a code owner September 4, 2024 04:57
@changeset-bot
Copy link

changeset-bot bot commented Sep 4, 2024

🦋 Changeset detected

Latest commit: ea586a2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
wrangler Minor
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

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

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 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/10728139021/npm-package-wrangler-6629

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

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

Or you can use npx with this latest build directly:

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

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.20240821.1
workerd 1.20240821.1 1.20240821.1
workerd --version 1.20240821.1 2024-08-21

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

@oliy oliy force-pushed the pipelines branch 3 times, most recently from d41f5f7 to 944728f Compare September 5, 2024 02:57
@lrapoport-cf lrapoport-cf added the caretaking Priority for caretaking label Sep 5, 2024
@andyjessop
Copy link
Contributor

@oliy I'm seeing a fair amount of linting errors here. Can you run ESLint locally and push fixes?

const secret_access_key = sha256(serviceToken.value);

// wait for token to settle/propagate
await sleep(3000);
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of waiting here, let's find another way to assert that the token has propagated. Can we poll an endpoint to confirm?

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 agree this isn't ideal, but the alternative seemed rougher. The confirmation would require the use of the S3 API, which would be either:

  1. much more complication, since we'd have to generate a signature ourselves: https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html
  2. include a large package that implements the s3 standard, just to get endpoint verification.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To address the delay in tests, I've added a delay bypass for tests.

}

logger.log(`🌀 Creating pipeline named "${name}"`);
const pipeline = await createPipeline(accountId, pipelineConfig);
Copy link
Contributor

Choose a reason for hiding this comment

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

What should happen if this fails?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It throws an exception with the appropriate error message. Is there a better mechanism for errors? This seemed to be the common pattern among other handlers.

@andyjessop
Copy link
Contributor

Closing because this was superseded by this PR: #6649

@andyjessop andyjessop closed this Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

caretaking Priority for caretaking

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants