Skip to content

Conversation

@iswariya
Copy link
Contributor

@iswariya iswariya commented Nov 21, 2025

#946

TB: 1h(1h/2h)

@iswariya iswariya requested a review from AronNovak November 21, 2025 10:52
Copy link
Member

@AronNovak AronNovak left a comment

Choose a reason for hiding this comment

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

Looks good. A few observations:

  • let's use the already defined .pantheon directory for this, like other deployments
  • if the hotfix affects the theme, like PCSS, it won't work. We need extra handling for that
  • use rsync command for the copying, so the exclusion logic won't differ from the full deploy process.

@amitaibu
Copy link
Member

amitaibu commented Dec 2, 2025

@codex address comments

@chatgpt-codex-connector
Copy link

Summary

Testing

  • ⚠️ Not run (not requested)

View task →

@amitaibu
Copy link
Member

amitaibu commented Dec 2, 2025

PR created by codex - #953

@iswariya see if it helps you

@iswariya
Copy link
Contributor Author

iswariya commented Dec 4, 2025

@amitaibu Yes its helps. We can merge it to this PR.

@dipakmdhrm
Copy link
Collaborator

I think it would be useful if this throws a warning message to user saying something llke 'Have you ensured that the hotfix branch should be branched from last deployed tag' to help developer ensure that they're not merging anything unwanted. Eg. other issues already merged to the main branch.

Message could be something better of course.

@dipakmdhrm
Copy link
Collaborator

dipakmdhrm commented Dec 4, 2025

I think it would be useful if this throws a warning message to user saying something llke 'Have you ensured that the hotfix branch should be branched from last deployed tag' to help developer ensure that they're not merging anything unwanted. Eg. other issues already merged to the main branch.

Message could be something better of course.

On second thought, aren't hotfix already possible using:

git checkout hotfix-branch
git tag 1.x.x-hotfix
ddev robo deploy:tag-pantheon --no-interaction 1.x.x-hotfix  master

Followed by ddev robo deploy:pantheon-sync live for live deploy?

And then pushing tag to GH to create the hotfix release notes.

@amitaibu
Copy link
Member

amitaibu commented Dec 7, 2025

We can merge it to this PR.

Go ahead, you don't need me for this :)

amitaibu and others added 2 commits January 5, 2026 10:23
Co-authored-by: Iswariya <iswariyaravi@gmail.com>
@iswariya
Copy link
Contributor Author

iswariya commented Jan 5, 2026

On second thought, aren't hotfix already possible using:

git checkout hotfix-branch
git tag 1.x.x-hotfix
ddev robo deploy:tag-pantheon --no-interaction 1.x.x-hotfix  master

Followed by ddev robo deploy:pantheon-sync live for live deploy?

And then pushing tag to GH to create the hotfix release notes.

@AronNovak Could you please provide your suggestions on this approach?

@iswariya iswariya requested a review from AronNovak January 5, 2026 05:09
// Step 2: Get changed files between main and hotfix branch.
$this->say("Step 2: Getting changed files from hotfix branch compared to main...");

$result = $this->taskExec("git diff --name-only origin/main...origin/$hotfix_branch")
Copy link
Member

Choose a reason for hiding this comment

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

I am wondering if it makes sense in hotfix content. I think this is not the case.
We cannot get the true diff like this, as main is typically not on LIVE, that's why we hotfix. Likely we could replace this with a check on Pantheon repo, where we compare with the latest live tag.

->run();

if ($result->getExitCode() !== 0) {
$this->cleanupHotfixTempDir($temp_dir);
Copy link
Member

Choose a reason for hiding this comment

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

perhaps we should also cleanup in a finally block of a try-catch

}

// Step 3: Copy changed files from hotfix branch to Pantheon repo.
$this->say("Step 3: Copying changed files to Pantheon repository...");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
$this->say("Step 3: Copying changed files to Pantheon repository...");
$this->say("Step 3: Syncing hotfix branch to Pantheon repository...");

Copy link
Member

@AronNovak AronNovak left a comment

Choose a reason for hiding this comment

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

Indeed we can already do this, as @dipakmdhrm pointed out correctly, but if we build safeguards into the process, as suggested above, it can still bring value likely.

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.

5 participants