What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

hey docker peeps, i've been running into this error, it seems to happen when I switch projects, at f

U01JBB8LNTE
U01JBB8LNTE Posts: 207 πŸ§‘πŸ»β€πŸš€ - Cadet
edited February 2021 in Docker

hey docker peeps, i've been running into this error, it seems to happen when I switch projects, at first I thought it was specific to code changes but now I'm thinking it has specifically to do with switching projects.

MacOS 11.2.1 / Docker Desktop / Docker version 20.10.2 / docker-compose version 1.27.4

Docker down to stop one project

$ docker/sdk down
$ cd path/to/other/sprykerProject

At first I try this

$ docker/sdk reset
$ docker/sdk boot deploy.dev.yml # if it's a new project I have to switch to mutagen
$ docker/sdk up

Sometimes this only seems to do it, but today...
It runs until it hits the frontend build and then Aborted install...

$ docker/sdk down
$ docker/sdk boot deploy.dev.yml 
$ docker/sdk clean && docker/sdk clean-data
$ docker/sdk up --build --assets --data

Sometimes this also seems to work, but today...
It runs until it hits the frontend build and then Aborted install...

$ docker/sdk down
$ docker system prune -a && docker system prune --volumes # this has worked in the past for these kinds of things, maybe referencing incorrect container?
$ docker/sdk boot deploy.dev.yml 
$ docker/sdk up 

This was my goto, but today i tried it and...
It runs until it hits the frontend build and then Aborted install...

$ docker/sdk down
$ docker/sdk boot deploy.dev.yml 
$ docker/sdk clean-data && docker/sdk up && docker/sdk console q:w:s -v -s

Today this last command worked. Which is sort of answering my own question. The real question is:

Is there a way to switch projects reliably every time

If one wants to switch from SprykerProject1 to SprykerProject2 follow these steps...

Comments

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    In the deploy file there is namespace

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    Change it for each project. This way images and volumes won't be a problem.

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    I have around 8-9 different projects. Stop one, change directory, start another.
    Simply as is.

  • U01JBB8LNTE
    U01JBB8LNTE Posts: 207 πŸ§‘πŸ»β€πŸš€ - Cadet

    alright, well all these projects have the same namespace, the error part of that, checks out 🀣 I'll give it a shot. thanks @valerii.trots πŸ™

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    Don't forget to bootstrap after changing the namespace.

  • U01JBB8LNTE
    U01JBB8LNTE Posts: 207 πŸ§‘πŸ»β€πŸš€ - Cadet

    ok changing the namespaces seems to work most of the time
    but not all the time... this looks like a timeout error to me, like it's taking so long to build that it gets cutoff

  • U01JBB8LNTE
    U01JBB8LNTE Posts: 207 πŸ§‘πŸ»β€πŸš€ - Cadet

    It was working pretty well for the last couple days of last week though...

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    What was the command? docker/sdk build?
    It isn't related to namespaces IMO.

  • U01JBB8LNTE
    U01JBB8LNTE Posts: 207 πŸ§‘πŸ»β€πŸš€ - Cadet

    docker/sdk up
    docker/sdk up --build --assets --data

    both produce the same result, yeh I don't really know whats going on, and don't know how to debug as there isn't a lot of data yo work with, it's happened in multiple cases in different repos, but all using the docker/sdk repo...

  • U01JBB8LNTE
    U01JBB8LNTE Posts: 207 πŸ§‘πŸ»β€πŸš€ - Cadet

    alright I think I might have figured out what is going on... some artifacts must get left behind... hard to do a prune and then hard reset

    docker/sdk trouble && rm -rf vendor && rm -rf src/Generated && docker/sdk sync && docker/sdk up