Repository navigation
pipelines: merge dev module back into the root - #8042
Conversation
|
Here is why I had to disable $ dagger install --name python-sdk-dev ./sdk/python/dev
Full trace at https://dagger.cloud/dagger/traces/1da44b623400f23f1489e9d42c7afe6e
✔ connect 0.8s
✔ moduleSource(refString: "."): ModuleSource! 0.0s
✔ ModuleSource.kind: ModuleSourceKind! 0.0s
✔ ModuleSource.resolveContextPathFromCaller: String! 0.0s
✔ moduleSource(refString: "./sdk/python/dev"): ModuleSource! 0.0s
✔ ModuleSource.kind: ModuleSourceKind! 0.0s
✔ moduleSource(refString: "sdk/python/dev"): ModuleSource! 0.0s
✔ moduleDependency(
name: "python-sdk-dev"
source: ✔ moduleSource(refString: "sdk/python/dev"): ModuleSource! 0.0s
): ModuleDependency! 0.0s
✔ ModuleSource.withDependencies(dependencies: [xxh3:2950ff247d28f4b3]): ModuleSource! 0.0s
✔ ModuleSource.resolveFromCaller: ModuleSource! 0.3s
✘ ModuleSource.asModule: Module! 0.0s
! failed to create module: select: failed to update module dependencies: module "dagger-dev" dependency "python-sdk-dev" with source root path "sdk/python/dev" does not exist or does not have a configuration file
Error: failed to generate code: input: moduleSource.withContextDirectory.withDependencies.asModule resolve: failed to create module: select: failed to update module dependencies: module "dagger-dev" dependency "python-sdk-dev" with source root path "sdk/python/dev" does not exist or does not have a configuration fileNote that $ dagger -m ./sdk/python/dev functions
Full trace at https://dagger.cloud/dagger/traces/8624ba7bcbb62c339935cfbdf027430f
✔ connect 0.9s
✔ initialize 2.8s
Name Description
build Build Python SDK package for distribution.
container Container to run commands in
docs Preview the reference documentation.
format Format source files.
generate Generate the client bindings for the API.
lint Check for linting errors.
supported-versions Supported Python versions.
test Run the test suite.
test-versions Run the test suite for all supported versions.
typecheck Run the type checker (mypy).
with-container Replace container.
with-directory Mount a directory on the base container.If anyone has any idea... I am interested. |
|
Same behavior, checking 👀 |
|
I think the other 3 points make sense, those SGTM 🎉 Just a little caught up on moving all the helper modules to the top level. I would rather we keep those in
I suspect there's a reason for moving them up - I'm guessing it's nicer for non dagger callers to access it using Is there another reason we should move them up? I think that's probably the most controversial thing I can see in this PR, just off a quick glance, but if the aim is to merge quickly and iterate, potentially we could split that out and discuss that one separately - the other parts SGTM 🎉 (I'm not 100% sure about |
Nope, having them importable at a sane address is indeed the main reason.
Or, let's dogfood the experience of having importable submodules in the same repo, like I'm proposing here. Our users will encounter this situation so we should make sure it works well. Spinning out into a separate repo can happen later. To do it now would be rushing it.
Not ideal in this case, I really don't want to leave a trail of modules imported at
I also tried an alternative: |
Found the culprit: it is this line -> https://github.com/dagger/dagger/blob/main/sdk/python/dev/dagger.json#L9 As the module's Found the root cause, working on a fix |
Thank you @grouville ! |
That's the helper: #8045. It does not fix the issue per se, as it is probably a global replace mistake / or a conflict between the exclusion pattern yes, but at least it will add some nice debugging to help the user |
I think the issue is a bit more subtle: Example with your PR, with Includes: [golangci/dagger.json wolfi/dagger.json **/go.work **/*.go graphql/**/* sdk/python/dev/**/* **/go.mod dirdiff/dagger.json dirdiff/**/* wolfi/**/* go/**/* **/go.sum golangci/**/* shellcheck/dagger.json dagger.json **/go.work.sum **/vendor/ .dagger/**/* go/dagger.json graphql/dagger.json shellcheck/**/* sdk/python/dev/dagger.json]"
Excludes: [**/.git **/.direnv **/.venv **/__pycache__ **/.*cache **/sdk]Here, the 3 strategies: find out the conflict and error OR remove one of the two silently (having an opinion in case of conflicts) OR scope exclusions / inclusions globals to the context of their dagger.json ? I do understand the logic behind inheriting the patterns from the parent module, but this can easily create some funky states My preference is on erroring, which linked PR does |
I don't think sub-modules should inherit excludes. A module's exclude/include should only apply to itself IMO. |
5cefc28 to
bdd1052
Compare
I would love to get this merged ASAP 🙏 |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Confusion around
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
CI is stuck on this error: I was able to reproduce in my local env: dagger call -m github.com/dagger/dagger@pull/8042/merge --source https://github.com/dagger/dagger#pull/8042/merge sdk python lintI have to go afk for the rest of the day, if someone can help track this one down in parallel to bikeshedding 🙏 |
@jedevc I tracked this one down, they're all references to |
|
Relevant: #8048 |
|
I like the idea of having a My major concern with using a Edit: I know I'm not suggesting any new alternatives yet. Still trying to think what would be the best approach that we could also recommend to new users. |
|
Needs to add dev/ps-analyzer module to the module in questions list? |
11569cf to
0437104
Compare
5170ea6 to
26d204c
Compare
Done! Thank you |
26d204c to
f5507a2
Compare
- Main Dagger module is now github.com/dagger/dagger - Sub-modules moved to the root of the repo - The rest is in .dagger - Update module's README (which btw should be merged into CONTRIBUTING) - Fix hack/dev - Remove exclude from sdk/python/dev which triggered an engine bug Co-authored-by: Guillaume de Rouville <[email protected]> Signed-off-by: Solomon Hykes <[email protected]> Signed-off-by: Guillaume de Rouville <[email protected]>
Signed-off-by: Solomon Hykes <[email protected]>
Signed-off-by: Solomon Hykes <[email protected]>
ef60844 to
eb5210d
Compare
|
Think CI should be back and healthy again - approving now, if everything looks good, LGTM 🎉 |
| "**/.*cache", | ||
| "sdk" | ||
| ], | ||
| "exclude": ["**/.venv", "**/__pycache__", "**/.*cache"], |
There was a problem hiding this comment.
It's a shame that the sdk exclude was removed here. There's a bug where include/exclude patterns from dependencies aren't prefixed with the relative paths to them.
2ccab1c to
3d5a82d
Compare
Signed-off-by: Justin Chadwell <[email protected]>
Context
-m devis just too cumbersome. Meanwhile in the latest design discussions, we are moving away from the concept of "dev module". See this discord thread.Since the prospect of a "quick win" where a dev module pattern solves all our problems is less and less certain, there's no point in incurring the pain of the extra
-m devat this point.Summary
github.com/dagger/daggergithub.com/dagger/dagger/dev(this breaks external references to these modules, which we intentionally discouraged because of anticipated changes like this one).dagger(better thanci)TODO before merging
Remaining tasks:
devin Github Actions config in progressRemovethis is a different dev module, wontfix-m devfrom SDK docs help wantedTODO after merging
Where should sub-modules go?
This
iswas a contentious point, but we have consensus on modules/.The modules in question:
github.com/dagger/dagger/dev/dirdiffgithub.com/dagger/dagger/modules/dirdiffgithub.com/dagger/dagger/dev/gogithub.com/dagger/dagger/modules/gogithub.com/dagger/dagger/dev/golangcigithub.com/dagger/dagger/modules/golangcigithub.com/dagger/dagger/dev/graphqlgithub.com/dagger/dagger/modules/graphqlgithub.com/dagger/dagger/dev/markdowngithub.com/dagger/dagger/modules/markdowngithub.com/dagger/dagger/dev/ruffgithub.com/dagger/dagger/modules/ruffgithub.com/dagger/dagger/dev/shellcheckgithub.com/dagger/dagger/modules/shellcheckgithub.com/dagger/dagger/dev/wolfigithub.com/dagger/dagger/modules/wolfigithub.com/dagger/dagger/dev/ps-analyzergithub.com/dagger/dagger/modules/ps-analyzerOptions we discussed:
github.com/dagger/dagger/ruffmodules⭐github.com/dagger/dagger/modules/ruff.daggergithub.com/dagger/dagger/.dagger/ruffgithub.com/dagger/std/ruffgithub.com/dagger/ci/ruffgithub.com/dagger/ruffgithub.com/dagger/dagger/internal/ruffgithub.com/dagger/dagger/sdk/python/ruffgithub.com/dagger/dagger/devFAQ
No, because
dagger.jsonis pinned.It will break
dagger installcommands that reference the module without a pinned tag or commit. It may also break a futuredagger updatecommand.Given the limited exposure of the
devmodule to external imports (on purpose, as we anticipated future changes), I think there is no actual breakage to worry about.It's better than
ci... Let's try, and see how it feels. See also this discussion.This is a contentious point. See "where should sub-modules go"?