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

Remove constellation commands #4545

Merged

Conversation

G4brym
Copy link
Member

@G4brym G4brym commented Dec 4, 2023

Fixes AI-384

What this PR solves / how to test:
Removes all constellation commands and references to constellation, to test this, just call wrangler constellation and you should see a deprecated message

Author has addressed the following:

  • Tests
    • Included
    • Not necessary because: just removes deprecated commands
  • Changeset (Changeset guidelines)
    • Included
    • Not necessary because:
  • Associated docs
    • Issue(s)/PR(s):
    • Not necessary because: docs have already been removed

Note for PR author:

We want to celebrate and highlight awesome PR review! If you think this PR received a particularly high-caliber review, please assign it the label highlight pr review so future reviewers can take inspiration and learn from it.

@G4brym G4brym requested review from a team as code owners December 4, 2023 15:40
Copy link

changeset-bot bot commented Dec 4, 2023

🦋 Changeset detected

Latest commit: c40ea53

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

Copy link
Contributor

github-actions bot commented Dec 4, 2023

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/10093248010/npm-package-wrangler-4545

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

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

Or you can use npx with this latest build directly:

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

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.20240718.0
workerd 1.20240718.0 1.20240718.0
workerd --version 1.20240718.0 2024-07-18

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

@G4brym G4brym force-pushed the remove-constellation-commands branch from f98775e to 0fdba44 Compare December 4, 2023 15:48
@mrbbot
Copy link
Contributor

mrbbot commented Dec 4, 2023

Hey! 👋 To confirm, do the constellation commands still function at all today? Or will they error? Were constellation commands previously considered beta/experimental? Just want to make sure this isn't a semver major change. It may be better to "hide" the commands for the time being rather than removing them outright.

@celso
Copy link
Contributor

celso commented Dec 5, 2023

Hey! 👋 To confirm, do the constellation commands still function at all today? Or will they error? Were constellation commands previously considered beta/experimental? Just want to make sure this isn't a semver major change. It may be better to "hide" the commands for the time being rather than removing them outright.

constellation never left beta and was superseded by Workers AI. We checked the current usage and it's residual, I think we can safely deprecate the old command with the suggested warning.

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (a6a4e8a) 75.16% compared to head (8614d5c) 74.95%.
Report is 46 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4545       /-   ##
==========================================
- Coverage   75.16%   74.95%   -0.21%     
==========================================
  Files         242      232      -10     
  Lines       13014    12766     -248     
  Branches     3346     3317      -29     
==========================================
- Hits         9782     9569     -213     
  Misses       3232     3197      -35     
Files Coverage Δ
...ler/src/api/pages/create-worker-bundle-contents.ts 100.00% <ø> (ø)
packages/wrangler/src/api/startDevWorker/types.ts 100.00% <ø> (ø)
packages/wrangler/src/config/index.ts 91.41% <ø> ( 1.59%) ⬆️
packages/wrangler/src/config/validation.ts 90.15% <ø> ( 0.05%) ⬆️
packages/wrangler/src/deploy/deploy.ts 90.00% <ø> (ø)
...src/deployment-bundle/create-worker-upload-form.ts 90.51% <ø> ( 0.58%) ⬆️
packages/wrangler/src/dev.tsx 82.07% <ø> ( 0.25%) ⬆️
...ages/wrangler/src/environment-variables/factory.ts 71.42% <ø> (ø)
packages/wrangler/src/index.ts 89.00% <100.00%> (-0.04%) ⬇️
packages/wrangler/src/secret/index.ts 83.95% <ø> (ø)
... and 3 more

... and 7 files with indirect coverage changes

"wrangler": minor
---

Remove constellation commands
Copy link
Contributor

Choose a reason for hiding this comment

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

You're probably going to want to make this changeset more verbose, as it'll be displayed here: https://developers.cloudflare.com/changelog/?product=wrangler

Like maybe:

