dagger icon indicating copy to clipboard operation
dagger copied to clipboard

šŸž Dagger Functions: Progress output not formatted correctly on Windows

Open myty opened this issue 1 year ago • 0 comments

What is the issue?

The output when running a dagger functions command on Windows is not correctly formatted. When running with --progress plain, the output is as expected, but when running with --progress tty, it is adding D[85D[85D[85D85D right before the output and without a newline.

Dagger version

dagger v0.10.0 (registry.dagger.io/engine) windows/amd64

Steps to reproduce

Run dagger -m github.com/shykes/daggerverse/[email protected] call hello


Running with the debug flag still has the extra characters, D[85D[85D[85D85D, but it shows all of the steps with hello, world! on the last line.

Log output

dagger -m github.com/shykes/daggerverse/[email protected] call hello

ā— connect 0.1s D[85D[85D[85D85Dhello, world!

dagger --debug -m github.com/shykes/daggerverse/[email protected] call hello

ā— connect 0.0s                                                      D[85D[85D[85D85Dāœ” initialize 2.5s
  āœ” moduleSource(refString: "github.com/shykes/daggerverse/[email protected]"): ModuleSource! 0.6s
    āœ” git(url: "https://github.com/shykes/daggerverse"): GitRepository! 0.0s
    āœ” GitRepository.commit(id: "hello/v0.1.2"): GitRef! 0.0s
    āœ” git://github.com/shykes/daggerverse#hello/v0.1.2 0.3s
    ā”ƒ 3d608cb5e6b4b18036a471400bc4e6c753f229d7        refs/tags/hello/v0.1.2
    āœ” GitRef.tree: Directory! 0.0s
  āœ” ModuleSource.kind: ModuleSourceKind! 0.0s
  āœ” ModuleSource.configExists: Boolean! 0.0s
  āœ” ModuleSource.asModule: Module! 0.9s
    āœ” module: Module! 0.0s
    āœ” Module.withSource(
        source: āœ” moduleSource(refString: "github.com/shykes/daggerverse/[email protected]"): ModuleSource! 0.6s
      ): Module! 0.9s
      āœ” ModuleSource.dependencies: [ModuleDependency!]! 0.0s
      āœ” cacheVolume(key: "modgomodcache"): CacheVolume! 0.0s
      āœ” cacheVolume(key: "modgobuildcache"): CacheVolume! 0.0s
      āœ” builtinContainer(digest: "sha256:ee4afea98086fc7090326f4b1cb39a5298a972c38fa80b94533b8fad7bde322b"): Container! 0.0s
      āœ” Container.withMountedCache(
          cache: āœ” cacheVolume(key: "modgomodcache"): CacheVolume! 0.0s
          path: "/go/pkg/mod"
          sharing: SHARED
        ): Container! 0.0s
      āœ” Container.withMountedCache(
          cache: āœ” cacheVolume(key: "modgobuildcache"): CacheVolume! 0.0s
          path: "/root/.cache/go-build"
          sharing: SHARED
        ): Container! 0.0s
      āœ” directory: Directory! 0.0s
      āœ” Directory.withDirectory(
          directory: āœ” directory: Directory! 0.0s
          path: "hello"
        ): Directory! 0.0s
      āœ” Directory.withoutFile(path: "hello/dagger.gen.go"): Directory! 0.0s
      āœ” Container.withNewFile(contents: ETOOBIG:sha256:25b2b581c3c5f70907fb91abd3e6148594c8d4cd48d21c1bf034a8cd77ddc377, path: "/schema.json", permissions: 292): Container! 0.0s
      āœ” Container.withMountedDirectory(
          path: "/src"
          source: āœ” Directory.withoutFile(path: "hello/dagger.gen.go"): Directory! 0.0s
        ): Container! 0.0s
      āœ” Container.withWorkdir(path: "/src/hello"): Container! 0.0s
      āœ” Container.withoutDefaultArgs: Container! 0.0s
      āœ” Container.withExec(args: ["--module-context", "/src", "--module-name", "hello", "--propagate-logs=true", "--introspection-json-path", "/schema.json"], experimentalPrivilegedNesting: true): Container! 0.0s
      āœ” Container.directory(path: "/src"): Directory! 0.1s
        āœ” copy / /hello 0.0s
        āœ” creating dagger metadata 0.0s
        āœ” oci-layout://dagger/import@sha256:ee4afea98086fc7090326f4b1cb39a5298a972c38fa80b94533b8fad7bde322b 0.1s
        āœ” rm /hello/dagger.gen.go 0.0s
        āœ” mkfile /schema.json 0.0s
        āœ” merge 0.0s
        āœ” mkdir / 0.0s
        āœ” exec /usr/local/bin/codegen --module-context /src --module-name hello --propagate-logs=true --introspection-json-path /schema.json 0.0s
      āœ” Directory.diff(
          other: āœ” Container.directory(path: "/src"): Directory! 0.1s
        ): Directory! 0.0s
      āœ” Directory.withDirectory(
          directory: āœ” Directory.diff(
            other: āœ” Container.directory(path: "/src"): Directory! 0.1s
          ): Directory! 0.0s
          path: "/"
        ): Directory! 0.0s
      āœ” Directory.withNewFile(contents: ETOOBIG:sha256:4a6338f7a4de67dea13b876a4282f47fbbc1e231891b68f71381f7a37b584180, path: "hello/.gitattributes", permissions: 384): Directory! 0.0s
      āœ” Container.withExec(args: ["go", "build", "-o", "/runtime", "."], skipEntrypoint: true): Container! 0.0s
      āœ” Container.withEntrypoint(args: ["/runtime"]): Container! 0.0s
      āœ” Container.withWorkdir(path: "/scratch"): Container! 0.0s
      āœ” Directory.withNewFile(contents: "{\n  \"name\": \"hello\",\n  \"sdk\": \"go\",\n  \"source\": \".\",\n  \"engineVersion\": \"v0.10.0\"\n}\n", path: "hello/dagger.json", permissions: 420): Directory! 0.0s
  āœ” Module.initialize: Module! 0.1s
    āœ” exec /runtime 0.0s
    āœ” exec go build -o /runtime . 0.0s
    āœ” Module.withDescription(description: "A Dagger module to say hello to the world\n"): Module! 0.0s
    āœ” Module.withObject(
        object: āœ” TypeDef.withFunction(
          function: āœ” Function.withArg(
            description: "Custom container for running the figlet tool"
            name: "figletContainer"
            typeDef: āœ” TypeDef.withOptional(optional: true): TypeDef! 0.0s
          ): Function! 0.0s
        ): TypeDef! 0.0s
      ): Module! 0.0s
      āœ” typeDef: TypeDef! 0.0s
      āœ” TypeDef.withObject(description: "A Dagger module to say hello to the world!",
 name: "Hello"): TypeDef! 0.0s
      āœ” TypeDef.withFunction(
          function: āœ” Function.withArg(
            description: "Custom container for running the figlet tool"
            name: "figletContainer"
            typeDef: āœ” TypeDef.withOptional(optional: true): TypeDef! 0.0s
          ): Function! 0.0s
        ): TypeDef! 0.0s
        āœ” function(
            name: "Hello"
            returnType: āœ” TypeDef.withKind(kind: STRING_KIND): TypeDef! 0.0s
          ): Function! 0.0s
          āœ” TypeDef.withKind(kind: STRING_KIND): TypeDef! 0.0s
        āœ” Function.withDescription(description: "Say hello to the world!"): Function!
 0.0s
        āœ” Function.withArg(
            defaultValue: "\"hello\""
            description: "Change the greeting"
            name: "greeting"
            typeDef: āœ” TypeDef.withOptional(optional: true): TypeDef! 0.0s
          ): Function! 0.0s
          āœ” TypeDef.withOptional(optional: true): TypeDef! 0.0s
        āœ” Function.withArg(
            defaultValue: "\"world\""
            description: "Change the name"
            name: "name"
            typeDef: āœ” TypeDef.withOptional(optional: true): TypeDef! 0.0s
          ): Function! 0.0s
        āœ” Function.withArg(
            description: "Encode the message in giant multi-character letters"
            name: "giant"
            typeDef: āœ” TypeDef.withOptional(optional: true): TypeDef! 0.0s
          ): Function! 0.0s
          āœ” TypeDef.withKind(kind: BOOLEAN_KIND): TypeDef! 0.0s
          āœ” TypeDef.withOptional(optional: true): TypeDef! 0.0s
        āœ” Function.withArg(
            description: "Make the message uppercase, and add more exclamation points"
            name: "shout"
            typeDef: āœ” TypeDef.withOptional(optional: true): TypeDef! 0.0s
          ): Function! 0.0s
        āœ” Function.withArg(
            description: "Custom container for running the figlet tool"
            name: "figletContainer"
            typeDef: āœ” TypeDef.withOptional(optional: true): TypeDef! 0.0s
          ): Function! 0.0s
          āœ” TypeDef.withObject(name: "Container"): TypeDef! 0.0s
          āœ” TypeDef.withOptional(optional: true): TypeDef! 0.0s
  āœ” Module.serve: Void 0.0s
  āœ” Module.name: String! 0.0s
āœ” hello: Hello! 0.0s
āœ” Hello.hello: String! 1.1s
  āœ” exec /runtime 1.1s
  āœ” connect 0.3s
  ā”ƒ OK!
  āœ” loadFunctionCallArgValueFromID(
      id: FunctionCall.inputArgs: FunctionCallArgValue!
    ): FunctionCallArgValue! 0.0s
  āœ” loadFunctionCallArgValueFromID(
      id: FunctionCall.inputArgs: FunctionCallArgValue!
    ): FunctionCallArgValue! 0.0s

DEBUG: executing query="query{hello{hello}}"

hello, world!

myty avatar Mar 03 '24 13:03 myty