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

Found in the lock file but not in remote repositories #568

Open
leopoiroux opened this issue Feb 20, 2022 · 14 comments
Open

Found in the lock file but not in remote repositories #568

leopoiroux opened this issue Feb 20, 2022 · 14 comments

Comments

@leopoiroux
Copy link

leopoiroux commented Feb 20, 2022

Hi,
Since this morning, I get this message when I try to do a "composer update" on my project.

Problem 1
    - Root composer.json requires [my-private-dependency] ^5.11, found [my-private-dependency][5.11.4] in the lock file but not in remote repositories, make sure you avoid updating this package to keep the one from the lock file.
Problem 2
    - Root composer.json requires [my-private-dependency] ^3.0, found [my-private-dependency][3.1.4] in the lock file but not in remote repositories, make sure you avoid updating this package to keep the one from the lock file.
Problem 3
    - ......

Is this due to a problem with the cloud version of repman at the moment?
Thnks

@gaetan-hexadog
Copy link

same here :'(

@philipp-brosig
Copy link

Try to update every single package at repman. Has worked for me.

image

@leopoiroux
Copy link
Author

leopoiroux commented Feb 21, 2022

Try to update every single package at repman. Has worked for me.

Thank you! I just did it on our 32 dependencies and it works.

@thibodelanghe
Copy link

thibodelanghe commented Feb 21, 2022

Can't this be automated or solved along the repman side? i'm not manually updating 100+ dependencies. @akondas Do you have any insight?

@thibodelanghe
Copy link

thibodelanghe commented Feb 22, 2022

@akondas @karniv00l Can someone look into this please? It interrupts our daily operations...

@akondas
Copy link
Member

akondas commented Feb 22, 2022

If you can share your organization alias with me, I can do it manually. If it is a standalone version, there is a command in cli that synchronizes the entire organization:

bin/console repman:package:synchronize-all --help
Description:
  Synchronize all packages

Usage:
  repman:package:synchronize-all [<organization>]

Arguments:
  organization          Organization alias

Options:
  -h, --help            Display help for the given command. When no command is given display help for the list command
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -e, --env=ENV         The Environment name. [default: "prod"]
      --no-debug        Switch off debug mode.
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

@thibodelanghe
Copy link

thibodelanghe commented Feb 22, 2022

Hi @akondas, we use the cloud version, our alias is codedor. Thanks!

@thibodelanghe
Copy link

@akondas No longer needed. While waiting, I wrote something myself that uses the API to sync the packages...

@ProxiBlue
Copy link

Well, that was tedious, 100s of packages, manually updating each.

Kind of points to the need for a global 'update all packages' on the hosted version :)

@ericp-mrel
Copy link

@thibodelanghe Do you have a working link to the API docs? I'm just seeing an error message on their API docs landing page.

@thibodelanghe
Copy link

Not a full fledged page @ericp-mrel, but this did the trick for me https://app.repman.io/api/doc.json

@ericp-mrel
Copy link

@thibodelanghe Thanks!

@swichers
Copy link

Quick and dirty bash script to sync all packages. Assumes HTTPie and JQ are installed.

#!/bin/env bash
# Requires HTTPie and JQ

ORG_NAME='example'
API_KEY='DEADBEEF12345etc'
SLEEP_S=0.5

# End of variables that need to change

package_url="https://app.repman.io/api/organization/${ORG_NAME}/package"
result=`http -j "${package_url}" "X-Api-Token:${API_KEY}"`

while [[ true ]]
do
    for uuid in `echo "${result}" | jq -r '.data[].id'`
    do
        sync_url="${package_url}/${uuid}"
        echo "Syncing package ${sync_url}"
        http -j PUT "${sync_url}" "X-Api-Token:${API_KEY}"
        sleep "${SLEEP_S}"
    done

    next_link=`echo "${result}" | jq -re '.links.next'`
    if [ $? -ne 0 ]; then
        break
    fi

    echo "---- Fetching ${next_link}"
    result=`http -j "${next_link}" "X-Api-Token:${API_KEY}"`
done

echo "done"
exit 0

@swichers
Copy link

Slightly "safer" version of the above script is available here https://gist.github.com/swichers/c167abdb0f9be23305c7a9a22a473188 which pulls the org and key into arguments and checks for jq and http on the system before running.

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

No branches or pull requests

8 participants