Skip to main content

platform push error (for already deployed app)

Comments

6 comments

  • Paul Gilzow

    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
  • Leon Brodskiy

    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
  • Leon Brodskiy

    and yes, main has production type. Status for main is inactive and for master is active. 

    0
  • Paul Gilzow

    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 the master branch? I'm assuming these are the steps you took for the main branch and not master

    If the above assumption is correct, at some point you should have done either a platform environment:branch master main or a git checkout -b master main or some other branching command to create branch master from the current commit of main

    Can you run platform environment:info parent -e main and then platform environment:info parent -e master and let me know what it reports for each?

    0
  • Leon Brodskiy

    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? Y

    platform 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 -> mainBranch

    Now 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
  • Leon Brodskiy

    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.