Remove wrangler constellation commands in favour of wrangler ai commands.

@G4brym G4brym force-pushed the remove-constellation-commands branch from 3ffb50c to 8614d5c Compare December 19, 2023 17:07
@penalosa penalosa added the breaking change Change that will result in breaking existing behavior label Jan 11, 2024
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.

I'll check with the team but I think we should land this outside a major bump.

@@ -0,0 1,5 @@
---
"wrangler": major
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"wrangler": major
"wrangler": minor

"wrangler": major
---

Remove constellation commands and binding, please migrate to Workers AI, learn more here https://developers.cloudflare.com/workers-ai/.
Copy link
Contributor

@petebacondarwin petebacondarwin Jul 10, 2024

Choose a reason for hiding this comment

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

Suggested change
Remove constellation commands and binding, please migrate to Workers AI, learn more here https://developers.cloudflare.com/workers-ai/.
Remove experimental/beta constellation commands and binding, please migrate to Workers AI, learn more here https://developers.cloudflare.com/workers-ai/.
This is not deemed a major version bump for Wrangler since these commands were never generally available.

@petebacondarwin petebacondarwin self-assigned this Jul 10, 2024
@petebacondarwin
Copy link
Contributor

Sadly this needs a significant and non-trivial rebase 😢

@G4brym
Copy link
Member Author

G4brym commented Jul 10, 2024

I will do the rebase next week and ping you back 😁

@petebacondarwin petebacondarwin removed the breaking change Change that will result in breaking existing behavior label Jul 10, 2024
@Cherry
Copy link
Contributor

Cherry commented Jul 10, 2024

Removal of any commands should always be a semver-major in my opinion. Beta/alpha designation aside, this is just good practice, and semver hygiene.

The commands are already deprecated, so what harm are they doing remaining there until the next major? As a user, I'd be concerned about what other deprecated things might end up removed in a minor release that I still use.

In addition, there's zero problems in my opinion releasing a semver major just for this, if the removal has to happen. Not every major version needs to be accompanied with a giant blog post, and multi-year migration guide that some folks will just never get to. Normalising majors that do simple things like bumping the minimum node version, or removing deprecated commands is not a bad thing, and very common in the JS ecosystem. The vast majority of folks will be able to upgrade immediately with no impacting changes, and that's only a good thing.

@petebacondarwin
Copy link
Contributor

Thanks for your point of view @Cherry. I appreciate when you challenge our decisions.
We discussed this and we are comfortable that in this case the constellation stuff is fine to be removed without a major version bump. As mentioned earlier by the product owner:

constellation never left beta and was superseded by Workers AI. We checked the current usage and it's residual, I think we can safely deprecate the old command with the suggested warning.

Any user that still tries to run those commands will be given a clear message to use Workers AI.

@Cherry
Copy link
Contributor

Cherry commented Jul 10, 2024

Thanks @petebacondarwin. I disagree with the assessment, but I appreciate the insight.

I think it would probably be a good idea to more specifically define wrangler's approach to semver, experimental changes, and alpha/beta products in https://github.com/cloudflare/workers-sdk/blob/main/CONTRIBUTING.md#types-of-changes or similar. It's not really clear how this works or how semver is followed, with some commands/features introduced behind clear --experimental flags, and others not, or when/how these could have breaking changes, or be removed.

@petebacondarwin petebacondarwin self-requested a review July 15, 2024 17:50
@G4brym G4brym force-pushed the remove-constellation-commands branch 2 times, most recently from d8e2002 to fa7720a Compare July 25, 2024 11:16
@G4brym G4brym force-pushed the remove-constellation-commands branch from fa7720a to c40ea53 Compare July 25, 2024 11:25
@G4brym
Copy link
Member Author

G4brym commented Jul 25, 2024

Hey @petebacondarwin rebase done
Feel free to merge if everything is correct

@petebacondarwin petebacondarwin merged commit e5afae0 into cloudflare:main Jul 25, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants