Skip to content

Kits issue after upgrading to 0.31.1: unmarshal errors #191

Description

@HofmeisterAn

After upgrading from version 0.30.0 to 0.31.1, the configuration we had set up to run with GHE no longer works on Windows and fails with the following error:

PS C:\Users\<username>\Desktop\docker-sandbox-kit> sbx run --kit . copilot-dotnet
Starting sandboxd daemon...
Daemon started (PID: 18156, socket: \\.\pipe\docker_kaname_sandboxd)
Logs: C:\Users\<username>\AppData\Local\DockerSandboxes\sandboxes\state\sandboxd\daemon.log
ERROR: resolve kits: kit ".": artifact: invalid spec.yaml: yaml: unmarshal errors:
  line 13: field persistence not found in type spec.agentBlock
  line 213: field build not found in type spec.CommandsPolicy
  line 216: field test not found in type spec.CommandsPolicy

This is the configuration that worked previously with 0.30.0:

schemaVersion: "1"
kind: agent
name: copilot-dotnet
displayName: GitHub Copilot + .NET 10
description: >-
  Standalone Copilot agent with .NET SDK 10. GH_TOKEN is read from the
  host environment and injected by the Docker Sandbox proxy. The token
  never enters the VM. Pair with the balanced host policy:
  (sbx policy set-default balanced).
agent:
  image: docker/sandbox-templates:copilot-docker
  aiFilename: AGENTS.md
  persistence: persistent
  entrypoint:
    run:
      - copilot
commands:
  initFiles:
    - path: /usr/local/share/ca-certificates/ca-bundle.crt
      mode: 0644
      content: |
        <PLACEHOLDER>
      onlyIfMissing: true
  install:
    - command: update-ca-certificates
      description: Update CA Certificates
    - command: apt-get update && apt-get install -y --no-install-recommends dotnet-sdk-10.0
      description: Install .NET SDK 10
    - command: dotnet --version
      description: Verify .NET SDK install
  build:
    - command: dotnet build
      description: Build .NET project
  test:
    - command: dotnet test
      description: Run .NET tests
network:
  serviceDomains:
    foo.ghe.com: github
    api.foo.ghe.com: github
    copilot-api.foo.ghe.com: github
  serviceAuth:
    github:
      headerName: Authorization
      valueFormat: Bearer %s
  allowedDomains:
    - "github.com"
    - "foo.ghe.com"
    - "api.foo.ghe.com"
    - "copilot-api.foo.ghe.com"
credentials:
  sources:
    github:
      env:
        - GH_TOKEN
environment:
  variables:
    GH_HOST: foo.ghe.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions