Skip to content

fix: Fixed issue with upgrade openresty failed - #13470

Merged
wanghe-fit2cloud merged 2 commits into
dev-v2from
pr@dev-v2@common
Aug 5, 2026
Merged

fix: Fixed issue with upgrade openresty failed#13470
wanghe-fit2cloud merged 2 commits into
dev-v2from
pr@dev-v2@common

Conversation

@zhengkunwang223

Copy link
Copy Markdown
Member

Refs #13469

Copilot AI lite review requested due to automatic review settings August 4, 2026 10:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes OpenResty upgrade/rollback failures caused by missing WEBSITE_DIR during env rendering (refs #13469), by ensuring WEBSITE_DIR is always derived and normalized to an absolute path during upgrade env generation.

Changes:

  • Update renderUpgradeEnv to accept *model.AppInstall, allowing it to persist env adjustments (notably WEBSITE_DIR) back into install.Env for OpenResty upgrades.
  • Preserve selected OpenResty build-related env keys from the original .env and ensure WEBSITE_DIR is set (fallback to settings) and absolute.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread agent/app/service/app_upgrade.go

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

Copy link
Copy Markdown

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: 40bb4b6871

ℹ️ 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".

Comment thread agent/app/service/app_upgrade.go Outdated
Copilot AI review requested due to automatic review settings August 4, 2026 10:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

agent/app/service/app_upgrade.go:709

  • renderUpgradeEnv now parses the existing .env content for all upgrades and returns an error if parsing fails. Previously, .env parsing wasn't required for non-OpenResty upgrades (and OpenResty parsing was effectively best-effort), so a user-edited/legacy .env that Docker Compose can still tolerate could now block upgrades entirely. Consider treating original env parsing as best-effort (fall back to empty map on parse errors), or scoping parsing to the OpenResty-specific branch where it's actually needed.
	if len(original) > 0 {
		var err error
		originalEnv, err = godotenv.UnmarshalBytes(original)
		if err != nil {
			return nil, err

@wanghe-fit2cloud
wanghe-fit2cloud merged commit 17285d4 into dev-v2 Aug 5, 2026
4 checks passed
@wanghe-fit2cloud
wanghe-fit2cloud deleted the pr@dev-v2@common branch August 5, 2026 01:37
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.

3 participants