Skip to content

chore: remove deprecated properties for v0.13.0 - #8281

Merged
jedevc merged 7 commits into
dagger:mainfrom
jedevc:remove-deprecated-for-v0.13.0
Sep 5, 2024
Merged

jedevc merged 7 commits into
dagger:mainfrom
jedevc:remove-deprecated-for-v0.13.0

Conversation

@jedevc

@jedevc jedevc commented Aug 30, 2024

Copy link
Copy Markdown
Contributor

Makes the API changes specified in #8065.

@jedevc jedevc added this to the v0.13.0 milestone Aug 30, 2024
@jedevc
jedevc requested review from a team as code owners August 30, 2024 14:52
@jedevc
jedevc force-pushed the remove-deprecated-for-v0.13.0 branch from 646e6a3 to 9a62516 Compare August 30, 2024 14:59
@jedevc jedevc added area/engine/api needs/changelog Pull requests that require a changelog entry labels Aug 30, 2024
@jedevc
jedevc force-pushed the remove-deprecated-for-v0.13.0 branch from 9a62516 to 498e9b0 Compare September 3, 2024 14:34

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

LGTM, just some minor comments.

Comment thread core/schema/container.go
`If empty, the container's default command is used.`).
ArgDoc("useEntrypoint",
`If the container has an entrypoint, prepend it to the args.`).
ArgRemove("skipEntrypoint").

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.

What does this do since the 3 withExec views re-define all their fields?

@jedevc jedevc Sep 4, 2024 •

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 is a shorthand for removing this as a parameter - without this, you'd have to redefine the entire args struct, and have a new fun to take this.

Ideally, we'd have even more shorthands for common operations - since redeclaring all the common fields over and over is quite annoying.

If you don't explicitly remove it, then there's no documentation for it, the parameter still exists.

Comment on lines +149 to +150
// We use this in tests to do quick-and-easy checks against the schemas served
// (without needing to do fancy module manipulation).

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 core/modfunc.go
Comment on lines 379 to 380
props[prefix+"git_symbolic"] = git.Symbolic()
props[prefix+"git_clone_url"] = git.CloneURL // todo(guillaume): remove as deprecated
props[prefix+"git_clone_url"] = git.CloneRef // todo(guillaume): remove as deprecated
props[prefix+"git_clone_ref"] = git.CloneRef

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 used for analytics? When can we delete it (according to the node, @grouville)?

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.

Comment thread core/integration/legacy_test.go Resolved
Comment thread core/schema/container.go
Comment on lines 710 to 716
func (s *containerSchema) withExec(ctx context.Context, parent *core.Container, args containerExecArgs) (*core.Container, error) {
if args.ContainerExecOpts.SkipEntrypoint != nil {
if args.SkipEntrypoint != nil {
slog.Warn("The 'skipEntrypoint' argument is deprecated. Use 'useEntrypoint' instead.")
if !args.ContainerExecOpts.UseEntrypoint && !*args.ContainerExecOpts.SkipEntrypoint {
if !args.ContainerExecOpts.UseEntrypoint && !*args.SkipEntrypoint {
args.ContainerExecOpts.UseEntrypoint = true
}
}

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 interesting. So this function serves both v0.12 and v0.13, it's just that in v0.13 SkipEntrypoint is always nil, right?

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.

Yup, exactly 🎉 I'd like to do some more cleanup around here, I think some of the changes to multiple schema versions are hard to track, but it works for now 🎉

Comment thread core/schema/module.go Resolved
@helderco

helderco commented Sep 4, 2024

Copy link
Copy Markdown
Contributor

There's a PHP test using pipeline. Could either be replaced by another API call or removed, depending on what it's really testing. Haven't looked at it.

@jedevc
jedevc force-pushed the remove-deprecated-for-v0.13.0 branch from 498e9b0 to 76d2d0b Compare September 4, 2024 12:50
@jedevc
jedevc requested a review from a team as a code owner September 4, 2024 12:50
@jedevc
jedevc force-pushed the remove-deprecated-for-v0.13.0 branch from 76d2d0b to 18150ab Compare September 4, 2024 12:51
Signed-off-by: Justin Chadwell <[email protected]>
@jedevc
jedevc force-pushed the remove-deprecated-for-v0.13.0 branch from 18150ab to 3528125 Compare September 4, 2024 12:53
Signed-off-by: Justin Chadwell <[email protected]>
Signed-off-by: Justin Chadwell <[email protected]>
Signed-off-by: Justin Chadwell <[email protected]>
@jedevc

jedevc commented Sep 5, 2024

Copy link
Copy Markdown
Contributor Author

Bringing this change in, since the suggested changes have been made now ❤️

@jedevc
jedevc merged commit be158d1 into dagger:main Sep 5, 2024
@jedevc
jedevc deleted the remove-deprecated-for-v0.13.0 branch September 5, 2024 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/engine/api needs/changelog Pull requests that require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants