-
Notifications
You must be signed in to change notification settings - Fork 55
Robo command for hotfix deployment #947
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
base: main
Are you sure you want to change the base?
Conversation
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.
Looks good. A few observations:
- let's use the already defined
.pantheondirectory for this, like other deployments - if the hotfix affects the theme, like PCSS, it won't work. We need extra handling for that
- use
rsynccommand for the copying, so the exclusion logic won't differ from the full deploy process.
|
@codex address comments |
|
Summary
Testing
|
|
@amitaibu Yes its helps. We can merge it to this PR. |
|
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: Followed by And then pushing tag to GH to create the hotfix release notes. |
Go ahead, you don't need me for this :) |
Co-authored-by: Iswariya <iswariyaravi@gmail.com>
@AronNovak Could you please provide your suggestions on this approach? |
robo-components/DeploymentTrait.php
Outdated
| // 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") |
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.
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.
robo-components/DeploymentTrait.php
Outdated
| ->run(); | ||
|
|
||
| if ($result->getExitCode() !== 0) { | ||
| $this->cleanupHotfixTempDir($temp_dir); |
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.
perhaps we should also cleanup in a finally block of a try-catch
robo-components/DeploymentTrait.php
Outdated
| } | ||
|
|
||
| // Step 3: Copy changed files from hotfix branch to Pantheon repo. | ||
| $this->say("Step 3: Copying changed files to Pantheon repository..."); |
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.
| $this->say("Step 3: Copying changed files to Pantheon repository..."); | |
| $this->say("Step 3: Syncing hotfix branch to Pantheon repository..."); |
AronNovak
left a comment
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.
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.
#946
TB: 1h(1h/2h)