Skip to content

fix: preserve created workspace id in restore-workspace#313

Open
mc-putchar wants to merge 2 commits into
hcengineering:mainfrom
mc-putchar:fix-remote-script
Open

fix: preserve created workspace id in restore-workspace#313
mc-putchar wants to merge 2 commits into
hcengineering:mainfrom
mc-putchar:fix-remote-script

Conversation

@mc-putchar

Copy link
Copy Markdown

Fix an issue in the workspace restoration script where the newly generated workspace UUID was lost, causing downstream initialization steps to fail.

Changes:

  • Capture generated Workspace ID in the creation phase, parsing the workspaceUuid from the command output.
  • Corrected the parameter order for the assign-workspace tool command to properly pass the admin email first, followed by the workspace ID.
  • Replaced the static use of the initial $WORKSPACE argument with the dynamically extracted WORKSPACE_ID for both the assignment and the subsequent backup-restore steps, preserving the original behavior in case --skip-workspace argument is passed.

@huly-github-staging

Copy link
Copy Markdown

Connected to Huly®: SELFH-313

Comment thread restore-workspace.sh
fi

echo -e "\n\033[1;34m[3/4] Setting $EMAIL role to OWNER for $WS_ID...\033[0m"
if ! /run-tool.sh set-user-role "$EMAIL" "$WS_ID" OWNER; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this command will not work due to the absolute path in /run-tool.sh.
I suggest to replace it with ./run-tool.sh.

Comment thread restore-workspace.sh
echo -e "\033[1;33massign-workspace failed - the owner may already be assigned. Continuing.\033[0m"
fi

echo -e "\n\033[1;34m[3/4] Setting $EMAIL role to OWNER for $WS_ID...\033[0m"

@ArtyomSavchenko ArtyomSavchenko Jul 13, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[minor] Duplicate step labels 3/4:

[3/4] Assigning $EMAIL
[3/4] Setting $EMAIL

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants