Skip to content
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

Plugin sometimes fails on new branch open #4

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

alex-trieb-work
Copy link

@alex-trieb-work alex-trieb-work commented Sep 10, 2024

  • Applied fix for getting dbConnectionUri when creating a new branch
  • Tested and verified

@alex-trieb-work alex-trieb-work linked an issue Sep 10, 2024 that may be closed by this pull request
Copy link
Contributor

@tilman tilman left a comment

Choose a reason for hiding this comment

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

I tested the creation of new branch and it does not work for me. Have you tested branch creation as well?

Log of strapi:

Creating a new branch...: test
Neon.tech branches limit exceeded.
✔ Should we delete unused branches › 
/Users/tilman/Documents/Softwareentwicklung/arbeit/strapi-neon-tech-db-branches/node_modules/.pnpm/[email protected]/node_modules/neon-sdk/dist/index.js:345
    throw new ApiError(options, result, "Generic Error");
          ^

ApiError: Generic Error
    at catchErrorCodes (/Users/tilman/Documents/Softwareentwicklung/arbeit/strapi-neon-tech-db-branches/node_modules/.pnpm/[email protected]/node_modules/neon-sdk/dist/index.js:345:11)
    at /Users/tilman/Documents/Softwareentwicklung/arbeit/strapi-neon-tech-db-branches/node_modules/.pnpm/[email protected]/node_modules/neon-sdk/dist/index.js:366:9
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  url: 'https://console.neon.tech/api/v2/projects/wispy-bonus-532079/branches',
  status: 422,
  statusText: 'Unprocessable Entity',
  body: {
    code: 'BRANCHES_LIMIT_EXCEEDED',
    message: 'branches limit exceeded'
  },
  request: {
    method: 'POST',
    url: '/projects/{project_id}/branches',
    path: { project_id: 'wispy-bonus-532079' },
    body: { branch: { name: 'test' }, endpoints: [ { type: 'read_write' } ] },
    mediaType: 'application/json'
  }
}

Please test it by creating a new branch in the folder of strapi. Then the plugin should detect a branch change and should create a new branch. Please also test that it still works if branch limit is exceeded (Then it should start a dialog, asking which branch should get deleted).

@tilman
Copy link
Contributor

tilman commented Sep 17, 2024

If I restart strapi it works:

image

This is the dialog which should pop up if branch limit is exceeded.

But previously strapi failed if it is running and a new branch is created while strapi is running and branch limit is exceeded

@tilman
Copy link
Contributor

tilman commented Sep 17, 2024

If I restart strapi it works:

image This is the dialog which should pop up if branch limit is exceeded.

But previously strapi failed if it is running and a new branch is created while strapi is running and branch limit is exceeded

Ahh noo.. it also fails. Right after I have submitted the selection of which branch to delete
image

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.

Plugin sometimes fails on new branch open
2 participants