Skip to content

Add engine release instructions. - #3749

Merged
sipsma merged 2 commits into
dagger:mainfrom
sipsma:engine-release
Nov 9, 2022
Merged

sipsma merged 2 commits into
dagger:mainfrom
sipsma:engine-release

Conversation

@sipsma

@sipsma sipsma commented Nov 9, 2022

Copy link
Copy Markdown
Contributor

Signed-off-by: Erik Sipsma [email protected]

There are a few parts of the instructions I'd like to automate ASAP (before official release ideally), will comment on them. Just writing out the instructions as is for now.

Comment thread RELEASING.md Outdated

@sipsma sipsma Nov 9, 2022 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think this is automatable. Can have the code look at the current git branch and use that to set the tag. Will need to add some sort of confirmation dialog too. I think that slight extra bit of complication would be worth it to get this more automated, but let me know if you disagree

EDIT: currently working on automating this in an even simpler way that just presumes for now it is only ever meant to be run in CI and thus avoids all that complication (can later add a way of pushing this to other registries for testing on the side if needed).

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.

Yes, that is exactly what @aluzzardi mentioned earlier today - mage sdk:python:engine:bump - so we are all on the same page.

Comment thread RELEASING.md Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This should be fairly easy to automate as a mage step (the reason it isn't already is because we run tests dagger-in-dagger, which is great but skips the provisioning code paths)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Though automating it on MacOS is not going to happen before the next release, so that will still be manual

Comment thread RELEASING.md Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Would like to automate this part, but not sure how straightforward it is when we don't rely on dagger-in-dagger. Will give it a shot, but like the Go SDK, will be at least partially manual on MacOS for now.

@sipsma

sipsma commented Nov 9, 2022

Copy link
Copy Markdown
Contributor Author

Also, I want to do a double check of the instructions by running through them all manually (not actually pushing any tags) before merging this. But let me know what feedback there is in the meantime

Comment thread RELEASING.md Outdated
Comment on lines 3 to 5

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.

This is super important. I thought that multiple engines with different versions are supported. Great to know this!

cc @aluzzardi @marcosnils

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, more context in this comment and the one right above it: #3647 (comment)

tl;dr it's a simple solution for now, we can find ways of improving it in the near future (at the cost of some extra complexity)

Comment thread RELEASING.md Outdated

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.

💯

Comment thread RELEASING.md Outdated

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.

This is my favourite image ref format too: <version>@sha256:<digest>

I propose that we default to this whenever possible.

Comment thread internal/mage/engine.go Outdated

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.

Is it possible to check when logs are flushed? If yes, I would check periodically and fail on timeout. Sleeps like this one get worse the longer they are kept around.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll double check quickly, but I think the answer is no, being able to check that will require a lot more changes to our logging related code (which should happen, just will take time0

Comment thread internal/mage/engine.go Resolved

@gerhard gerhard 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.

Optimistic approval so that we can get a subset of this in (if possible).

How does this all look to you @aluzzardi?

@sipsma

sipsma commented Nov 9, 2022

Copy link
Copy Markdown
Contributor Author

Optimistic approval so that we can get a subset of this in (if possible).

Thanks @gerhard, I just pushed an extra commit with the first batch of automation (engine:publish runs in GHA on new engine tags now). If there's extra concerns introduced by this I'm happy to remove that commit from this PR, merge this as is and send out a separate one for the new automation, just figured it would be easier to consolidate while waiting for more eyes on this PR.

Comment thread .github/workflows/publish-engine.yml Resolved
@sipsma

This comment was marked as outdated.

@sipsma
sipsma force-pushed the engine-release branch 3 times, most recently from a850436 to 3b074ca Compare November 9, 2022 20:22

@aluzzardi aluzzardi 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.

(for later)

How about we move engine refs to a generated file per SDK, for example:

sdk/go/engine_ref.gen.go
sdk/python/dagger/engine_ref.gen.py

Then we can bump them programmatically, every time we release an engine:

mage sdk:all:bump <engine version>
[open PR]

Comment thread .github/workflows/publish-engine.yml Resolved
@sipsma

sipsma commented Nov 9, 2022 •

Copy link
Copy Markdown
Contributor Author

Did a test run of the github workflow by pushing to the dagger repo with a temporary tag, everything worked as expected there, so probably as good of verification we'll get before merging.

After merging this I'll make follow up issues for:

  • More automated provisioning testing for each SDK as a release blocker (including MacOS)
  • Automating SDK engine dep bumps as suggested by @aluzzardi here: Add engine release instructions. #3749 (review)
  • Doing something better than the sleep currently used to prevent interleaving the final image sha w/ buildkit logs

Comment thread .github/workflows/publish-engine.yml Resolved
@sipsma sipsma mentioned this pull request Nov 9, 2022
@sipsma
sipsma merged commit 15a8972 into dagger:main Nov 9, 2022
@gerhard

gerhard commented Nov 10, 2022

Copy link
Copy Markdown
Contributor

It was great to see this come together so quickly - amazing! 🏎 🏎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants