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 · 6 comments
Open

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

ysaakpr opened this issue Dec 24, 2024 · 6 comments

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 references with env_file keyword.

I am able to do a fresh setup with the devpod(Create new workspace, as well as reset), 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

@bkneis
Copy link
Contributor

bkneis commented Jan 6, 2025

Hi @ysaakpr thanks for raising your issue! Does this happen in the CLI as well as UI?

@ysaakpr
Copy link
Author

ysaakpr commented Jan 6, 2025

I have tested this only on UI - let me know if you want me to try this on the cli as well

@bkneis
Copy link
Contributor

bkneis commented Jan 6, 2025

yes please 🙏 Just so we know if it is the same as #1279 or if it is fundamental to the rebuild pipeline

@ysaakpr
Copy link
Author

ysaakpr commented Jan 7, 2025

@bkneis not sure what exactly the cli command equivalent to rebuild and reset option in the UI

@ysaakpr
Copy link
Author

ysaakpr commented Jan 8, 2025

Ran devpod up discover --recreate - believe thats the equivalent command for desktop Rebuild - as per doc

11:16:18 info Workspace discover already exists
11:16:19 info Creating devcontainer...
11:16:28 info Rebuiling without resetting a git based workspace, keeping old content folder
11:16:28 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/content''
11:16:28 info .env file exists, skips regeneration
11:16:28 info time="2025-01-08T05:46:28Z" level=warning msg="The \"TEMPORAL_UI_VERSION\" variable is not set. Defaulting to a blank string."
11:16:28 info time="2025-01-08T05:46:28Z" level=warning msg="The \"POSTGRESQL_VERSION\" variable is not set. Defaulting to a blank string."
11:16:28 info time="2025-01-08T05:46:28Z" level=warning msg="The \"TEMPORAL_VERSION\" variable is not set. Defaulting to a blank string."
11:16:28 info time="2025-01-08T05:46:28Z" level=warning msg="The \"TEMPORAL_ADMINTOOLS_VERSION\" variable is not set. Defaulting to a blank string."
11:16:28 info time="2025-01-08T05:46:28Z" level=warning msg="The \"POSTGRESQL_VERSION\" variable is not set. Defaulting to a blank string."
11:16:28 info time="2025-01-08T05:46:28Z" level=warning msg="The \"TEMPORAL_VERSION\" variable is not set. Defaulting to a blank string."
11:16:28 info time="2025-01-08T05:46:28Z" level=warning msg="The \"TEMPORAL_ADMINTOOLS_VERSION\" variable is not set. Defaulting to a blank string."
11:16:28 info time="2025-01-08T05:46:28Z" level=warning msg="The \"TEMPORAL_UI_VERSION\" variable is not set. Defaulting to a blank string."
11:16:28 info time="2025-01-08T05:46:29Z" level=warning msg="The \"TEMPORAL_ADMINTOOLS_VERSION\" variable is not set. Defaulting to a blank string."
11:16:28 info time="2025-01-08T05:46:29Z" level=warning msg="The \"TEMPORAL_UI_VERSION\" variable is not set. Defaulting to a blank string."
11:16:29 info devcontainer up: start container: docker-compose run: exit status 1
11:16:29 info time="2025-01-08T05:46:29Z" level=warning msg="The \"POSTGRESQL_VERSION\" variable is not set. Defaulting to a blank string."
11:16:29 info error parsing workspace info: rerun as root: exit status 1
11:16:29 error Try using the --debug flag to see a more verbose output
11:16:29 fatal run agent command: Process exited with status 1

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

No branches or pull requests

2 participants