Skip to content

[DISCUSSION]: move dagger core to dagger call -c - #8135

Closed
helderco wants to merge 1 commit into
dagger:mainfrom
helderco:cli-core-funcs-with-flag
Closed

helderco wants to merge 1 commit into
dagger:mainfrom
helderco:cli-core-funcs-with-flag

Conversation

@helderco

@helderco helderco commented Aug 9, 2024 •

Copy link
Copy Markdown
Contributor

This changes the way you call core functions in the CLI (currently dagger core <function>):

  • dagger call -c <function> → Core function
  • dagger call -m <module> <function> → Module function

Why?

TL;DR: Consistency.

This relates to:

In that issue there was a lot of discussion on the DX to call core functions from the CLI. In the end, we were left with three main options:

The first option had a few advantages:

  • Slightly shorter to type
  • Stepping stone to the third option (future possibility)
  • Was ready to merge (after going through a refactor to support multiple top-level commands that behave like dagger call)

However, it has the disadvantage that it can feel inconsistent with dagger call. As I mentioned in #7310 (comment), it’s very easy to preserve the refactor that simplified the code, while changing back to using a flag (--core).

So we still get the stepping stone (implementation wise) to dagger container, thus the only advantage at this time of keeping dagger core is being slightly shorter to type, at the cost of feeling inconsistent with dagger call.

Next

Since I’m going away on PTO, I leave this alternative implementation so the team has a little more time to consider the DX before the next release, without blocking the feature (which is already merged).

Feel free to close or merge this change.

\cc @samalba @shykes @aluzzardi @jedevc

@helderco
helderco requested a review from a team as a code owner August 9, 2024 15:24
@helderco helderco added this to the v0.12.5 milestone Aug 9, 2024
@jedevc

jedevc commented Aug 12, 2024

Copy link
Copy Markdown
Contributor

Personally, I prefer this option over dagger core, so has my LGTM 👍

FYI, given we're aiming to release early this week, it would good to try and get some consensus as soon as feasible 🎉 Ofc, if there's more things to debate/discuss, we can delay the release.

@jedevc jedevc modified the milestones: v0.12.5, next, v0.12.6 Aug 12, 2024
@jedevc jedevc removed this from the v0.12.6 milestone Aug 20, 2024
@gerhard

gerhard commented Aug 30, 2024

Copy link
Copy Markdown
Contributor

From a consistency perspective, I also like the idea of dagger call -c when it comes to calling core functions.

With the upcoming 0.13.0 release, I think that we should either:

  • Close this
  • Merge this and aim to release in 0.13.0

Any thoughts @dagger/maintainers ?

@jedevc jedevc added this to the v0.13.0 milestone Aug 30, 2024
@shykes

shykes commented Aug 30, 2024

Copy link
Copy Markdown
Contributor

we already had a whole debate and got to (weak) consensus on dagger core. Let's give that a chance and close this.

@jedevc jedevc added area/cli All about go code on dagger CLI kind/breaking Breaking Change labels Aug 30, 2024
@helderco helderco closed this Aug 30, 2024
gerhard added a commit that referenced this pull request Sep 9, 2024
…8348)

* breaking(helm): Remove appVersion - this is now the chart version

Now that the chart version moves in lock-step with the app version, we
want to remove the app version so that we minimize the change for
incompatibilities, as was the case in
#8301.

The options are:
A. You want a custom app image. You need to ensure that the chart is
compatible with this image.
B. You use the default image. We are responsible for ensuring compatibility
with the chart.

The third option is to use this YAML as inspiration, and manage your own
raw manifests, which give you full control & responsibility.

Fixes #8301

Signed-off-by: Gerhard Lazu <[email protected]>

* Make the different values stand out more and be easier to configure

Also added bunch of extra comments & fixed a link.

Signed-off-by: Gerhard Lazu <[email protected]>

* Lower the readiness timeout seconds to be less than the interval

If we are checking readiness every 15 seconds, we should timeout after
14 seconds at most.

Signed-off-by: Gerhard Lazu <[email protected]>

* Use dagger core version

Now that we have settled #8135,
let's use it.

Signed-off-by: Gerhard Lazu <[email protected]>

* ci: remove appVersion from Helm.setVersion

Signed-off-by: Justin Chadwell <[email protected]>

* Clarify `engine.image.ref` setting & responsibility

Signed-off-by: Gerhard Lazu <[email protected]>

* Bump the golangci-lint timeout to 10m

Our linting needs more than 5m.

Signed-off-by: Gerhard Lazu <[email protected]>

---------

Signed-off-by: Gerhard Lazu <[email protected]>
Signed-off-by: Justin Chadwell <[email protected]>
Co-authored-by: Justin Chadwell <[email protected]>
@helderco
helderco deleted the cli-core-funcs-with-flag branch September 12, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli All about go code on dagger CLI kind/breaking Breaking Change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants