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

🐛 Bug Report: _APP_EXECUTOR_HOST is incorrect after upgrading #6137

Closed
2 tasks done
stnguyen90 opened this issue Sep 4, 2023 · 0 comments · Fixed by #6141
Closed
2 tasks done

🐛 Bug Report: _APP_EXECUTOR_HOST is incorrect after upgrading #6137

stnguyen90 opened this issue Sep 4, 2023 · 0 comments · Fixed by #6141
Assignees
Labels
bug Something isn't working
Milestone

Comments

@stnguyen90
Copy link
Contributor

👟 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?

@stnguyen90 stnguyen90 added the bug Something isn't working label Sep 4, 2023
@stnguyen90 stnguyen90 added this to the 1.4.2 milestone Sep 4, 2023
@stnguyen90 stnguyen90 self-assigned this Sep 4, 2023
@stnguyen90 stnguyen90 moved this to Todo in 1.4 release Sep 4, 2023
@stnguyen90 stnguyen90 moved this from Todo to In Progress in 1.4 release Sep 4, 2023
@stnguyen90 stnguyen90 linked a pull request Sep 4, 2023 that will close this issue
2 tasks
@github-project-automation github-project-automation bot moved this from In Progress to Done in 1.4 release Sep 5, 2023
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
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant