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

Package Links error on Sync #446

Closed
giggsey opened this issue Apr 28, 2021 · 9 comments
Closed

Package Links error on Sync #446

giggsey opened this issue Apr 28, 2021 · 9 comments
Labels
bug Something isn't working

Comments

@giggsey
Copy link
Contributor

giggsey commented Apr 28, 2021

Just updated work's instance, and updating GitLab packages gives a result of:

Error: Typed property Buddy\Repman\Entity\Organization\Package::$links must not be accessed before initialization
Logs:
Reading composer.json of org/package (1.1.2)
...

I can't reproduce this locally or on repman.io. We're using the docker-compose setup.

@akondas akondas added the bug Something isn't working label Apr 28, 2021
@akondas
Copy link
Member

akondas commented Apr 28, 2021

This looks like a cache problem to me. How do you make update?

@giggsey
Copy link
Contributor Author

giggsey commented Apr 28, 2021

git pull
docker-compose up -d

It pulled the correct image

@akondas
Copy link
Member

akondas commented Apr 28, 2021

It seems that the cached volume is not cleared with this configuration. You can quickly remove the volume "/app/var/cache", this should fix the error. In the long run, we have to check it out, apparently docker has changed something again in the latest version.

More details: #420

@giggsey
Copy link
Contributor Author

giggsey commented Apr 28, 2021

Just noticed that, and wiped var/cache and restarted all the containers.

The cache directory is now empty, and it still errors.

@karniv00l
Copy link
Contributor

@giggsey did you make any modifications to the compose file? docker-compose.override.yml maybe? Cache directory is overridden so it's not shared with the host or any other containers and it's created from scratch every time container starts.

@giggsey
Copy link
Contributor Author

giggsey commented Apr 28, 2021

@karniv00l Found the actual cache directory hidden within docker, and it had files from March in it. Wiped that directory & restarted, still no luck. Files have populated with today's date though.

git diff shows the only modification to docker-compose is changing the nginx port. No override file present either.

@karniv00l
Copy link
Contributor

Make sure that all containers have been restarted, otherwise cache volume might not be recreated:

docker-compose down && docker-compose up -d

@giggsey
Copy link
Contributor Author

giggsey commented Apr 28, 2021

That did it. I was only stopping + starting.

Thanks!

@giggsey giggsey closed this as completed Apr 28, 2021
@akondas
Copy link
Member

akondas commented Apr 28, 2021

Ok, for the sake of clarity why this is so:

  1. docker-compose up -d

If there are existing containers for a service, and the service’s configuration or image was changed after the container’s creation, docker-compose up picks up the changes by stopping and recreating the containers (preserving mounted volumes)

  1. docker-compose down

Anonymous volumes are not removed by default. However, as they don’t have a stable name, they will not be automatically mounted by a subsequent up. For data that needs to persist between updates, use host or named volumes.

On our side, var/cache is just an anonymous volume, which is why running only docker-compose up -d allowed the cache data to survive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants