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

Error when updating nodenv #968

Closed
dacook opened this issue Dec 8, 2024 · 2 comments · Fixed by #984
Closed

Error when updating nodenv #968

dacook opened this issue Dec 8, 2024 · 2 comments · Fixed by #984

Comments

@dacook
Copy link
Member

dacook commented Dec 8, 2024

Playbook: provision.yml
OS: Ubuntu 20.04

When provision has been executed a second time, nodenv update fails with below message.
I've seen it on a few servers, including uk_prod.

TASK [node : fetch nodenv] *********************************************************************************************
ok: [staging.openfoodnetwork.org.au]
Monday 09 December 2024  10:33:25 +1100 (0:00:04.843)       0:07:27.864 *******

TASK [node : install nodenv plugins] ***********************************************************************************
failed: [staging.openfoodnetwork.org.au] (item={'name': 'node-build', 'repo': 'https://github.com/nodenv/node-build.git', 'version': 'master'}) => {
    "ansible_loop_var": "item",
    "changed": false,
    "cmd": [
        "/usr/bin/git",
        "fetch",
        "--tags",
        "origin"
    ],
    "item": {
        "name": "node-build",
        "repo": "https://github.com/nodenv/node-build.git",
        "version": "master"
    }
}

MSG:

Failed to download remote objects and refs:  From https://github.com/nodenv/node-build
   f6fab6d6..a502fc42  master     -> origin/master
   f6fab6d6..a502fc42  main       -> origin/main
 ! [rejected]          v5         -> v5  (would clobber existing tag)
 * [new tag]           v5.3.20    -> v5.3.20

Workaround

Quick fix is to ssh and manually reset it, ie:

openfoodnetwork@uk-prod2:~/$ cd ~/.nodenv/plugins/node-build
openfoodnetwork@uk-prod2:~/.nodenv/plugins/node-build$ git fetch --tags -f
@mkllnk
Copy link
Member

mkllnk commented Jan 8, 2025

I'm assuming that this is fixed now. Re-open if you come across this again.

@mkllnk mkllnk closed this as completed Jan 8, 2025
@github-project-automation github-project-automation bot moved this from All the things 💤 to Done in OFN Delivery board Jan 8, 2025
@dacook
Copy link
Member Author

dacook commented Jan 10, 2025

Still a problem.

So I finally bothered to investigate, and it looks like they are maintaining a general v5 tag, updating it each time there's a new release. Which creates an error when performing a standard git operation, bad idea!

Screenshot 2025-01-10 at 11 56 09 am

I don't get why this is not a problem for everyone else

@dacook dacook reopened this Jan 10, 2025
@github-project-automation github-project-automation bot moved this from Done to Dev ready 👋 in OFN Delivery board Jan 10, 2025
@github-project-automation github-project-automation bot moved this from Dev ready 👋 to Done in OFN Delivery board Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants