Skip to content

How do we start publishing dagger CLI v0.3.0 pre-releases? #3176

Closed

Description

@mircubed

This went through a few iterations and we ended up with the following:

As we make progress through these, we will be replacing placeholder text with PRs. The first one is a good example of what that will look like in practice.

The above checklist is not definitive, but it's a good enough snapshot of various discussions and decisions. As we go through the items, we expect to discover new ones. It is also possible that some of the existing ones will become redundant. We will update the list as we make progress.

Last updated on Oct. 12, 2022.

Activity

  1. mircubed commented on Sep 29, 2022

    @mircubed
    ContributorAuthor

    @aluzzardi already has experience doing the last release and mentioned a few options. After talking with him today, he will decide which approach is best and notify us of the decision here.

  2. added this to the Cloak preview milestone on Sep 29, 2022
  3. mircubed commented on Sep 29, 2022

    @mircubed
    ContributorAuthor

    @vikram-dagger pinging you, so you can watch the issue too.

  4. aluzzardi commented on Sep 29, 2022

    @aluzzardi
    Contributor

    Ok so there's 2 routes. Both are technically feasible, need to clarify a couple of points before taking a decision:

    • 0.3 channel: We release a parallel 0.3.0-alphaX version that's cloak only. 0.2.x continues to be maintained/released in parallel. 0.2.x is still the default.
      • Basically the goal is to change the tooling to only consider "stable" versions by default, ignore -alpha/-beta/etc unless explicitly provided
      • @gerhard How feasible / how much work is it? Specifically
        • homebrew: Is there a way to have stable and alpha versions co-existing, with stable being the default?
          • Or do we need to resort to a different tap / formula?
        • latest_version / install.sh: We'd need to only consider stable versions for bumping latest, but still have a manual way to install a specific version
    • Feature Flag: Merge dagger-cue and cloak together in the same binary
      • Similar to what we did in 0.2.x with DAGGER_EUROPA
        • However, 0.1.x and 0.2.x shared a lot of code, 0.2.x and cloak share none
      • Example:
        • dagger do test (cue based)
        • DAGGER_CLOAK=1 dagger dev (cloak based)
      • We're going to either need cloak to import dagger-cue's "main" or the other way around, and conditionally invoke one or the other
      • Open Question: Repo organization (/cc @sipsma)
        • Since both leave on the same repo, on a different branch, with no shared code, this is non trivial
        • Solutions:
          • Fork dagger/dagger's main branch into its own repository (e.g. dagger/dagger-cue), import it from dagger/dagger (cloak codebase)
            • Is this relevant to the "CUE SDK" project? /cc @jlongtine
          • History rewriting rebase of the cloak branch so that dagger-cue and dagger-cloak codebases co-exist
            • Will break all PRs

    @vikram-dagger @slumbering Is there a docs impact, one way or the other?

  5. vikram-dagger commented on Sep 29, 2022

    @vikram-dagger
    Contributor

    Currently 0.2 docs live in the main branch and 0.3 docs live in the cloak branch with no overlap. I have an open item to discuss using Docusaurus versioning with @slumbering so both can live in the same branch and be rendered at different sub-urls under docs.dagger.io. This requires some investigation, so I'll be better able to answer the impact question after. For the preview launch, if we don't yet have a clean solution for the two sets of docs to co-exist, one solution would be to create a separate microsite only for 0.3 docs.

  6. sipsma commented on Sep 30, 2022

    @sipsma
    Contributor

    0.3 channel

    Provided this option is possible in a reasonable way, it seems like the best. I definitely see this in practice plenty often in releases on Github where they can be marked "Pre-release" and thus not override the "latest" version while still being available.

    Fork dagger/dagger's main branch into its own repository (e.g. dagger/dagger-cue), import it from dagger/dagger (cloak codebase)

    If we have to go the feature flag route, this definitely seems like the simplest option (even if it feels weird).

  7. slumbering commented on Sep 30, 2022

    @slumbering
    Contributor

    Currently 0.2 docs live in the main branch and 0.3 docs live in the cloak branch with no overlap. I have an open item to discuss using Docusaurus versioning with @slumbering so both can live in the same branch and be rendered at different sub-urls under docs.dagger.io. This requires some investigation, so I'll be better able to answer the impact question after. For the preview launch, if we don't yet have a clean solution for the two sets of docs to co-exist, one solution would be to create a separate microsite only for 0.3 docs.

    Indeed, we need to discuss with @vikram-dagger about a sustainable way to manage docs versioning and how we could avoid broken url.

  8. gerhard commented on Sep 30, 2022

    @gerhard
    Contributor

    Currently 0.2 docs live in the main branch and 0.3 docs live in the cloak branch with no overlap. I have an open item to discuss using Docusaurus versioning with @slumbering so both can live in the same branch and be rendered at different sub-urls under docs.dagger.io. This requires some investigation, so I'll be better able to answer the impact question after. For the preview launch, if we don't yet have a clean solution for the two sets of docs to co-exist, one solution would be to create a separate microsite only for 0.3 docs.

    Could we:

    1. Introduce a 0.3 to the sidebar.js exports, e.g. https://github.com/dagger/dagger/blob/v0.2.35/website/sidebars.js
    2. Configure all pages which belong to 0.3 to display this sidebar, e.g. https://github.com/dagger/dagger/blame/v0.2.35/docs/introduction/1236-community.md#L3

    This approach enabled us to have both 0.1 & 0.2 co-exist in the same branch as we were getting ready to release dagger v0.2 (a.k.a. Europa).

    Shipping all versions concurrently, in the same place - i.e. https://docs.dagger.io - is a proven strategy of de-risking releases. There are a lot of things that we will need to duplicate if we take a different approach.

  9. gerhard commented on Sep 30, 2022

    @gerhard
    Contributor

    @aluzzardi ideally, I think that we should start shipping cloak as a dagger subcommand, i.e.

    dagger cloak COMMAND
    

    Existing dagger users should be able to get the cloak variant as a dagger upgrade, without changing anything. There should be no surprises. We could even start displaying a new notice about the default command behaviour changing when 0.3 gets released. In the same context, we can start encouraging existing users to try out the new version by starting their commands with dagger cloak.

    I had a quick look at how we might achieve this technically, and while nothing obvious came up in the 30 minutes that I had for this, I would like to keep digging. Unless we know for sure that this is not going to work, dagger cloak sounds as the most elegant solution to me. WDYT?

  10. helderco commented on Sep 30, 2022

    @helderco
    Contributor

    With europa we used the feature flag like dagger --europa. We can do the same with dagger --cloak. No strong preference on it though.

  11. self-assigned this
    on Sep 30, 2022
  12. 8 remaining items

  13. jlongtine commented on Oct 4, 2022

    @jlongtine
    Contributor

    Fork dagger/dagger's main branch into its own repository (e.g. dagger/dagger-cue), import it from dagger/dagger (cloak codebase)

    • Is this relevant to the "CUE SDK" project? /cc @jlongtine

    @aluzzardi I think it probably will be relevant to that. I haven't spent much time thinking about that, because of the focus on dagger-classic.

  14. samalba commented on Oct 5, 2022

    @samalba
    Contributor

    We have discussed this sync with @aluzzardi and ended up with the following action items:

    1. Rename `cloak` command to `dagger` (in the `cloak` branch) - pay attention to SDKs (Go & TS - @sipsma, Python - @samalba & @helderco)
    
    2. Get Homebrew `--head` working with the `cloak` branch - [it uses Go to build](https://github.com/Homebrew/homebrew-core/blob/822caeb49a473450ee479bb8cc5db54d25026a0a/Formula/dagger.rb#L20) (tests will need updating)
    
    3. Produce a `dagger v0.3.0-alpha.N` binary
    
    4. Ensure that `install.sh` script works on Linux with `v0.3.0-alpha.N` versions
    
    5. Retire our Homebrew tap
    
    6. Merge `cloak` into `main` as a PR (rebase on top of `main` first)
    
    7. Create a new `0.2.x` branch from the commit just before the merge
    

    I don't see anything about shipping both code path (europa + cloak) and toggle via a feature flag. Is the idea to simply ship both 02.x + 0.3? I think it works, but better to make it explicit to avoid confusion.

  15. shykes commented on Oct 5, 2022

    @shykes
    Contributor

    Can we move the final checklist to the top of this issue, or to another issue?

  16. changed the title [-]Clarify the release decision for Cloak preview[/-] [+]We are missing dagger v0.3.0 pre-releases - how do make that happen?[/+] on Oct 5, 2022
  17. gerhard commented on Oct 5, 2022

    @gerhard
    Contributor

    @samalba I don't see anything about shipping both code path (europa + cloak) and toggle via a feature flag. Is the idea to simply ship both 02.x + 0.3? I think it works, but better to make it explicit to avoid confusion.

    We are starting with Option 1:

    • main branch continues producing dagger v0.2.x releases (no changes)
    • cloak branch will start producing dagger v0.3.x releases (former cloak binaries)

    A dagger v0.2.x binary will have the behaviour that everyone is used to, no changes.

    A dagger v0.3.0-alpha.N binary will have the current cloak binary behaviour.

    If we hit any significant blockers, we will re-evaluate. For now, Option 1 described above introduces the least amount of change. There is no risk of breaking existing v0.2.x behaviour since we wouldn't be introducing anything new into those releases or that release process.

  18. dolanor commented on Oct 6, 2022

    @dolanor
    Contributor

    We should bump our version of containerd to fix this security issue in dagger+cloak branches: #3274

    Of course, bumping this will bump other deps which in turn might have worse security issues… I'm gonna try to do that correctly on a POC.

  19. vikram-dagger commented on Oct 7, 2022

    @vikram-dagger
    Contributor

    What about using redirection for 0.1 and 0.2 towards docs.dagger.io/v1/{id}/getting-started and docs.dagger.io/v2/{id}/getting-started to avoid 404, then we'll not have any issue with futur versioning as v3 will be the new way. Every docs will be in its appropriate directory and every sidebar will be independant. IMHO it's a cleaner way to tackle documentation versioning.

    TBH, I'm not sure we need the unique {id} at all if we are using version numbers in the URL and implementing redirections anyway from old to new URLs. In this situation, would the {id} be unnecessary additional overhead?

  20. shykes commented on Oct 8, 2022

    @shykes
    Contributor

    I think the problem with prefixing every url in the docs with /vx is that it assumes 1) the entire docs are versioned, and 2) the docs are for a single versionable product.

    Things that don’t fit well in that model:

    • Dagger Cloud (not versioned)
    • Guides and tutorials (may work across versions of dagger)
    • Comparison to other software (seems weird to version)
    • SDKs (each SDK may be versioned independently in the future)
    • Extensions (each extension may be versioned; all are versioned independently of dagger itself)

    Could it be that docusaurus “version everything” model is better suited for reference docs of a more narrower scoped product? For example a single SDK, say the Go SDK could presumably have its docs versioned as a whole.

    wdyt?

  21. vikram-dagger commented on Oct 8, 2022

    @vikram-dagger
    Contributor

    I want to think about the previous comment a bit more as it has deep implications for how we version docs, but atm I have one follow-up comment/question:

    SDKs (each SDK may be versioned independently in the future)
    Extensions (each extension may be versioned; all are versioned independently of dagger itself)
    a single SDK, say the Go SDK could presumably have its docs versioned as a whole.

    In both above cases, IMO most users would only be interested in docs for the "latest" version, plus I would expect the deltas between minor versions of each SDK/extension will typically be small to avoid compatibility breaks. Do we need to maintain separate docs for each version of a given SDK/extension, or can we make do with the current version + changelog?

  22. gerhard commented on Oct 12, 2022

    @gerhard
    Contributor

    @shykes wdyt?

    We covered this synchronously via Zoom (I shared the recording). There is a private doc (also shared) with loose discussion topics. @vikram-dagger captured the outcome & next steps here: #3318 (comment)

    This fits in bigger docs v0.3 epic (the docs equivalent of this issue that I am commenting on): #3322 . I think that this is something you were asking for @mircubed a few comments earlier.

  23. gerhard commented on Oct 12, 2022

    @gerhard
    Contributor

    I have learned today that using --head for Homebrew formula pre-releases (e.g. alpha) is not allowed:

    Unstable versions (alpha, beta, development versions) are not acceptable for versioned (or unversioned) formulae.
    Excerpt from https://docs.brew.sh/Versions

    In other words, I expect this diff to be rejected by the Homebrew maintainers:

    commit 8146077b81ad2d9715bb01ea758382366565a743 (HEAD -> point-dagger-head-to-current-head, origin/point-dagger-head-to-current-head)
    Author: Gerhard Lazu <[email protected]>
    Date:   Wed Oct 12 12:40:23 2022 +0100
    
        dagger: Install the next pre-release via --head
    
        We want to give users the opportunity to try the next version of Dagger.
    
        The simplest change was to add this via the `--head` option.
        Technically, that is the current HEAD of the dagger CLI.
    
        Signed-off-by: Gerhard Lazu <[email protected]>
    
    diff --git a/Formula/dagger.rb b/Formula/dagger.rb
    index b83db0f2c07..019864a3262 100644
    --- a/Formula/dagger.rb
    +++ b/Formula/dagger.rb
    @@ -5,7 +5,7 @@ class Dagger < Formula
           tag:      "v0.2.36",
           revision: "ea275a3bafbc5b5c611e0b81bf2dd8a8add72f6b"
       license "Apache-2.0"
    -  head "https://github.com/dagger/dagger.git", branch: "main"
    +  head "https://github.com/dagger/dagger.git", branch: "cloak"
    
       bottle do
         sha256 cellar: :any_skip_relocation, arm64_monterey: "3397d51bc458acbcfe9003fd55bd0fc086ed43f41d9f41a0c9cee48849aab809"
    @@ -31,6 +31,16 @@ class Dagger < Formula
         generate_completions_from_executable(bin/"dagger", "completion")
       end
    
    +  def caveats
    +    <<~EOS
    +      To install an experimental Dagger v0.3.0 alpha release, run:
    +        brew install dagger --head
    +
    +      Learn more about the next Dagger v0.3.0 release (a.k.a. Cloak):
    +        https://github.com/dagger/dagger/tree/cloak
    +    EOS
    +  end
    +
       test do
         assert_match "v#{version}", shell_output("#{bin}/dagger version")

    As I was submitting this PR and was going through the manual checks, I realized that formula tests were going to be messy (current differences between the current v0.3 vs v0.2). Instead of going down that rabbit hole, we should bump the dagger.rb formula to 0.3.0 when we are done with the final release.

    As for the next step, we should add a new branch to our dagger Homebrew tap instead - I'm thinking v0.3.x currently - and publish pre-releases via GoReleaser. Anyone can install pre-releases from our Homebrew tap by running brew install dagger/tap/dagger https://raw.githubusercontent.com/dagger/homebrew-tap/v0.3.x/dagger.rb. Everything looks good from the GoReleaser perspective:

    I have also learned that our dagger Homebrew tap had 5x more installs in the last 90 days than the dagger bottle: 4084 vs 817. FWIW: install-on-request. This makes me think that we shouldn't deprecate it, but instead make both formulas behave the same (our tap should be the source of truth).

    I have updated the tasklist at the top of this issue to reflect the new plan.

    Next step: produce alpha binaries using GoReleaser.

  24. mircubed commented on Oct 12, 2022

    @mircubed
    ContributorAuthor

    @gerhard can we close this issue since we consolidated into #3283 ?

  25. gerhard commented on Oct 12, 2022

    @gerhard
    Contributor

    We have moved the task list to #3283 with @shykes and can now close this. 🏁

    Going forward, I will capture auxiliary context on that issue, as I was doing above.

  26. changed the title [-]We are missing dagger v0.3.0 pre-releases - how do make that happen?[/-] [+]How do we start publishing dagger CLI v0.3.0 pre-releases?[/+] on Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions