Skip to content

🐛 Bug Report: _APP_EXECUTOR_HOST is incorrect after upgrading #6137

@stnguyen90

Description

@stnguyen90

👟 Reproduction steps

  1. start with 1.3.8
  2. upgrade to 1.4.x

👍 Expected behavior

The _APP_EXECUTOR_HOST environment variable should be http://executor/v1

👎 Actual Behavior

The _APP_EXECUTOR_HOST environment variable is http://appwrite-executor/v1

This happens because we use the variables from a previous installation as the default for the next installation:

foreach ($env->list() as $key => $value) {
if (is_null($value)) {
continue;
}
foreach ($vars as $i => $var) {
if ($var['name'] === $key) {
$vars[$i]['default'] = $value;
}
}
}

Instead, we should force this variable to use our configured default. We can do this by adding overwrite to variables.php:

            [
                'name' => '_APP_EXECUTOR_HOST',
                'description' => 'The host used by Appwrite to communicate with the function executor!',
                'introduction' => '0.13.0',
                'default' => 'http://appwrite-executor/v1',
                'required' => false,
+               'overwrite' => true,
                'question' => '',
                'filter' => ''
            ],

and then in install.php, we can ignore it from the existing installation:

if (is_null($value)) {

if (is_null($value)) {

🎲 Appwrite version

Version 1.4.x

💻 Operating system

Linux

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions