-
Notifications
You must be signed in to change notification settings - Fork 3k
feat(api): add version endpoint for instance identification #2520
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
base: staging
Are you sure you want to change the base?
Conversation
… fixes, subflow resize clamping
…ribe, auth checks, new db indexes
…dioai#2481) The realtime service network policy was missing the custom egress rules section that allows configuration of additional egress rules via values.yaml. This caused the realtime pods to be unable to connect to external databases (e.g., PostgreSQL on port 5432) when using external database configurations. The app network policy already had this section, but the realtime network policy was missing it, creating an inconsistency and preventing the realtime service from accessing external databases configured via networkPolicy.egress values. This fix adds the same custom egress rules template section to the realtime network policy, matching the app network policy behavior and allowing users to configure database connectivity via values.yaml.
…rovements, additional kb tag types
Adds GET /api/version endpoint that returns: - Application version - Application name - Build time (if available) - Git commit hash (if available) - Node environment This helps users identify the version of a running Sim Studio instance. Fixes simstudioai#2014
|
@majiayu000 is attempting to deploy a commit to the Sim Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryAdds a new version endpoint that returns instance identification information including app version, build time, and git commit hash. Key Changes:
Security Consideration:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant API as /api/version
participant Env as Environment Variables
Client->>API: GET /api/version
API->>Env: Read npm_package_version or APP_VERSION
API->>Env: Read BUILD_TIME
API->>Env: Read VERCEL_GIT_COMMIT_SHA or GIT_COMMIT
API->>Env: Read NODE_ENV
Env-->>API: Return environment values
API->>API: Format gitCommit to 7 chars
API-->>Client: Return JSON with version info
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (1)
-
apps/sim/app/api/version/route.ts, line 22 (link)logic: exposing
NODE_ENVcould reveal whether the instance is in development/staging/production, which may aid attackers in reconnaissance
2 files reviewed, 1 comment
Summary
Test plan
curl /api/versionFixes #2014