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

Studio should pin prisma dependencies to avoid problems during prisma patch releases. #766

Closed
Jolg42 opened this issue Aug 24, 2021 · 7 comments
Labels
kind/tech A technical change. team/developer-productivity Issue for team Developer Productivity. tech/typescript Issue for tech TypeScript.
Milestone

Comments

@Jolg42
Copy link
Member

Jolg42 commented Aug 24, 2021

During the prisma/prisma 2.29.1 patch release we randomly found out that we needed to override Studio's dependency because they are not pinned.
prisma/prisma@88a9abe

We could totally have miss that if there was no breaking change introduced on a more recent dev version when we did the release.

It seems that Studio was pinning the versions before and stopped after 2.27.0
https://github.com/prisma/studio-code/commit/1b5dd7a8073401fbf55086a5c66b43fd4bc89233#diff-34be044c758fdb7c9dced6a2c56893d0ead78ae7b40869576f02d120e9ff0456

Is there a specific reason that needed us to unpin?

Happy to send a PR.

@Jolg42 Jolg42 added tech/typescript Issue for tech TypeScript. process/candidate Candidate for next Milestone. kind/tech A technical change. team/developer-productivity Issue for team Developer Productivity. labels Aug 24, 2021
@millsp
Copy link
Member

millsp commented Aug 30, 2021

Ran into this today while doing a patch release of 2.30.2 but studio depends on dev:

@prisma/studio-server 0.422.0
├─┬ @prisma/sdk 2.31.0-dev.19
 ├─┬ @prisma/debug 2.31.0-dev.19
  ├─┬ @types/debug 4.1.7
   └── @types/ms 0.7.31
  ├─┬ debug 4.3.2
   └── ms 2.1.2
  └── ms 2.1.3
 ├─┬ @prisma/engine-core 2.31.0-dev.19
  ├─┬ @prisma/debug 2.31.0-dev.19
   ├─┬ @types/debug 4.1.7
    └── @types/ms 0.7.31
   ├─┬ debug 4.3.2
    └── ms 2.1.2
   └── ms 2.1.3
  ├── @prisma/engines 2.31.0-11.c6aa2685dff09984e6656f5d99a90b9e90eabbce
  ├─┬ @prisma/generator-helper 2.31.0-dev.19
   ├─┬ @prisma/debug 2.31.0-dev.19
    ├─┬ @types/debug 4.1.7
     └── @types/ms 0.7.31
    ├─┬ debug 4.3.2
...
 ├─┬ @prisma/generator-helper 2.31.0-dev.19
  ├─┬ @prisma/debug 2.31.0-dev.19
   ├─┬ @types/debug 4.1.7
    └── @types/ms 0.7.31
   ├─┬ debug 4.3.2
    └── ms 2.1.2
   └── ms 2.1.3
  ├─┬ @types/cross-spawn 6.0.2
   └── @types/node 14.17.6
  ├─┬ chalk 4.1.2
...
├─┬ @prisma/studio-pcw 0.422.0
 ├─┬ @prisma/sdk 2.31.0-dev.19 peer
  ├─┬ @prisma/debug 2.31.0-dev.19
   ├─┬ @types/debug 4.1.7
    └── @types/ms 0.7.31
   ├─┬ debug 4.3.2
    └── ms 2.1.2
   └── ms 2.1.3
  ├─┬ @prisma/engine-core 2.31.0-dev.19
   ├─┬ @prisma/debug 2.31.0-dev.19
    ├─┬ @types/debug 4.1.7
     └── @types/ms 0.7.31
    ├─┬ debug 4.3.2
     └── ms 2.1.2
    └── ms 2.1.3
   ├── @prisma/engines 2.31.0-11.c6aa2685dff09984e6656f5d99a90b9e90eabbce
   ├─┬ @prisma/generator-helper 2.31.0-dev.19
    ├─┬ @prisma/debug 2.31.0-dev.19
     ├─┬ @types/debug 4.1.7
      └── @types/ms 0.7.31
...
  ├─┬ @prisma/generator-helper 2.31.0-dev.19
   ├─┬ @prisma/debug 2.31.0-dev.19
    ├─┬ @types/debug 4.1.7
     └── @types/ms 0.7.31
    ├─┬ debug 4.3.2
     └── ms 2.1.2
    └── ms 2.1.3
...

@martzoukos
Copy link
Contributor

Check with @madebysid on Monday about the reasons for unpinning the deps, before proceeding with any changes.

@sdnts
Copy link
Contributor

sdnts commented Sep 6, 2021

I've never pinned the Prisma deps in Studio. I keep it on dev so that if breaking changes happen, they get caught during development (although there hasn't been a lot of development in Studio for a while). I think you'll find lots of commits like the one you linked.
The way I usually manage versions is that I use devs normally, but when I want to do an Electron app release, I pin them to the latest Prisma version, release the Electron app, and then move back to dev. I do this so that the Electron app always ships with a stable Prisma version, but I can use devs during development.
I did it initially because our DMMF used to change a lot and breaking changes to Studio were caught really late in the week (sometimes after release). Given that development on Studio has stalled and that there aren't a lot of breaking changes in the DMMF these days, I can pin these things back to the latest Prisma versions if this is causing headaches for you.

This is done now!

@Jolg42
Copy link
Member Author

Jolg42 commented Sep 7, 2021

Sid

I just marked the SDK as a peerDependency, and now tha bundling seems to be failing: https://github.com/prisma/prisma/pull/9133/checks?check_run_id=3523811411
Do I have to do something else in the CLI as well @joël?
This is the PR BTW: prisma/prisma#9133

I tried an esbuild plugin but it failed
prisma/prisma#9139

@Jolg42 Jolg42 added this to the 2.31.0 / 3.0.x milestone Sep 7, 2021
@Jolg42
Copy link
Member Author

Jolg42 commented Sep 7, 2021

So this is not done for this release, Prisma CLI with this latest Studio breaks and was reverted, we can look at it later

Thread at https://prisma-company.slack.com/archives/CC8F34ALF/p1630350532018100

@janpio janpio modified the milestones: 2.31.0 / 3.0.x, 3.1.0 Sep 7, 2021
@sdnts
Copy link
Contributor

sdnts commented Sep 21, 2021

I guess we can close this now?
All Prisma dependencies in Studio are peerDependencies. For local development, I have them added as devDependencies, and they're pinned to stable (although that shouldn't matter)

@Jolg42
Copy link
Member Author

Jolg42 commented Sep 22, 2021

@Jolg42 Jolg42 closed this as completed Sep 22, 2021
@Jolg42 Jolg42 removed the process/candidate Candidate for next Milestone. label Sep 22, 2021
@Jolg42 Jolg42 modified the milestones: 3.1.0, 3.2.0 Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/tech A technical change. team/developer-productivity Issue for team Developer Productivity. tech/typescript Issue for tech TypeScript.
Projects
None yet
Development

No branches or pull requests

5 participants