Skip to content

pscale branch create fails: branch does not exist in databse #15

@Cam-Bread

Description

@Cam-Bread

I am trying to set up a workflow to create a test db branch to run e2e tests on.
Here are the relevant lines of the workflow:

env:
  PLANETSCALE_SERVICE_TOKEN: ${{ secrets.PSCALE_SERVICE_TOKEN }}
  PLANETSCALE_SERVICE_TOKEN_ID: ${{ secrets.PSCALE_SERVICE_TOKEN_ID }}

steps:
  - name: Setup PlanetScale CLI
    uses: planetscale/setup-pscale-action@v1

  - name: Create PlanetScale test branch
     run: pscale branch create mydb test-branch --from dev --wait --org MyOrg

I get the folowwing error:

Error: branch test-branch does not exist in database *** (organization: ***)

Note: You are using a service token for authentication. If this resource exists, your service token may not have the required 'read_branch' permission to access it. Please check your service token permissions

If I copy the exact pscale branch create call locally and run it, it creates the branch without an issue.

I have set up the Service Token with full permissions to the database and even tried recreating it from scratch with no luck, so it does not appear to be a permissions issue unless planetscale is missing a permission option that is needed here...
the "does not exist" error from the creation call is confusing since it is supposed to be creating the branch not accessing it.

Any idea of a fix / work around to this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions