Closed shanzez closed 2 months ago
I think the issue is here: https://github.com/zulip/docker-zulip/blob/cd7692a7e6648e5a1da79fa71812428cd250b582/entrypoint.sh#L92
Not sure if that is the only place (since I'm not getting past that point). Something like this might work:
if [ -z "$TYPE" ]; then
case "$2" in
[Tt][Rr][Uu][Ee]|[Ff][Aa][Ll][Ss][Ee]|[Nn]one)
TYPE="bool"
;;
[1-9][0-9]*)
if [[ "$2" =~ ^[1-9][0-9]*$ ]]; then
TYPE="integer"
else
TYPE="string"
fi
;;
[\[\(]*[\]\)])
TYPE="array"
;;
*)
TYPE="string"
;;
esac
fi
The problem, I think, is that the case statement finds numbers in the value and classifies it as an integer. Since we cannot use regex in the case statement, I pushed it into that case item.
Example value in a docker-compose.yml: SETTING_SOCIAL_AUTH_GITHUB_KEY: 87ca9786478bf2d7021a
It appears that this fix: https://github.com/zulip/docker-zulip/commit/0d72546a4cb183c985de6d96873ac5508cfd3ce3
is what is causing my issue. I understand it, but if I just revert back before this, I'll be working. I'll try it.
Well, testing with 8.2-0 did resolve that issue.
Fixed:
2024-04-03 11:23:56 Adding authentication backend "GitHubAuthBacken".
2024-04-03 11:23:56 Authentication backend activation succeeded.
2024-04-03 11:23:56 Executing Zulip configuration ...
2024-04-03 11:23:56 Setting key "EMAIL_HOST", type "string" in file "/etc/zulip/settings.py".
2024-04-03 11:23:56 Setting key "EMAIL_HOST_USER", type "string" in file "/etc/zulip/settings.py".
2024-04-03 11:23:56 Setting key "EMAIL_PORT", type "integer" in file "/etc/zulip/settings.py".
2024-04-03 11:23:56 Setting key "EMAIL_USE_SSL", type "bool" in file "/etc/zulip/settings.py".
2024-04-03 11:23:56 Setting key "EMAIL_USE_TLS", type "bool" in file "/etc/zulip/settings.py".
2024-04-03 11:23:56 Setting key "EXTERNAL_HOST", type "string" in file "/etc/zulip/settings.py".
2024-04-03 11:23:56 Setting key "MEMCACHED_LOCATION", type "string" in file "/etc/zulip/settings.py".
2024-04-03 11:23:56 Setting key "RABBITMQ_HOST", type "string" in file "/etc/zulip/settings.py".
2024-04-03 11:23:56 Setting key "RABBITMQ_USER", type "string" in file "/etc/zulip/settings.py".
2024-04-03 11:23:56 Setting key "RATE_LIMITING", type "bool" in file "/etc/zulip/settings.py".
2024-04-03 11:23:56 Setting key "REDIS_HOST", type "string" in file "/etc/zulip/settings.py".
2024-04-03 11:23:56 Setting key "REDIS_PORT", type "integer" in file "/etc/zulip/settings.py".
2024-04-03 11:23:56 Setting key "SOCIAL_AUTH_GITHUB_KEY", type "string" in file "/etc/zulip/settings.py".
2024-04-03 11:23:56 Setting key "SOCIAL_AUTH_GITHUB_ORG_NAME", type "string" in file "/etc/zulip/settings.py".
2024-04-03 11:23:56 Setting key "ZULIP_ADMINISTRATOR", type "string" in file "/etc/zulip/settings.py".
2024-04-03 11:23:59 Zulip configuration succeeded.
2024-04-03 11:23:59 Auto backup enabled.
.....
2024-04-03 11:24:36 Applying zerver.0496_alter_scheduledmessage_read_by_sender... OK
2024-04-03 11:24:37 Congratulations! You have successfully configured your Zulip database.
2024-04-03 11:24:37 If you haven't already, you should configure email in /etc/zulip/settings.py.
2024-04-03 11:24:37
2024-04-03 11:24:37 Next, run as the zulip user (use 'su zulip' if needed):
2024-04-03 11:24:37
2024-04-03 11:24:37 /home/zulip/deployments/current/manage.py generate_realm_creation_link
2024-04-03 11:24:37
2024-04-03 11:24:37 This generates a secure, single-use link that you you can use to set up
2024-04-03 11:24:37 a Zulip organization from the convenience of your web browser.
2024-04-03 11:24:37 Zulip first start init sucessful.
2024-04-03 11:24:37 Migrating Zulip to new version ...
2024-04-03 11:24:39 Operations to perform:
2024-04-03 11:24:39 Apply all migrations: analytics, auth, confirmation, contenttypes, otp_static, otp_totp, phonenumber, sessions, social_django, zerver
2024-04-03 11:24:39 Running migrations:
2024-04-03 11:24:39 No migrations to apply.
2024-04-03 11:24:39 Zulip migration succeeded.
2024-04-03 11:24:39 Post setup scripts execution ...
2024-04-03 11:24:39 No post-setup.d folder found. Continuing.
2024-04-03 11:24:39 === End Bootstrap Phase ===
This is definitely not intended:
ZULIP_AUTH_BACKENDS: GitHubAuthBacken
(missing "d" at the end). Testing with this fixed.
Update: With that typo fixed, 8.2-0 works with the GITHUB values setup in the docker-compose.yml. I'm able to generate the new org link and setup the new org. So, anything beyond the issue I found with docker-zulip/entrypoint.sh was mine and can be ignored.
is it related to https://github.com/zulip/docker-zulip/issues/433 ?
Yes, looks like the same. The PR is created should fix it. For now, the solution is to stick with 8.2-0.
I've released 8.3-1 which resolves this. Sorry for the trouble!
I'm getting a failure on start-up when I set the following in my docker-compose.yml:
It appears that it is the
SETTING_SOCIAL_AUTH_GITHUB_KEY
value. I see this in the docker log:I see, specifically:
But my key (i.e. Client ID) is not an integer. In fact, I checked 3 of my Client IDs and they all appear to be hex.
Later on in the log I see:
I will look back in the code to see if this has always been this way or if it was a recent change. Right now, I don't have a way around it.
Of course if I remove that setting from my docker-compose.yml, it loads up just fine, so it does appear to be that one value (SOCIAL_AUTH_GITHUB_KEY) that is causing the failure to load.