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

Heya gonna bump this

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

Comments

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

    nuked the docker dir and re-cloned from GH

    ran a hard reset:

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

    ran docker/sdk clean

    unison:2.51.2.1 /usr/local/bin/precopy_appsync
    doing initial sync with unison
    

    Seems like using unison, but at this point think that might be a red herring

    lled in /data/vendor/zendframework/zend-config/src/Factory.php on line 127 
    in /data/vendor/zendframework/zend-config/src/Config.php (55)
    
    Command: vendor/bin/console transfer:entity:generate
    

    Looks like this error is happening inside the container... fails after fresh install on both mac and linux: ❯ docker -v
    Docker version 20.10.2, build 2291f61
    ❯ docker-compose -v
    docker-compose version 1.27.4, build 40524192

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

    not sure if this is a problem with my config files or the docker repo itself...

  • U01JBB8LNTE
    U01JBB8LNTE Posts: 207 πŸ§‘πŸ»β€πŸš€ - Cadet
    CONTAINER ID   NAME                              CPU %     MEM USAGE / LIMIT     MEM %     NET I/O          BLOCK I/O       PIDS
    bff59d0c6235   spryker_b2c_dev_cli_1             0.00%     56.83MiB / 3.846GiB   1.44%     24.4MB / 294kB   86kB / 69.8MB   11
    6baef6b0ca17   spryker_b2c_dev_cli_ssh_relay_1   0.00%     892KiB / 3.846GiB     0.02%     1.51kB / 0B      0B / 0B         1
    199fceaad53b   spryker_b2c_dev_dev_data_sync     0.09%     138.2MiB / 3.846GiB   3.51%     1.12kB / 0B      6.4MB / 926kB   5
    

    the first couple containers seem to get going

  • UKHGSB6TW
    UKHGSB6TW Posts: 10 πŸ§‘πŸ»β€πŸš€ - Cadet

    Seems like one of the {some-name}.schema.xml files has no table definition. Finding out which file caused the error and viewing its content could point out what to do next

  • UKHGSB6TW
    UKHGSB6TW Posts: 10 πŸ§‘πŸ»β€πŸš€ - Cadet

    Usually the content of these Files look something like this

    <?xml version="1.0"?>
    <database xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance>" name="zed" xsi:noNamespaceSchemaLocation="<http://static.spryker.com/schema-01.xsd>" namespace="Orm\Zed\ProductGroup\Persistence" package="src.Orm.Zed.ProductGroup.Persistence">
    
        <table name="some_table_name">
            ...
        </table>
    
    </database>
    

    i was able to reproduce this "Argument 1 passed to Zend\Config\Config::__construct() must be of the type array, string given" Exception by removing the

    <

    table>-Tags and its content

    <?xml version="1.0"?>
    <database xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance>" name="zed" xsi:noNamespaceSchemaLocation="<http://static.spryker.com/schema-01.xsd>" namespace="Orm\Zed\ProductGroup\Persistence" package="src.Orm.Zed.ProductGroup.Persistence">
    
       <!-- no table-tag here -->
    
    </database>
    
  • Good morning! This is most likely the one created with the code generator! There is a to-do tag inside that schema definition. At this point I usually like to bring up the book 'Pragmatic Programmer' which says to that situation 'Don't trust the evil wizard'! :male_mage:😊

  • Totally agreed that we need to improve the error message here

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

    Alright found it... it was the string reverser data...

    locally it is in src/Orm/Propel/Schema/pyz_string_reverser.schema.xml, but the error is occurring on docker/sdk up --build --assets --data I'm assuming in the same space only /data/... the containers must share volumes or something...

    Don't seem to be able to un-generate this file with the docker commands, tried docker/sdk clean-data && docker/sdk clean reset

    so it's local? but then if it's local why is it not working when clone both things fresh on a new environment... I did shell into the container and edit some things... but that shouldn't matter, doesn't the container get nuked each time?

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

    src/Orm/Propel/Schema is gitignored so I'm guessing it's generated... ?

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

    so where is it building the incorrect data from... ? I need to scrub something... but it must be stashed in the image or the container somewhere...

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

    so it must have an incorrect record from the last image stored in... one of these...

    spryker_b2c_dev_frontend                        dev            56cf85947fdf   About an hour ago   22.4MB
    spryker_b2c_dev_frontend                        dev-frontend   56cf85947fdf   About an hour ago   22.4MB
    spryker_b2c_dev_base_frontend                   dev            56cf85947fdf   About an hour ago   22.4MB
    spryker_docker_sdk                              latest         0120e65a52c8   About an hour ago   246MB
    spryker_b2c_dev_run_cli                         dev            4ddfbd785f5f   2 days ago          310MB
    spryker_b2c_dev_cli                             dev            a4dc244be7f3   2 days ago          310MB
    spryker_b2c_dev_base_cli                        dev            55346a9df947   2 days ago          310MB
    spryker_b2c_dev_run_app                         dev            d96a67d0eb04   2 days ago          291MB
    spryker_b2c_dev_run_app                         dev-glue_eu    d96a67d0eb04   2 days ago          291MB
    spryker_b2c_dev_run_app                         dev-glue_us    d96a67d0eb04   2 days ago          291MB
    spryker_b2c_dev_run_app                         dev-yves_eu    d96a67d0eb04   2 days ago          291MB
    spryker_b2c_dev_run_app                         dev-yves_us    d96a67d0eb04   2 days ago          291MB
    spryker_b2c_dev_run_app                         dev-zed_eu     d96a67d0eb04   2 days ago          291MB
    spryker_b2c_dev_run_app                         dev-zed_us     d96a67d0eb04   2 days ago          291MB
    spryker_b2c_dev_local_app                       dev            25c5386c80c0   2 days ago          244MB
    spryker_b2c_dev_app                             dev            95c9713ab7a1   2 days ago          244MB
    spryker_b2c_dev_app                             dev-glue_eu    95c9713ab7a1   2 days ago          244MB
    spryker_b2c_dev_app                             dev-glue_us    95c9713ab7a1   2 days ago          244MB
    spryker_b2c_dev_app                             dev-yves_eu    95c9713ab7a1   2 days ago          244MB
    spryker_b2c_dev_app                             dev-yves_us    95c9713ab7a1   2 days ago          244MB
    spryker_b2c_dev_app                             dev-zed_eu     95c9713ab7a1   2 days ago          244MB
    spryker_b2c_dev_app                             dev-zed_us     95c9713ab7a1   2 days ago          244MB
    spryker_b2c_dev_base_app                        dev            28da5cfb429a   2 days ago          244MB
    rediscommander/redis-commander                  latest         bd77d21043ee   7 days ago          90MB
    
  • U01JBB8LNTE
    U01JBB8LNTE Posts: 207 πŸ§‘πŸ»β€πŸš€ - Cadet

    ok so If I go into docker/sdk cli I can see the file, but if I edit that then it gets regenerated, so this is being written from somewhere else... the database I'm guessing? How do I delete the incorrect record in the db?

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

    hm... so maybe I need to login through psql? There isn't a better way like nuke the db and rewrite from the xml files? or step teh container back...

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

    OMG think I got it, that was a bit painful. The evil wizard was def at work here, but Saruman shall not triumph.

    It was a generated file from a few commits back, I hadn't run the generate command at the time, but when I ran it later it wrote it in...

    It was a bit confusing to debug because StringReverser and StringReverser both occurred, one was from the architecture walkthrough the other was from TDD

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

    Ok, with the help of Treebeard and the Ent Moot we've banished Saruman to the Necromancers old tower. All tests green. thanks for your help @UJN2JRU4F @UKHGSB6TW πŸ™

  • Next stop Mordor? :male_mage: