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
dmjb merged 2 commits into
mainfrom
update-service-client
Mar 12, 2025
Merged

Use updates.codegate.ai for /versions instead of GitHub#1264
dmjb merged 2 commits into
mainfrom
update-service-client

Conversation

@dmjb

@dmjb dmjb commented Mar 11, 2025

Copy link
Copy Markdown
Contributor

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.

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa

Copy link
Copy Markdown
Contributor 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
Comment thread src/codegate/config.py
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
Copy Markdown
Contributor 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.

@alex-mcgovern alex-mcgovern left a comment

Copy link
Copy Markdown
Contributor

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
@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