Skip to content

feat: check version compatibility - #5315

Merged
helderco merged 21 commits into
dagger:mainfrom
TomChv:feat/version-capabilities
Aug 2, 2023
Merged

helderco merged 21 commits into
dagger:mainfrom
TomChv:feat/version-capabilities

Conversation

@TomChv

@TomChv TomChv commented Jun 15, 2023

Copy link
Copy Markdown
Member

Add checkVersionCompatibility endpoint.
Generate new clients.

Fixes DAG-1801

@TomChv TomChv added the area/engine About dagger core engine label Jun 15, 2023
@TomChv
TomChv requested review from sipsma and vito June 15, 2023 08:40
@TomChv TomChv self-assigned this Jun 15, 2023
@TomChv
TomChv force-pushed the feat/version-capabilities branch from 4752d89 to 69ae455 Compare June 16, 2023 17:28
@gerhard

gerhard commented Jun 27, 2023

Copy link
Copy Markdown
Contributor

We were talking about this with @mircubed today. How is it coming along?

@TomChv

TomChv commented Jun 28, 2023 •

Copy link
Copy Markdown
Member Author

I'm working on the Tyscript entrypoint #5305 for now, I will catch up this one later.
To finish it we need to complete the warning display which require some changes in Progrock to handle warning

@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@gerhard

gerhard commented Jul 14, 2023

Copy link
Copy Markdown
Contributor

It would be great to get this merged before the next release, the one following v0.6.3.

@vito

vito commented Jul 14, 2023

Copy link
Copy Markdown
Contributor

I can add warning support to Progrock; it'll be a good way to dogfood Zenith

@vito

vito commented Jul 14, 2023

Copy link
Copy Markdown
Contributor

@gerhard

gerhard commented Jul 18, 2023

Copy link
Copy Markdown
Contributor

Hey @TomChv, how is this coming along? We would love to get this into v0.6.4 which is due this week.

@TomChv
TomChv force-pushed the feat/version-capabilities branch from 69ae455 to 0619d4c Compare July 19, 2023 16:20
@TomChv

TomChv commented Jul 19, 2023

Copy link
Copy Markdown
Member Author

Hey @TomChv, how is this coming along? We would love to get this into v0.6.4 which is due this week.

The progrock package is still not up to date on Dagger, when will we update go dependencies? I can also do it manually on this PR if that's okay

@vito

vito commented Jul 19, 2023

Copy link
Copy Markdown
Contributor

@TomChv Go ahead and bump as-needed; there's no further routine to it. :)

go get github.com/vito/progrock@latest

@TomChv
TomChv force-pushed the feat/version-capabilities branch from 0619d4c to 201ad83 Compare July 21, 2023 11:09
@TomChv

TomChv commented Jul 21, 2023

Copy link
Copy Markdown
Member Author

@vito You did an amazing work, here's an example of the print

dagger run go run ./test.go 
█ [14.4s] go run ./test.go
┃ hello world                                                                                                                                                                         
┣─╮ 
│ ▽ from alpine
│ █ [7.45s] resolve image config for docker.io/library/alpine:latest
│ █ [0.08s] pull docker.io/library/alpine:latest
│ ┣ [0.01s] resolve docker.io/library/alpine@sha256:82d1e9d7ed48a7523bdebc18cf6290bdb97b82302a8a9c27d4fe885949ea94d1
│ ┣ [5.86s] ██████████████████████ sha256:8c6d1654570f041603f4cef49c320c8f6f3e401324913009d92a19132cbf1ac0
│ ┣ [0.08s] extracting sha256:8c6d1654570f041603f4cef49c320c8f6f3e401324913009d92a19132cbf1ac0
│ ┣─╮ pull docker.io/library/alpine:latest
│ ┻ │ 
█◀──╯ [0.39s] exec echo hello world
┃     hello world                                                                                                                                                                     
┻     
WARNING: Using Engine in devel version, skip version compatibility check.                                                                                                             
• Engine: fdcbbccdd7c8
• Duration: 14.352s

@gerhard @jpadams I thought a long time about it and I think it's not a good idea for now to abort the session if versions mismatch.

As @gerhard said, we still have a lot of users who's using old engine version, I think it can be really annoying for them to fail.
I think showing a warning is enough until we clearly define a strategy to keep users updating dagger release by release.

I've left a bunch of TODO so we can easily add a failure logic the day we are ready for.

@TomChv
TomChv marked this pull request as ready for review July 21, 2023 11:19
@TomChv

TomChv commented Jul 21, 2023

Copy link
Copy Markdown
Member Author

The error in lint-daggerized (https://github.com/dagger/dagger/actions/runs/5621760600/job/15233134907?pr=5315#step:4:646) does not make sens, I have push changes in the graphQL schema and all SDK clients has been updated...

It acts like it is not using the right source code?

I can reproduce the error locally too:

dagger do -p ci ci:sdk:go:lint --repo https://github.com/dagger/dagger --branch refs/pull/5315/merge 
[17.0s] ERROR dagger do -p ci ci:sdk:go:lint --repo https://github.com/dagger/dagger --branch refs/pull/5315/merge
Loading+installing project...                                                                                                                                                         
Running command "ci:sdk:go:lint"...                                                                                                                                                   
Error: failed to get resolver output file: process "/entrypoint" did not complete successfully: exit code: 1                                                                          
[0.50s] ERROR exec /entrypoint
input:1: Cannot query field "checkVersionCompatibility" on type "Query".                                                                                                              
                                                                                                                                                                                      
Please visit https://dagger.io/help#go for troubleshooting guidance.                                                                                                                  
Please visit https://dagger.io/help#go for troubleshooting guidance.                                                                                                                  
WARNING: Using Engine in development version, skip version compatibility check. 

And I'm really confused, we have a warning which mean a call to checkVersionCompatibility has been made but the one inside serveCommands is failing.

client, err := Connect(ctx, WithLogOutput(os.Stderr))

Which should not be possible? They should have the same engine and SDK version?

@TomChv
TomChv force-pushed the feat/version-capabilities branch from 8a6742f to d9fe1ea Compare July 21, 2023 13:34
@vito

vito commented Jul 21, 2023

Copy link
Copy Markdown
Contributor

@TomChv That's definitely strange and I don't quite understand it either - not sure at which point the checkVersionCompatibility API would "disappear" after being obviously used on the outside.

That's an experimental check though so feel free to ignore it. I've also had it fail on some of my own PRs that add new backend infra.

@TomChv

TomChv commented Jul 21, 2023

Copy link
Copy Markdown
Member Author

@vito As we discussed, I updated the code to only print a warning instead of throwing an error!

@gerhard
gerhard requested a review from helderco July 26, 2023 14:47

@vito vito left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry for the wait! Left some wording suggestions and small tweaks. 🙏

Comment thread core/schema/query.go Resolved
Comment thread core/schema/query.go Resolved
Comment thread core/schema/query.go Resolved
Comment thread core/schema/query.go Resolved
Comment thread core/schema/query.go Resolved
Comment thread sdk/go/client.go Resolved
Comment thread sdk/nodejs/connect.ts Resolved
@TomChv
TomChv force-pushed the feat/version-capabilities branch from 2bd6846 to 0943399 Compare July 27, 2023 15:00
@TomChv
TomChv requested a review from vito July 27, 2023 16:01
@TomChv
TomChv force-pushed the feat/version-capabilities branch from 0943399 to efbc2b1 Compare July 28, 2023 09:08
TomChv and others added 19 commits August 1, 2023 15:07
Signed-off-by: Vasek - Tom C <[email protected]>
Signed-off-by: Vasek - Tom C <[email protected]>
Signed-off-by: Vasek - Tom C <[email protected]>
Signed-off-by: Vasek - Tom C <[email protected]>
Co-authored-by: Alex Suraci <[email protected]>
Signed-off-by: Vasek - Tom C <[email protected]>
Co-authored-by: Alex Suraci <[email protected]>
Signed-off-by: Vasek - Tom C <[email protected]>
Co-authored-by: Helder Correia <[email protected]>
Signed-off-by: Vasek - Tom C <[email protected]>
Co-authored-by: Helder Correia <[email protected]>
Signed-off-by: Vasek - Tom C <[email protected]>
Co-authored-by: Helder Correia <[email protected]>
Signed-off-by: Vasek - Tom C <[email protected]>
Co-authored-by: Helder Correia <[email protected]>
Signed-off-by: Vasek - Tom C <[email protected]>
Co-authored-by: Helder Correia <[email protected]>
Signed-off-by: Vasek - Tom C <[email protected]>
Signed-off-by: Vasek - Tom C <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
@helderco
helderco force-pushed the feat/version-capabilities branch from f7ca1b9 to 27f2b80 Compare August 1, 2023 15:07
Signed-off-by: Helder Correia <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/engine About dagger core engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants