platform push error (for already deployed app)
The information in this post is accurate as of the published date . Please make sure to check any linked documentation within the post for changes/updates.
What could be a possible reason for the error below? The app was successfully deployed and now I'm pushing a very small change.
command: platform push
response:
Selected project: ll_project (v4cpjgry2ggze)
Pushing HEAD to the environment master (type: development).
Are you sure you want to continue? [Y/n] Y
Enumerating objects: 11, done.
Counting objects: 100% (11/11), done.
Delta compression using up to 12 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 528 bytes | 528.00 KiB/s, done.
Total 6 (delta 5), reused 0 (delta 0), pack-reused 0
*** Server encountered a fatal error handling the push: Client sent invalid option: {'environment.parent': "Parent '{name}' does not exist"}
fatal: the remote end hung up unexpectedly
-
Based on the information above, it appears you're trying to activate a development environment that doesn't have a parent branch (ie production). Specifically, this line:
Pushing HEAD to the environment master (type: development).
How was the `master` branch in this case created? Was it branched from your default/production branch?
0 -
thank you for your reply. Please see below more details.
master (dev environment) was created by default under main (see screenshot below).
This was done by running:
1. platform create
2. then: platform push
3. the above was successful and the app is up and running. The error I get now with any additional push for a small change.
0 -
and yes, main has production type. Status for main is inactive and for master is active.
0 -
master (dev environment) was created by default under main (see screenshot below).
This was done by running:
1. platform create
2. then: platform push
3. the above was successful and the app is up and running.
Are these the steps you used for the
main
or themaster
branch? I'm assuming these are the steps you took for themain
branch and notmaster
.If the above assumption is correct, at some point you should have done either a
platform environment:branch master main
or agit checkout -b master main
or some other branching command to create branchmaster
from the current commit ofmain
.Can you run
platform environment:info parent -e main
and thenplatform environment:info parent -e master
and let me know what it reports for each?0 -
I appreciate your help with this, Paul. Please see below more details. I have deleted the project and re-created it again. Here are the steps.
git commit -am "Ready for deployment".
platform create
Selecting name, region, default branch - left default as main
Git repository detected: XX/XX/XX. Set new project as the remote for this repository? Yplatform push
Enter the target branch name (default: mainBranch):
Create mainBranch as an active environment? [Y/n] Y
Pushing HEAD to the branch mainBranch of project ll_project
...
...
* [new branch] HEAD -> mainBranchNow I got created Main production env inactive and under it mainBranch (development) active. And I can I acces the URL created for the project.
Now i apply small change locally and perform git commit -am "small change"
platform push and i got the error message.
platform environment:info parent -e main --> returns null
platform environment:info parent -e master --> returns main
0 -
I think i found how to fix it but I'm still not clear why it happened. Originally, I used default in “platform push” which created for me new dev env and then 2nd push didn't work.
If I override the target branch and use main (as target branch) every time then it works.
0
Please sign in to leave a comment.
Comments
6 comments