Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devpod reset or fresh start works, but rebuild fails #1508

Open
ysaakpr opened this issue Dec 24, 2024 · 1 comment
Open

devpod reset or fresh start works, but rebuild fails #1508

ysaakpr opened this issue Dec 24, 2024 · 1 comment
Labels

Comments

@ysaakpr
Copy link

ysaakpr commented Dec 24, 2024

  • Devpod Version: v0.5.18
  • Operating System: mac
  • ARCH of the OS: ARM64
  • AWS Provider - Ec2 - ubuntu ami

I am using devpod with docker compose for development setup. i am using preInstall hooks to initialize the env variables and creates .env file in the directory where the docker compose file and devcontainer.json stays, which is in the folder named .devcontainer in the root of git repo. The docker compose also have reference to the same .env file in the services which it needed with env_file keyword.

I am able to do a fresh setup with the devpod, it works and starts the vscode editor, successfully. Also if i have to reset, it does it well. The issue is while i want to rebuild. I get debug logs saying the expected env variables are not set, and because of that the containers are failing.

Devpod rebuild logs

[10:36:45] info Workspace discover-3 already exists
[10:36:46] info Starting machine 'devpod-shared-aws-7gl0j30c-1a521'...
[10:36:48] info Successfully started 'devpod-shared-aws-7gl0j30c-1a521'
[10:36:48] info Creating devcontainer...
[10:36:57] info Waiting for devpod agent to come up...
[10:37:04] info Rebuiling without resetting a git based workspace, keeping old content folder
[10:37:04] info Configuring docker daemon ...
[10:37:04] info Running initializeCommand from devcontainer.json: 'sh -c .devcontainer/gen-docker-compose-workspace-env.sh --container-workspace-folder '/workspace' --local-workspace-folder '/home/devpod/.devpod/agent/contexts/default/workspaces/discover-3/content''
[10:37:04] info .env file exists, skips regeneration
[10:37:04] info time="2024-12-24T05:07:04Z" level=warning msg="The \"TEMPORAL_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:04] info time="2024-12-24T05:07:04Z" level=warning msg="The \"TEMPORAL_ADMINTOOLS_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:04] info time="2024-12-24T05:07:04Z" level=warning msg="The \"TEMPORAL_UI_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:04] info time="2024-12-24T05:07:04Z" level=warning msg="The \"POSTGRESQL_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:05] info time="2024-12-24T05:07:05Z" level=warning msg="The \"POSTGRESQL_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:05] info time="2024-12-24T05:07:05Z" level=warning msg="The \"TEMPORAL_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:05] info time="2024-12-24T05:07:05Z" level=warning msg="The \"TEMPORAL_ADMINTOOLS_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:05] info time="2024-12-24T05:07:05Z" level=warning msg="The \"TEMPORAL_UI_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:09] info time="2024-12-24T05:07:09Z" level=warning msg="The \"TEMPORAL_UI_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:09] info time="2024-12-24T05:07:09Z" level=warning msg="The \"POSTGRESQL_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:09] info devcontainer up: start container: docker-compose run: exit status 1
[10:37:09] info error parsing workspace info: rerun as root: exit status 1
[10:37:09] info time="2024-12-24T05:07:09Z" level=warning msg="The \"TEMPORAL_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:10] error Try enabling Debug mode under Settings to see a more verbose output
[10:37:10] fatal run agent command: Process exited with status 1
[10:36:45] info Workspace discover-3 already exists
[10:36:46] info Starting machine 'devpod-shared-aws-7gl0j30c-1a521'...
[10:36:48] info Successfully started 'devpod-shared-aws-7gl0j30c-1a521'
[10:36:48] info Creating devcontainer...
[10:36:57] info Waiting for devpod agent to come up...
[10:37:04] info Rebuiling without resetting a git based workspace, keeping old content folder
[10:37:04] info Configuring docker daemon ...
[10:37:04] info Running initializeCommand from devcontainer.json: 'sh -c .devcontainer/gen-docker-compose-workspace-env.sh --container-workspace-folder '/workspace' --local-workspace-folder '/home/devpod/.devpod/agent/contexts/default/workspaces/discover-3/content''
[10:37:04] info .env file exists, skips regeneration
[10:37:04] info time="2024-12-24T05:07:04Z" level=warning msg="The \"TEMPORAL_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:04] info time="2024-12-24T05:07:04Z" level=warning msg="The \"TEMPORAL_ADMINTOOLS_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:04] info time="2024-12-24T05:07:04Z" level=warning msg="The \"TEMPORAL_UI_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:04] info time="2024-12-24T05:07:04Z" level=warning msg="The \"POSTGRESQL_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:05] info time="2024-12-24T05:07:05Z" level=warning msg="The \"POSTGRESQL_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:05] info time="2024-12-24T05:07:05Z" level=warning msg="The \"TEMPORAL_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:05] info time="2024-12-24T05:07:05Z" level=warning msg="The \"TEMPORAL_ADMINTOOLS_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:05] info time="2024-12-24T05:07:05Z" level=warning msg="The \"TEMPORAL_UI_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:09] info time="2024-12-24T05:07:09Z" level=warning msg="The \"TEMPORAL_UI_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:09] info time="2024-12-24T05:07:09Z" level=warning msg="The \"POSTGRESQL_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:09] info devcontainer up: start container: docker-compose run: exit status 1
[10:37:09] info error parsing workspace info: rerun as root: exit status 1
[10:37:09] info time="2024-12-24T05:07:09Z" level=warning msg="The \"TEMPORAL_VERSION\" variable is not set. Defaulting to a blank string."
[10:37:10] error Try enabling Debug mode under Settings to see a more verbose output
[10:37:10] fatal run agent command: Process exited with status 1
Screenshot 2024-12-24 at 10 40 10 AM

The .env file is in the same place as the docker-composeand the devcontainer.json

My devcontainer.json:

// For format details, see https://aka.ms/devcontainer.json.
// Refer https://github.com/h4l/dev-container-docker-compose-volume-or-bind
{
    "name": "Rev Backent Dev Container",
    "dockerComposeFile": [
        "docker-compose.workspace.yaml"
        // ,"docker-compose.temporal.yaml"
    ],
    "forwardPorts": ["mongodb:27017", "db:5432", "temporal-ui:8080","mongo-express:8081"],
    "service": "app",
    "workspaceFolder": "/workspace",
    // Generate .devcontainer/.env containing WORKSPACE_* envars for docker-compose.yml
    "initializeCommand": ".devcontainer/gen-docker-compose-workspace-env.sh --container-workspace-folder '${containerWorkspaceFolder}' --local-workspace-folder '${localWorkspaceFolder}'",

    // General properties unrelated to the example follow...
    "remoteUser": "vscode",
    "postStartCommand": "bash .devcontainer/setup.sh",
    "customizations":{
        "vscode":{
            "extensions": [
                "editorconfig.editorconfig",
                "streetsidesoftware.code-spell-checker",
                "timonwong.shellcheck",
                "ms-vscode-remote.remote-containers",
                "nguyenngoclong.terminal-keeper",
                "charliermarsh.ruff"
            ]
        }
    }
}
@ysaakpr
Copy link
Author

ysaakpr commented Dec 24, 2024

May be similar : #1279

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant