framework test fixes - #5421
framework test fixes#5421
Conversation
|
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughSummary by CodeRabbit
WalkthroughPostgres-backed configstore and logstore tests now use dedicated schemas through ChangesPostgres test isolation
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies" Comment |
Merge activity
|
Confidence Score: 5/5This looks safe to merge after making schema setup failures visible.
framework/configstore/migrations_test.go Important Files Changed
Reviews (1): Last reviewed commit: "framework test fixes" | Re-trigger Greptile |
|
|
||
| // All objects live in this package's dedicated schema (via search_path in | ||
| // the DSN), isolated from other test packages sharing the same database. |
There was a problem hiding this comment.
Schema Failure Silently Skips Coverage
When PostgreSQL is reachable but the test role cannot create configstore_test, this new branch returns nil, and callers treat that as an unavailable database and skip the PostgreSQL cases. CI can therefore pass without running the affected migration tests instead of reporting the schema-permission error.
* chore: fix migration tests * framework test fixes (#5421) * chore: adds docs for azure model router (#5175) ## Summary Adds a dedicated documentation page for the Azure Model Router provider, explaining how Bifrost automatically falls back to Chat Completions when a model-router deployment is targeted via the Responses API. ## Changes - Added `docs/providers/supported-providers/azure-model-router.mdx` documenting the Azure model-router routing behavior, supported operations, a Mermaid flowchart illustrating the fallback logic, usage examples (REST and Go SDK), and known limitations. - Registered the new page in `docs/docs.json` so it appears in the navigation between the Azure and Bedrock entries. ## Type of change - [ ] Bug fix - [ ] Feature - [ ] Refactor - [x] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [x] Docs ## How to test Navigate to the Azure Model Router page in the rendered docs and verify: - The page appears in the sidebar between Azure and Bedrock. - The Mermaid flowchart renders correctly. - All code examples and notes display as expected. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. This is a documentation-only change with no impact on auth, secrets, or runtime behavior. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable * fix: adds created timestamp for openai text completions (#5407) ## Summary Adds the missing `created` field to `BifrostTextCompletionResponse` to align with the OpenAI text completion response schema, and modernizes the `ExtraParams` type alias from `map[string]interface{}` to the equivalent `map[string]any`. ## Changes - Added `Created int` field with `omitempty` to `BifrostTextCompletionResponse`, representing the Unix timestamp (in seconds) of when the completion was created — this field was previously absent from the struct despite being part of the API response. - Replaced `map[string]interface{}` with `map[string]any` in `TextCompletionParameters.ExtraParams` to use the modern Go type alias. ## Type of change - [ ] Bug fix - [ ] Feature - [x] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs ## How to test ```sh go version go test ./... ``` Verify that text completion responses now include the `created` timestamp field when it is non-zero. ## Screenshots/Recordings N/A ## Breaking changes - [ ] Yes - [x] No ## Related issues N/A ## Security considerations None. ## Checklist - [x] I read `docs/contributing/README.md` and followed the guidelines - [x] I added/updated tests where appropriate - [x] I updated documentation where needed - [x] I verified builds succeed (Go and UI) - [x] I verified the CI pipeline passes locally if applicable --------- Co-authored-by: Samyabrata Maji <116789799+sammaji@users.noreply.github.com> Co-authored-by: Samyabrata Maji <samyabratamaji334@gmail.com>
* chore: fix migration tests * framework test fixes (maximhq#5421) * chore: adds docs for azure model router (maximhq#5175) ## Summary Adds a dedicated documentation page for the Azure Model Router provider, explaining how Bifrost automatically falls back to Chat Completions when a model-router deployment is targeted via the Responses API. ## Changes - Added `docs/providers/supported-providers/azure-model-router.mdx` documenting the Azure model-router routing behavior, supported operations, a Mermaid flowchart illustrating the fallback logic, usage examples (REST and Go SDK), and known limitations. - Registered the new page in `docs/docs.json` so it appears in the navigation between the Azure and Bedrock entries. ## Type of change - [ ] Bug fix - [ ] Feature - [ ] Refactor - [x] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [x] Docs ## How to test Navigate to the Azure Model Router page in the rendered docs and verify: - The page appears in the sidebar between Azure and Bedrock. - The Mermaid flowchart renders correctly. - All code examples and notes display as expected. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. This is a documentation-only change with no impact on auth, secrets, or runtime behavior. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable * fix: adds created timestamp for openai text completions (maximhq#5407) ## Summary Adds the missing `created` field to `BifrostTextCompletionResponse` to align with the OpenAI text completion response schema, and modernizes the `ExtraParams` type alias from `map[string]interface{}` to the equivalent `map[string]any`. ## Changes - Added `Created int` field with `omitempty` to `BifrostTextCompletionResponse`, representing the Unix timestamp (in seconds) of when the completion was created — this field was previously absent from the struct despite being part of the API response. - Replaced `map[string]interface{}` with `map[string]any` in `TextCompletionParameters.ExtraParams` to use the modern Go type alias. ## Type of change - [ ] Bug fix - [ ] Feature - [x] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs ## How to test ```sh go version go test ./... ``` Verify that text completion responses now include the `created` timestamp field when it is non-zero. ## Screenshots/Recordings N/A ## Breaking changes - [ ] Yes - [x] No ## Related issues N/A ## Security considerations None. ## Checklist - [x] I read `docs/contributing/README.md` and followed the guidelines - [x] I added/updated tests where appropriate - [x] I updated documentation where needed - [x] I verified builds succeed (Go and UI) - [x] I verified the CI pipeline passes locally if applicable --------- Co-authored-by: Samyabrata Maji <116789799+sammaji@users.noreply.github.com> Co-authored-by: Samyabrata Maji <samyabratamaji334@gmail.com>
* chore: fix migration tests * framework test fixes (maximhq#5421) * chore: adds docs for azure model router (maximhq#5175) ## Summary Adds a dedicated documentation page for the Azure Model Router provider, explaining how Bifrost automatically falls back to Chat Completions when a model-router deployment is targeted via the Responses API. ## Changes - Added `docs/providers/supported-providers/azure-model-router.mdx` documenting the Azure model-router routing behavior, supported operations, a Mermaid flowchart illustrating the fallback logic, usage examples (REST and Go SDK), and known limitations. - Registered the new page in `docs/docs.json` so it appears in the navigation between the Azure and Bedrock entries. ## Type of change - [ ] Bug fix - [ ] Feature - [ ] Refactor - [x] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [x] Docs ## How to test Navigate to the Azure Model Router page in the rendered docs and verify: - The page appears in the sidebar between Azure and Bedrock. - The Mermaid flowchart renders correctly. - All code examples and notes display as expected. ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. This is a documentation-only change with no impact on auth, secrets, or runtime behavior. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [x] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable * fix: adds created timestamp for openai text completions (maximhq#5407) ## Summary Adds the missing `created` field to `BifrostTextCompletionResponse` to align with the OpenAI text completion response schema, and modernizes the `ExtraParams` type alias from `map[string]interface{}` to the equivalent `map[string]any`. ## Changes - Added `Created int` field with `omitempty` to `BifrostTextCompletionResponse`, representing the Unix timestamp (in seconds) of when the completion was created — this field was previously absent from the struct despite being part of the API response. - Replaced `map[string]interface{}` with `map[string]any` in `TextCompletionParameters.ExtraParams` to use the modern Go type alias. ## Type of change - [ ] Bug fix - [ ] Feature - [x] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [x] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [ ] UI (React) - [ ] Docs ## How to test ```sh go version go test ./... ``` Verify that text completion responses now include the `created` timestamp field when it is non-zero. ## Screenshots/Recordings N/A ## Breaking changes - [ ] Yes - [x] No ## Related issues N/A ## Security considerations None. ## Checklist - [x] I read `docs/contributing/README.md` and followed the guidelines - [x] I added/updated tests where appropriate - [x] I updated documentation where needed - [x] I verified builds succeed (Go and UI) - [x] I verified the CI pipeline passes locally if applicable --------- Co-authored-by: Samyabrata Maji <116789799+sammaji@users.noreply.github.com> Co-authored-by: Samyabrata Maji <samyabratamaji334@gmail.com>

Summary
Test packages (
configstore,configstore/tables, andlogstore) run in parallel against the same Postgres database, which previously caused race conditions where one package's setup/teardown would clobber another's tables. This PR isolates each test package into its own dedicated Postgres schema so they can run concurrently without interfering with each other.Changes
pgTestSchemaconstant with a unique schema name (configstore_test,configstore_tables_test,logstore_test) and appendssearch_path=<schema>to its DSN so all DDL and DML is scoped to that schema automatically.CREATE SCHEMA IF NOT EXISTS <schema>before running any migrations or table operations.configstorewas updated to drop and recreate only its own schema instead of the sharedpublicschema, preventing it from destroying tables owned by other test packages.migrationstable intact for concurrent packages) were simplified now that each package has full ownership of its own schema.Type of change
Affected areas
How to test
Each package should complete without errors related to missing or unexpectedly modified tables.
Breaking changes
Related issues
Security considerations
No security implications. Changes are limited to test infrastructure.
Checklist
docs/contributing/README.mdand followed the guidelines