Skip to content

Feat/context directory - #7744

Merged
TomChv merged 20 commits into
dagger:mainfrom
TomChv:feat/context-directory
Aug 27, 2024
Merged

TomChv merged 20 commits into
dagger:mainfrom
TomChv:feat/context-directory

Conversation

@TomChv

@TomChv TomChv commented Jun 24, 2024 •

Copy link
Copy Markdown
Member

This is an implementation of #7647

API changes

This PR updates the Function and FunctionArg from our engine API to support defaultPathFromContext

# Function

  withArg(
    """
    If the argument is a Directory or File type, default to load path from context directory, relative to root directory.
    """
    defaultPath String = ""

   ignore: [String!]
# }

# FunctionArg {

  """
  If the argument is a Directory or File type, default to load path from context directory, relative to root directory.
  """
  defaultPath: String!

  ignore: [String!]
# }

Engine changes

  • Update Call to load contextual values and insert it as input.
  • Add a loadContextualArg function that take the typedef and retrieve its contextual default value.
  • Add a function loadContext to load from git or local source the contextual path.
    This implements the spec designed in Context directory #7647
    For git: we load it from the context directory since it includes the whole repo.
    For local: we load it from importLocal with the specific directory specified so we never load the full repo expect for /

Current progress

  • Loading directory
  • Get *Directory to ID: I found a workaround with Blob but it's not okay for File, I will check if I can use select instead.
  • Load File, using Select actually works!
  • Handle relative path
  • Write tests
  • Complete all SDK support

Spec Reminder

  • The context directory is the git repository containing the module. If there is not git repository, the context is simply the module.
  • Relative paths are relative to the current source file, scoped to the context directory for security
  • Absolute paths are rooted in the context directory
  • There is no limit to the number of directories which can have default values of this sort
  • Optionally, directories can be filtered with a gitignore-style annotation

SDKs support

  • Go using pragmas directive on Directory or File type ⌛

  • Typescript using @argument({ defaultPath: "path", ignore: ["xx", "!xx"] }) ✅
    Example

@func()
build(
  @argument({ defaultPath:"./frontend/src" }) frontend: Directory,
  @argument({ defaultPath:"./backend/app/src" }) backend: Directory,
  @argument({ defaultPath: "./tools/builder.conf" }) buildConfig: File,
): Directory {}
  • Python using annotations

Fixes #7647

@TomChv
TomChv requested review from helderco, shykes and sipsma June 24, 2024 23:11
@TomChv TomChv self-assigned this Jun 24, 2024
@TomChv
TomChv force-pushed the feat/context-directory branch from c08bbea to e3064b6 Compare June 25, 2024 17:14
@sipsma

sipsma commented Jun 25, 2024

Copy link
Copy Markdown
Contributor

(continuing a conversation from discord)

For now, I think the way to general way to approach this feature should be to leave the current module context loading as is since it's used by the SDKs to build modules and then add this support for user arg context dirs as separate context loading calls. There's likely ways of unifying and optimizing this but better to start simple for now.

There's different ways of approaching this, I'm just gonna outline the first reasonable possibility that comes to mind. Not set in stone at all though so happy to hear other opinions and happy to help out more if reality of implementing it doesn't align with theory.

  1. (discussed before) ModuleFunction has access to the Module and ModuleSource via this field: https://github.com/sipsma/dagger/blob/5231aa7de19266430581da054604ce533cc85898/core/modfunc.go#L25-L25
  2. Add a new method to ModuleSource called something like LoadContext(path: string) (dagql.Instance[*Directory], error) that allows you to dynamically load dirs from the module source context.
    • This would be different than the existing ContextDirectory method that returns the static one loaded for the SDKs (we can consider renaming it maybe for clarity).
    • The way that you implement loading the context depends on whether it's coming from a remote git repo or a local git repo.
      • git is easy because we haven't implemented fancy dynamic loading, we just have to pull the whole repo, so you can just copy the directory from it's already loaded context dir
      • local is more involved since you will need to actually load it on demand. You can look at this code and the methods it calls to get an idea of how to do that (one of the really key parts being this section that does the load itself)
        • Another thing to be aware of is that the LocalImport call is sensitive to values passed in ctx which determine which client the dir should be loaded from. For now, we can just load from the "main client caller". I already wrote too much here, so just ping if you need pointers on this 🙂
  3. Once that's in place, you can plug the arg in as a directory value same as others are (i.e. in this section)

@TomChv

TomChv commented Jun 25, 2024

Copy link
Copy Markdown
Member Author

This would be different than the existing ContextDirectory method that returns the static one loaded for the SDKs (we can consider renaming it maybe for clarity).

I understand this but this directory will not have the full repo if it's not part included in include, how do I workaround that?

@sipsma

sipsma commented Jun 26, 2024

Copy link
Copy Markdown
Contributor

This would be different than the existing ContextDirectory method that returns the static one loaded for the SDKs (we can consider renaming it maybe for clarity).

I understand this but this directory will not have the full repo if it's not part included in include, how do I workaround that?

You would need to add a new method that does the actual load of files from the original context directory (i.e. loads from the user's local dirs or loads from the git repo). That's what I was referring to under "The way that you implement loading the context depends on whether it's coming from a remote git repo or a local git repo." in my previous comment

@TomChv

TomChv commented Jun 26, 2024

Copy link
Copy Markdown
Member Author

Relative paths are relative to the current source file, scoped to the context directory for security

To do such thing, we need to know the file where the module func comes from, I'm not sure we got this information in the current API.
I think the resolution should be done by the SDK, what do you think @helderco @jedevc?

@shykes

shykes commented Jun 26, 2024

Copy link
Copy Markdown
Contributor

Relative paths are relative to the current source file, scoped to the context directory for security

To do such thing, we need to know the file where the module func comes from, I'm not sure we got this information in the current API. I think the resolution should be done by the SDK, what do you think @helderco @jedevc?

Sorry I forgot to update that line after further discussion. It should be relative to the module root, not the file (that would be too difficult to find out).

@TomChv

TomChv commented Jun 26, 2024

Copy link
Copy Markdown
Member Author

Sorry I forgot to update that line after further discussion. It should be relative to the module root, not the file (that would be too difficult to find out).

Ohh then yeah it's much easier haha

@TomChv

TomChv commented Jun 26, 2024

Copy link
Copy Markdown
Member Author

Another question @helderco @jedevc @shykes, should the API returns an error during registration if the typedef has both a default value and a contextual one?
This is possible in TypeScript and Python due to the notation so should this results in an error? I think so but I want your opinion.

Example of notation:

@func()
 async test(@context("/") dir: Directory = dag.directory()): Promise<string[]>

@TomChv
TomChv force-pushed the feat/context-directory branch from b920242 to 426440b Compare June 26, 2024 15:26
@shykes

shykes commented Jun 26, 2024

Copy link
Copy Markdown
Contributor

should the API returns an error during registration if the typedef has both a default value and a contextual one? This is possible in TypeScript and Python due to the notation so should this results in an error? I think so but I want your opinion.

I thought we were using default values? I might have missed (or forgotten) the last round of bikeshedding on that topic.

@TomChv

TomChv commented Jun 26, 2024

Copy link
Copy Markdown
Member Author

I thought we were using default values? I might have missed (or forgotten) the last round of bikeshedding on that topic.

No it's a specific field in the API, see the change of spec in the description

@shykes

shykes commented Jun 26, 2024

Copy link
Copy Markdown
Contributor

@TomChv could you add example snippets of what that feature would look like, in the 3 main languages please? It would make it easier to discuss the DX tradeoffs

@helderco

Copy link
Copy Markdown
Contributor

I thought we were using default values? I might have missed (or forgotten) the last round of bikeshedding on that topic.

I updated my view in #7647 (comment):

[...] warming up to not using the default value because of that as it makes an overall simpler implementation, just sacrificing on DX for SDKs that support default values, but that can be improved later.


  • Typescript using @context("path") ⚡ to be tested once the engine changes are completed
  • Python using @context("path") ? To be confirmed by @helderco ⌛

We need to bikeshed on the @context name.

In Python, this would have to be done using metadata annotation on the type:

def build(
    self,
    backend: Annotated[
        dagger.Directory,
        DefaultFromContext("../backend/app/src"),
        Ignore(...),
    ]
) -> dagger.Directory:
    ...

@TomChv

TomChv commented Jun 26, 2024 •

Copy link
Copy Markdown
Member Author

@TomChv could you add example snippets of what that feature would look like, in the 3 main languages please? It would make it easier to discuss the DX tradeoffs

I think it should look like this:

Go

func (app *App) Build(
  // +default="./frontend/src"
  frontend *Directory,
  // +default="./backend/app/src"
  backend *Directory,
  // +default="/tools/builder.conf"
  buildConfig *File,
) *Directory {}

Typescript

@func()
build(
  @context("./frontend/src") frontend: Directory,
  @context("./backend/app/src") backend: Directory,
  @context("./tools/builder.conf") buildConfig: File,
): Directory {}

Python

Done by Helder above

def build(
  self,
  backend: Annotated[
     dagger.Directory,
     DefaultFromContext("../backend/app/src"),
      Ignore(...),
  ]
) -> dagger.Directory:
  ...

@helderco

Copy link
Copy Markdown
Contributor

In Go, rather than // +context, it should be // +default.

@shykes

shykes commented Jun 26, 2024

Copy link
Copy Markdown
Contributor

@TomChv could you add an example of how regular default values work in each case?

@TomChv

TomChv commented Jun 26, 2024

Copy link
Copy Markdown
Member Author

@TomChv could you add an example of how regular default values work in each case?

Example on https://docs.dagger.io/manuals/developer/functions#default-values

Go

I'm not sure you can default to a directory value in Go so I don't know??

But for primitive type, you set a pragma like +default=4

Typescript

@func()
build(
  frontend: Directory = dag.directory(),
  backend: Directory = dag.directory(),
  buildConfig: File = dag.directory().WithNewFile("xxx", "xxx").File("xxx"),
): Directory {}

Python

I'm not sure about the syntax but probably:

def build(
  self,
  backend: Annotated[
     dagger.Directory,
  ] = dag.directory()
) -> dagger.Directory:
  ...

@shykes shykes mentioned this pull request Jun 26, 2024
@TomChv
TomChv marked this pull request as ready for review June 26, 2024 23:21
@TomChv
TomChv requested review from a team as code owners June 26, 2024 23:21
@TomChv
TomChv force-pushed the feat/context-directory branch from cb2de90 to 770d17c Compare June 26, 2024 23:21
@jedevc jedevc added the needs/changelog Pull requests that require a changelog entry label Jun 27, 2024
@TomChv

TomChv commented Jul 1, 2024

Copy link
Copy Markdown
Member Author

Few changes that we'll introduced on this PR based on my conversation with:

  • change @context to @argument with default and ignore metadata
  • support ignore as parameter
  • Move test to module_test.go because it's common to every SDK, not testing the API
  • Raise error if context & default is set, check inside TS SDK if context & default is set then throw error

@TomChv
TomChv force-pushed the feat/context-directory branch from 770d17c to b57afae Compare July 3, 2024 13:01
@TomChv
TomChv requested a review from a team as a code owner July 3, 2024 13:01
Tom Chauveau and others added 10 commits August 23, 2024 17:14
Signed-off-by: Tom Chauveau <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Helder Correia <[email protected]>
To be moved to the engine.

Signed-off-by: Helder Correia <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
Deps were previously getting context dirs resolved from the direct
caller's local source rather than from the actual context they were
sourced from (in the case of local source modules).

The fix here finds the right client to load the context from by just
walking through the parent callers of the current client until a
non-module client is found. That client has to be the one context was
loaded from in the local dir case.

Signed-off-by: Erik Sipsma <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
@TomChv
TomChv force-pushed the feat/context-directory branch from 4d36abb to 0e3ab2e Compare August 23, 2024 15:14

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

One nit about more test coverage, otherwise LGTM!

Comment on lines +7531 to +7533
// +defaultPath="/dep"
// +ignore=["!yo"]
source *dagger.Directory,

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.

nit: I think it's worth adding coverage of relative paths when setting defaultPath for deps in addition to this coverage of absolute paths. There's a lot of logic to get correct when it comes to resolving those paths so seems worth another test.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done in 79e917c, with fixes on relative dep module resolution normally.


out, err := ctr.With(daggerCall("get-dep-source", "--src", "./dep", "entries")).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, "yo\n", out)

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 think this test is technically passing, but I have a hunch it might be wrong.

So, what if we have a dep module that doesn't exist on disk, and we created the directory source inside the GetDepSource func? I think it would still read from the disk of the parent.

...I'm not sure that's right, but I'm also not convinced what the right behavior should be. Potentially I wonder if we should just not allow a context directory at all in this case (or fallback to .ContextDirectory), since there's not really a corresponding client it was loaded from here. cc @sipsma

No need to block here, since it's a minor point in a relatively unused API (but note, we use it in our CI!).

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.

Are you referring to the case where the Directory.asModule API is used with a directory that was created with some set of arbitrary API calls?

If so, yeah that wouldn't work atm. The logic for loading context dirs/files is based on the Kind of the module source (e.g. here), so I think this just means that modules created from arbitrary directories should be marked as their own separate kind from Local/Git (need to be marked as a different kind here).

Then context can be loaded from them. I think the logic would be almost identical to the logic for loading from git.

Either way, agree this is extremely obscure, doesn't need to be a blocker.

@jedevc jedevc Aug 27, 2024 •

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.

Are you referring to the case where the Directory.asModule API is used with a directory that was created with some set of arbitrary API calls?

Exactly this.

I think this just means that modules created from arbitrary directories should be marked as their own separate kind

I suggested a ScratchKind for this back in #7744 (comment), can look at that at some point 🎉

@jedevc
jedevc dismissed their stale review August 27, 2024 11:43

stale

Tom Chauveau added 4 commits August 27, 2024 20:03
Signed-off-by: Tom Chauveau <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
Signed-off-by: Tom Chauveau <[email protected]>
@TomChv
TomChv merged commit 9c2c03f into dagger:main Aug 27, 2024
@TomChv
TomChv deleted the feat/context-directory branch August 27, 2024 21:54
TomChv pushed a commit to TomChv/dagger that referenced this pull request Aug 28, 2024
Follow up to dagger#7744 to point relative path to source dir instead of root dir.

Signed-off-by: Tom Chauveau <[email protected]>
TomChv added a commit that referenced this pull request Aug 28, 2024
* fix: context dir relative path point to source dir

Follow up to #7744 to point relative path to source dir instead of root dir.

Signed-off-by: Tom Chauveau <[email protected]>
renovate Bot referenced this pull request in scottames/daggerverse Sep 6, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [dagger/dagger](https://redirect.github.com/dagger/dagger) | patch |
`v0.12.5` -> `v0.12.7` |

---

### Release Notes

<details>
<summary>dagger/dagger (dagger/dagger)</summary>

###
[`v0.12.7`](https://redirect.github.com/dagger/dagger/blob/HEAD/CHANGELOG.md#v0127---2024-09-02)

[Compare
Source](https://redirect.github.com/dagger/dagger/compare/v0.12.6...v0.12.7)

##### Fixed

- Fixed regression in module ref parsing for no-protocol refs that had
version suffixes by [@&#8203;jedevc](https://redirect.github.com/jedevc)
in
[https://github.com/dagger/dagger/pull/8298](https://redirect.github.com/dagger/dagger/pull/8298)
- Make `Git.tags` URL parsing consistent with `Git.tree` by
[@&#8203;jedevc](https://redirect.github.com/jedevc) in
[https://github.com/dagger/dagger/pull/8298](https://redirect.github.com/dagger/dagger/pull/8298)
- Load specified version when loading `php` or `elixir` sdk by
[@&#8203;rajatjindal](https://redirect.github.com/rajatjindal) in
[https://github.com/dagger/dagger/pull/8297](https://redirect.github.com/dagger/dagger/pull/8297)

##### What to do next?

-   Read the [documentation](https://docs.dagger.io)
-   Join our [Discord server](https://discord.gg/dagger-io)
-   Follow us on [Twitter](https://twitter.com/dagger_io)

###
[`v0.12.6`](https://redirect.github.com/dagger/dagger/blob/HEAD/CHANGELOG.md#v0126---2024-08-29)

[Compare
Source](https://redirect.github.com/dagger/dagger/compare/v0.12.5...v0.12.6)

##### Added

- Add new context directory support by
[@&#8203;TomChv](https://redirect.github.com/TomChv) in
[https://github.com/dagger/dagger/pull/7744](https://redirect.github.com/dagger/dagger/pull/7744)
\
    This allows accessing their own source directory, without needing to
    explicitly pass directories around.
- Support private modules with new SSH ref scheme and forward of SSH
agent by [@&#8203;grouville](https://redirect.github.com/grouville) in
[https://github.com/dagger/dagger/pull/7708](https://redirect.github.com/dagger/dagger/pull/7708)
    -   Go-like public module refs (currently used) remain active
- HTTP / HTTPS schemes are now supported as alternative public module
refs
- SSH refs are introduced, with support of SCP-like refs
git@provider:user/repo and explicit ssh://provider/user/repo
- Implements CLI call argument `--interactive-command` for overriding
the default command used in interactive mode by
[@&#8203;samalba](https://redirect.github.com/samalba) in
[https://github.com/dagger/dagger/pull/8171](https://redirect.github.com/dagger/dagger/pull/8171)

##### Fixed

- Error out if non-existent local module directory is passed to CLI by
[@&#8203;jedevc](https://redirect.github.com/jedevc) in
[https://github.com/dagger/dagger/pull/8193](https://redirect.github.com/dagger/dagger/pull/8193)
\
The file-not-found errors were previously silently ignored for the
top-level
    module passed in the CLI.
- Silence noisy `failed to get repo HEAD` CLI error by
[@&#8203;jedevc](https://redirect.github.com/jedevc) in
[https://github.com/dagger/dagger/pull/8189](https://redirect.github.com/dagger/dagger/pull/8189)
- Fix performance issues in `Container.withExec` after using
`withMountedTemp` or `withMountedSecret` by
[@&#8203;jedevc](https://redirect.github.com/jedevc) in
[https://github.com/dagger/dagger/pull/8180](https://redirect.github.com/dagger/dagger/pull/8180)

##### What to do next?

-   Read the [documentation](https://docs.dagger.io)
-   Join our [Discord server](https://discord.gg/dagger-io)
-   Follow us on [Twitter](https://twitter.com/dagger_io)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 4pm on thursday" in timezone
America/Los_Angeles, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/scottames/daggerverse).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41OS4yIiwidXBkYXRlZEluVmVyIjoiMzguNTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: scottames-github-bot[bot] <162828115+scottames-github-bot[bot]@users.noreply.github.com>
scottames referenced this pull request in scottames/containers Sep 6, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [dagger/dagger](https://redirect.github.com/dagger/dagger) | patch |
`v0.12.5` -> `v0.12.7` |

---

### Release Notes

<details>
<summary>dagger/dagger (dagger/dagger)</summary>

###
[`v0.12.7`](https://redirect.github.com/dagger/dagger/blob/HEAD/CHANGELOG.md#v0127---2024-09-02)

[Compare
Source](https://redirect.github.com/dagger/dagger/compare/v0.12.6...v0.12.7)

##### Fixed

- Fixed regression in module ref parsing for no-protocol refs that had
version suffixes by [@&#8203;jedevc](https://redirect.github.com/jedevc)
in
[https://github.com/dagger/dagger/pull/8298](https://redirect.github.com/dagger/dagger/pull/8298)
- Make `Git.tags` URL parsing consistent with `Git.tree` by
[@&#8203;jedevc](https://redirect.github.com/jedevc) in
[https://github.com/dagger/dagger/pull/8298](https://redirect.github.com/dagger/dagger/pull/8298)
- Load specified version when loading `php` or `elixir` sdk by
[@&#8203;rajatjindal](https://redirect.github.com/rajatjindal) in
[https://github.com/dagger/dagger/pull/8297](https://redirect.github.com/dagger/dagger/pull/8297)

##### What to do next?

-   Read the [documentation](https://docs.dagger.io)
-   Join our [Discord server](https://discord.gg/dagger-io)
-   Follow us on [Twitter](https://twitter.com/dagger_io)

###
[`v0.12.6`](https://redirect.github.com/dagger/dagger/blob/HEAD/CHANGELOG.md#v0126---2024-08-29)

[Compare
Source](https://redirect.github.com/dagger/dagger/compare/v0.12.5...v0.12.6)

##### Added

- Add new context directory support by
[@&#8203;TomChv](https://redirect.github.com/TomChv) in
[https://github.com/dagger/dagger/pull/7744](https://redirect.github.com/dagger/dagger/pull/7744)
\
    This allows accessing their own source directory, without needing to
    explicitly pass directories around.
- Support private modules with new SSH ref scheme and forward of SSH
agent by [@&#8203;grouville](https://redirect.github.com/grouville) in
[https://github.com/dagger/dagger/pull/7708](https://redirect.github.com/dagger/dagger/pull/7708)
    -   Go-like public module refs (currently used) remain active
- HTTP / HTTPS schemes are now supported as alternative public module
refs
- SSH refs are introduced, with support of SCP-like refs
git@provider:user/repo and explicit ssh://provider/user/repo
- Implements CLI call argument `--interactive-command` for overriding
the default command used in interactive mode by
[@&#8203;samalba](https://redirect.github.com/samalba) in
[https://github.com/dagger/dagger/pull/8171](https://redirect.github.com/dagger/dagger/pull/8171)

##### Fixed

- Error out if non-existent local module directory is passed to CLI by
[@&#8203;jedevc](https://redirect.github.com/jedevc) in
[https://github.com/dagger/dagger/pull/8193](https://redirect.github.com/dagger/dagger/pull/8193)
\
The file-not-found errors were previously silently ignored for the
top-level
    module passed in the CLI.
- Silence noisy `failed to get repo HEAD` CLI error by
[@&#8203;jedevc](https://redirect.github.com/jedevc) in
[https://github.com/dagger/dagger/pull/8189](https://redirect.github.com/dagger/dagger/pull/8189)
- Fix performance issues in `Container.withExec` after using
`withMountedTemp` or `withMountedSecret` by
[@&#8203;jedevc](https://redirect.github.com/jedevc) in
[https://github.com/dagger/dagger/pull/8180](https://redirect.github.com/dagger/dagger/pull/8180)

##### What to do next?

-   Read the [documentation](https://docs.dagger.io)
-   Join our [Discord server](https://discord.gg/dagger-io)
-   Follow us on [Twitter](https://twitter.com/dagger_io)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 4pm on thursday" in timezone
America/Los_Angeles, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/scottames/containers).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41OS4yIiwidXBkYXRlZEluVmVyIjoiMzguNTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: scottames-github-bot[bot] <162828115+scottames-github-bot[bot]@users.noreply.github.com>
renovate Bot referenced this pull request in scottames/dots Sep 6, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [dagger/dagger](https://redirect.github.com/dagger/dagger) | patch |
`v0.12.5` -> `v0.12.7` |

---

### Release Notes

<details>
<summary>dagger/dagger (dagger/dagger)</summary>

###
[`v0.12.7`](https://redirect.github.com/dagger/dagger/blob/HEAD/CHANGELOG.md#v0127---2024-09-02)

[Compare
Source](https://redirect.github.com/dagger/dagger/compare/v0.12.6...v0.12.7)

##### Fixed

- Fixed regression in module ref parsing for no-protocol refs that had
version suffixes by [@&#8203;jedevc](https://redirect.github.com/jedevc)
in
[https://github.com/dagger/dagger/pull/8298](https://redirect.github.com/dagger/dagger/pull/8298)
- Make `Git.tags` URL parsing consistent with `Git.tree` by
[@&#8203;jedevc](https://redirect.github.com/jedevc) in
[https://github.com/dagger/dagger/pull/8298](https://redirect.github.com/dagger/dagger/pull/8298)
- Load specified version when loading `php` or `elixir` sdk by
[@&#8203;rajatjindal](https://redirect.github.com/rajatjindal) in
[https://github.com/dagger/dagger/pull/8297](https://redirect.github.com/dagger/dagger/pull/8297)

##### What to do next?

-   Read the [documentation](https://docs.dagger.io)
-   Join our [Discord server](https://discord.gg/dagger-io)
-   Follow us on [Twitter](https://twitter.com/dagger_io)

###
[`v0.12.6`](https://redirect.github.com/dagger/dagger/blob/HEAD/CHANGELOG.md#v0126---2024-08-29)

[Compare
Source](https://redirect.github.com/dagger/dagger/compare/v0.12.5...v0.12.6)

##### Added

- Add new context directory support by
[@&#8203;TomChv](https://redirect.github.com/TomChv) in
[https://github.com/dagger/dagger/pull/7744](https://redirect.github.com/dagger/dagger/pull/7744)
\
    This allows accessing their own source directory, without needing to
    explicitly pass directories around.
- Support private modules with new SSH ref scheme and forward of SSH
agent by [@&#8203;grouville](https://redirect.github.com/grouville) in
[https://github.com/dagger/dagger/pull/7708](https://redirect.github.com/dagger/dagger/pull/7708)
    -   Go-like public module refs (currently used) remain active
- HTTP / HTTPS schemes are now supported as alternative public module
refs
- SSH refs are introduced, with support of SCP-like refs
git@provider:user/repo and explicit ssh://provider/user/repo
- Implements CLI call argument `--interactive-command` for overriding
the default command used in interactive mode by
[@&#8203;samalba](https://redirect.github.com/samalba) in
[https://github.com/dagger/dagger/pull/8171](https://redirect.github.com/dagger/dagger/pull/8171)

##### Fixed

- Error out if non-existent local module directory is passed to CLI by
[@&#8203;jedevc](https://redirect.github.com/jedevc) in
[https://github.com/dagger/dagger/pull/8193](https://redirect.github.com/dagger/dagger/pull/8193)
\
The file-not-found errors were previously silently ignored for the
top-level
    module passed in the CLI.
- Silence noisy `failed to get repo HEAD` CLI error by
[@&#8203;jedevc](https://redirect.github.com/jedevc) in
[https://github.com/dagger/dagger/pull/8189](https://redirect.github.com/dagger/dagger/pull/8189)
- Fix performance issues in `Container.withExec` after using
`withMountedTemp` or `withMountedSecret` by
[@&#8203;jedevc](https://redirect.github.com/jedevc) in
[https://github.com/dagger/dagger/pull/8180](https://redirect.github.com/dagger/dagger/pull/8180)

##### What to do next?

-   Read the [documentation](https://docs.dagger.io)
-   Join our [Discord server](https://discord.gg/dagger-io)
-   Follow us on [Twitter](https://twitter.com/dagger_io)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 4pm on thursday" in timezone
America/Los_Angeles, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/scottames/dots).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41OS4yIiwidXBkYXRlZEluVmVyIjoiMzguNTkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: scottames-github-bot[bot] <162828115+scottames-github-bot[bot]@users.noreply.github.com>
@Transmitt0r

Copy link
Copy Markdown

Would love to have this also supported in go sdk :)

@jedevc

jedevc commented Sep 18, 2024

Copy link
Copy Markdown
Contributor

@Transmitt0r

Copy link
Copy Markdown

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

Labels

needs/changelog Pull requests that require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Context directory

7 participants