Calling Developers!
We are reenergizing our code contribution process! Learn More

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..

Good morning, another question regarding `docker/sdk` build process. We have a problem that during t

USZ0XG6SK
USZ0XG6SK Posts: 111 🧑🏻‍🚀 - Cadet

Good morning, another question regarding docker/sdk build process. We have a problem that during the build process data/translation directory goes missing. Or is this the expected behaviour and we should do some post deployment actions? Check thread for more specific details.

Comments

  • USZ0XG6SK
    USZ0XG6SK Posts: 111 🧑🏻‍🚀 - Cadet

    We have a problem that the data/translation directory doesn’t exist in our containers. We checked the build logs and as far as we can see this directory was never included in the image.
    Pipeline copies the directory correct, but it seems that it is not taken in one of the steps in docker/sdk build process.

    Here are the excerpts from the build instructions and the respective logs:

      pre_build:
        commands:
          - docker version
          - env
          - $(aws ecr get-login --no-include-email --region ${AWS_DEFAULT_REGION} --registry-ids ${AWS_ACCOUNT_ID})
          - git clone ${SPRYKER_SDK_REPO} -b ${SPRYKER_SDK_BRANCH} ./docker
          - cd ./docker
          - git branch -a
          - cd ${CODEBUILD_SRC_DIR}
          - ls -lha
          - ls -lha data
    
    [Container] 2020/07/02 09:10:50 Running command cd ${CODEBUILD_SRC_DIR}
    207
    208[Container] 2020/07/02 09:10:50 Running command ls -lha
    209total 2.1M
    210drwxr-xr-x 11 root root 4.0K Jul  2 09:10 .
    211drwxr-xr-x  4 root root 4.0K Jul  2 09:10 ..
    212-rw-r--r--  1 root root  150 Jul  2 09:10 .dockerignore
    213-rw-r--r--  1 root root  330 Jul  2 09:10 .editorconfig
    214-rw-r--r--  1 root root 8.1K Jul  2 09:10 .eslintrc.js
    215-rw-r--r--  1 root root  414 Jul  2 09:10 .gitattributes
    216-rw-r--r--  1 root root  422 Jul  2 09:10 .githook
    217drwxr-xr-x  2 root root 4.0K Jul  2 09:10 .github
    218-rw-r--r--  1 root root 1.4K Jul  2 09:10 .gitignore
    219-rw-r--r--  1 root root  558 Jul  2 09:10 .gitlab-ci.yml
    220-rw-r--r--  1 root root  163 Jul  2 09:10 .license
    221-rw-r--r--  1 root root    5 Jul  2 09:10 .nvmrc
    222-rw-r--r--  1 root root  249 Jul  2 09:10 .scrutinizer.yml
    223-rw-r--r--  1 root root 6.8K Jul  2 09:10 .stylelintrc
    224-rw-r--r--  1 root root 8.4K Jul  2 09:10 .travis.yml
    225-rw-r--r--  1 root root 3.9K Jul  2 09:10 LICENSE
    226-rw-r--r--  1 root root 1018 Jul  2 09:10 README.md
    227drwxr-xr-x  2 root root 4.0K Jul  2 09:10 ci
    228-rw-r--r--  1 root root 1.1K Jul  2 09:10 codeception.acceptance.yml
    229-rw-r--r--  1 root root  702 Jul  2 09:10 codeception.api.yml
    230-rw-r--r--  1 root root  683 Jul  2 09:10 codeception.functional.yml
    231-rw-r--r--  1 root root  990 Jul  2 09:10 codeception.yml
    232-rw-r--r--  1 root root  226 Jul  2 09:10 composer.ci.json
    233-rw-r--r--  1 root root  12K Jul  2 09:10 composer.json
    234-rw-r--r--  1 root root 1.4M Jul  2 09:10 composer.lock
    235drwxr-xr-x  7 root root 4.0K Jul  2 09:10 config
    236drwxr-xr-x  4 root root 4.0K Jul  2 09:10 data
    237-rw-r--r--  1 root root 2.7K Jul  2 09:10 deploy.ci.yml
    238-rw-r--r--  1 root root 2.4K Jul  2 09:10 deploy.dev.yml
    239-rw-r--r--  1 root root 2.0K Jul  2 09:10 deploy.yml
    240drwxr-xr-x  9 root root 4.0K Jul  2 09:10 docker
    241drwxr-xr-x  5 root root 4.0K Jul  2 09:10 frontend
    242-rw-r--r--  1 root root  13K Jul  2 09:10 newrelic.ini
    243-rw-r--r--  1 root root 411K Jul  2 09:10 package-lock.json
    244-rw-r--r--  1 root root 2.4K Jul  2 09:10 package.json
    245-rw-r--r--  1 root root 1.4K Jul  2 09:10 phpstan-bootstrap.php
    246-rw-r--r--  1 root root   24 Jul  2 09:10 phpstan.json
    247-rw-r--r--  1 root root  467 Jul  2 09:10 phpstan.neon
    248drwxr-xr-x  5 root root 4.0K Jul  2 09:10 public
    249-rw-r--r--  1 root root  147 Jul  2 09:10 setup
    250drwxr-xr-x  4 root root 4.0K Jul  2 09:10 src
    251-rw-r--r--  1 root root 1.2K Jul  2 09:10 test-autoload.php
    252drwxr-xr-x  5 root root 4.0K Jul  2 09:10 tests
    253-rw-r--r--  1 root root 1.4K Jul  2 09:10 tsconfig.json
    254-rw-r--r--  1 root root 7.7K Jul  2 09:10 tslint.json
    255-rwxr-xr-x  1 root root  473 Jul  2 09:10 warmup.sh
    256
    257[Container] 2020/07/02 09:10:50 Running command ls -lha data
    258total 16K
    259drwxr-xr-x  4 root root 4.0K Jul  2 09:10 .
    260drwxr-xr-x 11 root root 4.0K Jul  2 09:10 ..
    261drwxr-xr-x  4 root root 4.0K Jul  2 09:10 import
    262drwxr-xr-x  3 root root 4.0K Jul  2 09:10 translation
    

    So far all good.
    The following will be executed afterwards:

      build:
        commands:
          - env
          - ./docker/sdk boot
          - ./docker/sdk build
    

    For this we found the following logs:

  • USZ0XG6SK
    USZ0XG6SK Posts: 111 🧑🏻‍🚀 - Cadet
    #26 [spryker_app  1/10] COPY --chown=spryker:spryker data /data/data
    2743#26       digest: sha256:3161f1a84c2f2073b2d146bd0db3e1ba9e26220812f7198fa0ba4d7ce0d06f5b
    2744#26         name: "[spryker_app  1/10] COPY --chown=spryker:spryker data /data/data"
    2745#26      started: 2020-07-02 09:12:12.395121112 +0000 UTC
    2746#26    completed: 2020-07-02 09:12:12.703731913 +0000 UTC
    2747#26     duration: 308.610801ms
    

    As we can see the whole data/data directory is copied. What we can’t find out is why the translation directory isn’t.
    We are using doscker/sdk version 1.10.1.

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet
    edited July 2020
  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    But also check your .dockerignore file

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    It should contain !data/translations

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet
    /data
    !/data/import
    !/data/translation
    
  • USZ0XG6SK
    USZ0XG6SK Posts: 111 🧑🏻‍🚀 - Cadet

    Hi Mike, so there are 2 actions that need to be done in order to fix the issue?
    1. use docker/sdk v1.15.0
    2. add !data/translation to project .dockerignore

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    Yes, it seems.

  • USZ0XG6SK
    USZ0XG6SK Posts: 111 🧑🏻‍🚀 - Cadet

    ok, will try, thank you

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet
    edited July 2020
    308.610801ms
    

    Is that expected for copying /data?

  • USZ0XG6SK
    USZ0XG6SK Posts: 111 🧑🏻‍🚀 - Cadet

    too fast or what are you thinking?

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    too slow…

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    or that is just 300ms?

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    If so it is ok.

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet

    At some moment I have seen 300 seconds in my mind. :))

  • USZ0XG6SK
    USZ0XG6SK Posts: 111 🧑🏻‍🚀 - Cadet

    should be 300ms

    started: 2020-07-02 09:12:12.395121112    completed: 2020-07-02 09:12:12.703731913
    
  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet
    edited July 2020

    Yeah, my bad.