Issues with 0.13
# 💻|contributing
b
Seems like there's now a cooldown with the #1044642930075373588 so posting it here: # Issue with Project level variables and reusability Check this kapa post for context https://discord.com/channels/817392104711651328/1120389258683883692/1242341370438488194. In Garden 0.12 I was able to create variables in a single place and consume them all over my project. Using the following syntax
Copy code
kind: Project
name: project
defaultEnvironment: local
dotIgnoreFile: .gitignore

variables:
  user-namespace: local-env
  base-hostname: local.app.garden
  # Globally usable
  RABBIT_URL: amqp://rabbitmq:5672
  REDIS_URL: redis://redis:6379
And then I was able to reference it from any kind of resource; tasks, helm deployment, etc. Example:
Copy code
tasks:
  - name: migrations
    command: [/bin/sh, -c]
    args: ["npm run migrations:up"]
    env:
      RABBIT_URL: ${var.RABBIT_URL}
      REDIS_URL: ${var.REDIS_URL}
Now Garden detects them as circular references when I use it in Run actions for example.
Copy code
kind: Run
name: migrations
type: container
spec:
  image: ${actions.build.api-image.outputs.deploymentImageId}
  command: [npm, run, migrations:up]
variables:
  RABBIT_URL: ${var.RABBIT_URL} # This gets detected as as circular dependency
  REDIS_URL: ${var.REDIS_URL}
Error:
Invalid template string (${var.RABBIT_URL}) at path RABBIT_URL: Invalid template string (${var.RABBIT_URL}): Circular reference detected when resolving key var.RABBIT_URL (var.RABBIT_URL)
This is definitely a bad experience because now I need to basically repeat the values in multiple spots or name the variables differently, which makes it incompatible with my 0.12 modules that I get as remote sources...
Between both this one and [this issue](https://discord.com/channels/817392104711651328/1242329292386336830/1242329292386336830) it's been pretty difficult to move to 0.13
This makes it really hard to work with remoteSources; combined with this https://discord.com/channels/817392104711651328/1240198196203098172 I reported it means that I need to control 2 sets of variables ones for the remote sources I'm bringing and ones that are differently called so the circular dependency problem doesn't pop...
Yup, just validated we pretty much can't move to 0.13; using the variables from other modules is impossible because it also marks them as circular dependencies and if I change the name of the variable in the main project obviously the source can't find the variable :/
Copy code
Failed resolving one or more modules:

api-image: Invalid template string (${var.RABBIT_URL}) at path spec.tasks.0.env.RABBIT_URL: Could not find key RABBIT_URL u