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

Service key in $PLATFORM_RELATIONSHIPS must match service name in .platform.app.yaml #57

Closed
lolautruche opened this issue Nov 9, 2022 · 1 comment · Fixed by #68
Closed
Assignees
Labels
bug Something isn't working

Comments

@lolautruche
Copy link
Collaborator

The current scripts that generate the JSON content for $PLATFORM_RELATIONSHIPS currently has an arbitrary fixed key (e.g., database for DB, essearch for Elastic Search, etc.

The value for this key must actually match the name of the relationship that is defined in .platform.app.yaml (example in Bigfoot app):

# .platform.app.yaml

# The relationships of the application with services or other applications.
# The left-hand side is the name of the relationship as it will be exposed
# to the application in the PLATFORM_RELATIONSHIPS variable. The right-hand
# side is in the form `<service name>:<endpoint name>`.
relationships:
    database: "mysqldb:mysql"
    cache: "memcached:memcached"

In the example above, the value to take into account is the relationship key (database, cache).

@lolautruche lolautruche added the bug Something isn't working label Nov 9, 2022
@rfay
Copy link
Member

rfay commented Nov 9, 2022

I'm glad you caught that. I was wondering about it, intending to return to it.

lolautruche added a commit that referenced this issue Dec 1, 2022
- Moved everything in one stanza
- Ensure that `$PLATFORM_RELATIONSHIPS` service keys match relationships
  names defined in `.platform.app.yaml` (Fix #57)
- Added notion of "supported" services/databases
lolautruche added a commit that referenced this issue Dec 2, 2022
#68)

* Refactor services relationships building process

- Moved everything in one stanza
- Ensure that `$PLATFORM_RELATIONSHIPS` service keys match relationships
  names defined in `.platform.app.yaml` (Fix #57)
- Added notion of "supported" services/databases

* Add test for oddrelationships

* supported_db_types should have mysql, oracle-mysql, postgresql

* Test for memcached/elasticsearch

* Add database type tests

* Add mismatched-database test

* Fix db-type tests so they work on linux

* Fix relationship building when type is mariadb

* Try again to get ddev/platform database types sorted

* Fix PLATFORM_RELATIONSHIPS test with wordpress-composer

* Add lots more testing of PLATFORM_RELATIONSHIPS

Co-authored-by: Randy Fay <randy@randyfay.com>
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

Successfully merging a pull request may close this issue.

2 participants