GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(uhost): distinguish declined and async stop before resize by Episkey-G · Pull Request #23 · Episkey-G/ucloud-cli

Conversation

@Episkey-G

@Episkey-G Episkey-G commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • split stop-before-resize state into requested/stopped so async stops are not confused with declined prompts
  • keep declined confirmations as a non-error skip for instance and attached-disk resize
  • pass the resize --async flag through promptStopUhostIns so confirmed async stops start the stop request and still proceed to resize

Tests

  • go test ./products/uhost/... ./pkg/cli ./pkg/ui

Context

  • Follow-up to fix(uhost): stop resize when stop confirmation is declined #22: that PR fixed declined stop confirmations, but reused the old boolean where async StopUHostInstance returned false after successfully starting the stop. This PR separates those states.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Jul 4, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8143e1fc60

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread products/uhost/internal/uhost/resize.go
return stopPromptResult{}, nil
}
return stopUhostIns(ctx, client, req, false), nil
stop := stopUhostIns(ctx, client, req, async)

@chatgpt-codex-connector chatgpt-codex-connector Bot Jul 4, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Wait for the prerequisite stop before resizing

When ucloud uhost resize --async is used on a Running host, this now passes async=true into stopUhostIns, which returns as soon as the stop request is submitted; the callers then see proceed=true and immediately call ResizeUHostInstance or ResizeAttachedDisk while the host is still stopping. The resize path itself warns that the host must be stopped first, so this makes async resize race/fail for the common running-host case; the prerequisite stop should still be waited on, and only the resize operation should skip polling.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Episkey-G
fix(uhost): distinguish async stop from declined resize stop
1d10b9f
@Episkey-G
Episkey-G force-pushed the codex/uhost-resize-confirm-decline branch from 8143e1f to 1d10b9f Compare July 4, 2026 19:24
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

✅ products/uhost 自治:Episkey-G 是 base 版 owner,过 CI 后自动合并。

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions
github-actions Bot enabled auto-merge (squash) July 4, 2026 19:24
@github-actions
github-actions Bot merged commit e691a25 into master Jul 4, 2026
13 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Episkey-G Episkey-G mentioned this pull request Jul 4, 2026
fix(uhost): wait for stop before async resize #24
Merged
@Episkey-G
Episkey-G deleted the codex/uhost-resize-confirm-decline branch July 6, 2026 06:41
@Episkey-G Episkey-G mentioned this pull request Jul 6, 2026
ci(release): trigger releases after product auto-merge #25
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@Episkey-G
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.