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

Fix error when starting work on a repo that was private but is now public #115

Open
3 tasks
zanerock opened this issue Apr 28, 2023 · 0 comments
Open
3 tasks
Labels
bug Something is broken
Milestone

Comments

@zanerock
Copy link
Member

zanerock commented Apr 28, 2023

Overview

The following resulted in an error:

  1. Create private repo.
  2. Start, submit, and clean work. (May not be necessary to reproduce?)
  3. Switch repo to public via git interface.
  4. Start work.

Got error:

Failed to execute 'cd '/Users/zane/.liq/playground/liquid-labs/npm-toolkit' &&
git checkout -b work-liquid-labs/npm-toolkit/3 && git push --set-upstream
workspace work-liquid-labs/npm-toolkit/3'; stderr: Switched to a new branch
'work-liquid-labs/npm-toolkit/3'
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Stacktrace:

at Module.tryExec (/Users/zane/.liq/playground/liquid-labs/liq-work/node_modules/@liquid-labs/shell-toolkit/dist/shell-toolkit.js:27:39)
    at /Users/zane/.liq/playground/liquid-labs/liq-work/dist/liq-work.js:310:303
    at h (/Users/zane/.liq/playground/liquid-labs/liq-work/dist/liq-work.js:18:91)
    at Generator.<anonymous> (/Users/zane/.liq/playground/liquid-labs/liq-work/dist/liq-work.js:38:7)
    at Generator.throw (/Users/zane/.liq/playground/liquid-labs/liq-work/dist/liq-work.js:25:93)
    at g (/Users/zane/.liq/playground/liquid-labs/liq-work/dist/liq-work.js:11:580)
    at i (/Users/zane/.liq/playground/liquid-labs/liq-work/dist/liq-work.js:13:51)

It was observed that a 'workspace' remote did exist (checked after the first 'issue start'), but the URL was messed up: git@github.com:undefined/npm-toolkit.git. The 'undefined' bit should have referred to the user's github account.

Setting the branch back to main, deleting the workbranch, and updating the remote URL fixed the issue. There was a fork created (checked after first 'start issue') at some point.

Related issue 1: when re-running the command, we got a different error because we were now on the work branch. We need to verify the remote looks good before switching branches or set self back to main after error.

Related issue 2: attempting to 'pause' the work resulted in a complaint that there was no unit of work with that name, so the branch was being created before the unit of work. It should probably go the other way and the unit of work should be created early in the process after validations have been performed but before other work.

Deliverables

  • Do this first. Update flow to verify remote exists and is accessable before switching to the work branch OR implement cleanup in the face of an error. (This may or may not be entangled with the primary issue.)
  • Determine cause of error.
  • Fix issue.
@zanerock zanerock added the bug Something is broken label Apr 28, 2023
@zanerock zanerock added this to the 1.0.0-beta milestone Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

No branches or pull requests

1 participant