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

Hey Team, i would like to implement the following behaviour for my local environment (

Options
U02UR8WNS9W
U02UR8WNS9W Posts: 14 🧑🏻‍🚀 - Cadet

Hey Team, i would like to implement the following behaviour for my local environment (https://docs.spryker.com/docs/scos/dev/architecture/code-buckets.html#defining-the-code-buckets-to-execute), meaning i want to have one Store DE with two endpoints www.de.store.local and www.de-store.local. i want www.de.store.local to use Code bucket "A" and www.de-store.local to use Code bucket "B" like a A/B-Testing case, but i couldn´t find any reference how to configure that with docker/sdk and the following example code is not documented and therefore also does not work, but i would assume it would need a similar solution to make it work locally. Any one any suggestions?

groups:
    DE:
    region: EU
    applications:
      yves:
        application: yves
        endpoints:
          www.de.store.local:
            store: DE
            environment:
              SPRYKER_CODE_BUCKET: A
          www.de-store.local:
            store: DE
            environment:
              SPRYKER_CODE_BUCKET: B

Comments

  • what is inside your SprykerConfig\CodeBucketConfig ?

  • U02UR8WNS9W
    U02UR8WNS9W Posts: 14 🧑🏻‍🚀 - Cadet
    Options
    public function getCodeBuckets(): array
    {
        return [
            'A',
            'B',
        ];
    }
    
  • U02UR8WNS9W
    U02UR8WNS9W Posts: 14 🧑🏻‍🚀 - Cadet
    Options

    but CodeBucketConfig is only for all available CodeBuckets no? i would need to set the environment-variable SPRYKER_CODE_BUCKET according to the endpoint i am calling

  • I think you must use SPRYKER_CODE_BUCKET before you run any commend using docker/sdk

  • U02UR8WNS9W
    U02UR8WNS9W Posts: 14 🧑🏻‍🚀 - Cadet
    Options

    i do not want to run a command, i want to make an HTTP-Request to the endpoint

  • did you re-boot your env after your changes??

  • U02UR8WNS9W
    U02UR8WNS9W Posts: 14 🧑🏻‍🚀 - Cadet
    Options

    the changes i made are only dummy-code they won´t work as there is no such configuration available for the deploy.*.yml file on the endpoint level. but the documentation i referenced mentions such a behaviour for the PaaS, so my goal was to test this locally. But it seems like that the docker-sdk tool is not able to set environment variables on endpoint level

  • Unknown
    edited January 2023
    Options

    any change to deploy.*.yml require re-boot your env

  • U02UR8WNS9W
    U02UR8WNS9W Posts: 14 🧑🏻‍🚀 - Cadet
    Options

    i know that, but as i wrote above and in the initial thread the configuration i made is only dummy-code

  • How is a dummy code and needs to be worked
    IF you only change it in the deploy file how it will work then ??

  • U02UR8WNS9W
    U02UR8WNS9W Posts: 14 🧑🏻‍🚀 - Cadet
    Options

    in my initial thread i already wrote "i couldn´t find any reference how to configure that with docker/sdk and the following example code is not documented and therefore also does not work, but i would assume it would need a similar solution to make it work locally. Any one any suggestions?"

  • U02UR8WNS9W
    U02UR8WNS9W Posts: 14 🧑🏻‍🚀 - Cadet
    Options

    i do not expect this solution to work, i just want to know how i can make it work, and what i posted is an assumption of mine...

  • U02UR8WNS9W
    U02UR8WNS9W Posts: 14 🧑🏻‍🚀 - Cadet
    Options

    and as this specific case is mentioned in the documentation for the Spryker PaaS i wanted to make it work locally