Skip to content

Propagate platform to all marshals. - #3226

Merged
sipsma merged 1 commit into
dagger:cloakfrom
sipsma:platform-marshal
Oct 4, 2022
Merged

sipsma merged 1 commit into
dagger:cloakfrom
sipsma:platform-marshal

Conversation

@sipsma

@sipsma sipsma commented Oct 4, 2022

Copy link
Copy Markdown
Contributor

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

Should fix the problems when running from macos.

Opened an issue for automating that: #3225

But for now verified by running directly from macos.

This will also be a little bit of setup for integration the multiplatform PR w/ the new API, so no throwaway here hopefully.

@vito the rebase w/ your PRs will be painful sadly. I had one important comment on your PR (here), but let's try to merge that first then I'll do the rebase on this one if possible.

@netlify

netlify Bot commented Oct 4, 2022 •

Copy link
Copy Markdown

👷 Deploy request for cloak-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit d651082

@sipsma

sipsma commented Oct 4, 2022 •

Copy link
Copy Markdown
Contributor Author

Also @vito the linter scolded me for having too many return args from Container.Decode(), specifically when I had to ignore most of them in some calls (this linter called dogsled).

So the second commit just has Container.Decode return the whole payload object. This slightly deviates it from the pattern established elsewhere, let me know if you think that's worth re-figuring out.

EDIT: I just remembered that you already dealt with the same issue in the other PR. So I'll just rebase on top of that one once it's merged, nevermind

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

Thanks for fixing this! The changes look great.

Looking forward to multi-platform support being merged, I'm guessing its tests would have caught this. (It's also just, like, cool.)

Comment thread core/container.go
}

dirSt, dirRel, err := source.Decode()
dirSt, dirRel, dirPlatform, err := source.Decode()

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.

Good thing we had the return value budget for this. 😂

Comment thread core/container.go
}

func (s *containerSchema) exec(ctx *router.Context, parent *Container, args containerExecArgs) (*Container, error) {
return parent.Exec(ctx, s.gw, s.platform, args.Args, args.Opts)

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.

I like that this went away, it felt a little odd that this was the only thing that needed it. (Turns out...)

@sipsma

sipsma commented Oct 4, 2022

Copy link
Copy Markdown
Contributor Author

Looking forward to multi-platform support being merged, I'm guessing its tests would have caught this. (It's also just, like, cool.)

Yeah we gotta settle on which approach to take (discussion) and at this point it's probably worth just rebasing it entirely on the new API since the old one's expiration date is approaching fast. Fortunately this PR is a little bit of a layup for all that.

@sipsma
sipsma merged commit 009c430 into dagger:cloak Oct 4, 2022
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.

2 participants