Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Use updates.codegate.ai for /versions instead of GitHub #1264

Merged
merged 2 commits into from
Mar 12, 2025

Conversation

dmjb
Copy link
Member

@dmjb dmjb commented Mar 11, 2025

Wire up CodeGate to use the new update service to determine the latest version. This is kept behind a config flag, but I have tested locally.

@@ -9,8 +9,6 @@
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes like this were the result of applying the linter.

Wire up CodeGate to use the new update service to determine the latest
version. This is kept behind a config flag, but I have tested locally.
@dmjb dmjb force-pushed the update-service-client branch from dd1cec1 to 1e27b1d Compare March 11, 2025 15:58
@@ -209,11 +215,17 @@ def from_env(cls) -> "Config":
if "CODEGATE_SERVER_KEY" in os.environ:
config.server_key = os.environ["CODEGATE_SERVER_KEY"]
if "CODEGATE_FORCE_CERTS" in os.environ:
config.force_certs = os.environ["CODEGATE_FORCE_CERTS"]
config.force_certs = cls.__bool_from_string(os.environ["CODEGATE_FORCE_CERTS"])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix for a bug I spotted while working on this part of the code: force_certs expects a bool, but in this line we assign a string to the value. The likely consequence of this is that if someone explicitly sets this value to false in an env var, it will end up evaluating to True when treated as a boolean.

Copy link
Contributor

@alex-mcgovern alex-mcgovern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't spot anything weird — looks good to me, frontend still works.

Screenshot 2025-03-11 at 4 21 07 PM

Only question is do we need the config flag? Can we not just validate roughly on this branch and include in next release?

@dmjb dmjb merged commit 17731aa into main Mar 12, 2025
10 of 11 checks passed
@dmjb dmjb deleted the update-service-client branch March 12, 2025 08:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants