Skip to content

Commit

Permalink
Fix JS tests, update files validation response error (#1347)
Browse files Browse the repository at this point in the history
* Remove env vars causing docker failure

* always teset

* Use docker logs

* Fix validation response error for update files

* Use the r2r-r2r-1 logs

* pre-commit
  • Loading branch information
NolanTrem authored Oct 5, 2024
1 parent fbd910a commit ac7f283
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 20 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/r2r-js-sdk-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@ name: R2R JS SDK Integration Tests

on:
push:
branches: [main]
paths:
- 'js/sdk/**'
pull_request:
branches: [main]
paths:
- 'js/sdk/**'
branches:
- '**' # Trigger on all branches

jobs:
test:
Expand All @@ -33,12 +28,6 @@ jobs:
- name: Start R2R server
env:
POSTGRES_HOST: ${{ secrets.POSTGRES_HOST }}
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
POSTGRES_PORT: ${{ secrets.POSTGRES_PORT }}
POSTGRES_DBNAME: ${{ secrets.POSTGRES_DBNAME }}
R2R_PROJECT_NAME: ${{ secrets.R2R_PROJECT_NAME }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
r2r serve --docker
Expand All @@ -58,11 +47,11 @@ jobs:
- name: Display R2R server logs if server not responding
if: failure()
run: cat r2r_server.log
run: docker logs r2r-r2r-1

- name: Run integration tests
run: npm run test

- name: Display R2R server logs if tests fail
if: failure()
run: cat r2r_server.log
run: docker logs r2r-r2r-1
2 changes: 1 addition & 1 deletion docs/introduction/whats-new.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ icon: 'bell'
## Version 0.3.20 — Sep. 6, 2024

### New Features
- [R2R Light](https://r2r-docs.sciphi.ai/documentation/installation/light/local-system) installation added
- [R2R Light](https://r2r-docs.sciphi.ai/documentation/installation/light/local-system) installation added
- Removed Neo4j and implemented GraphRAG inside of Postgres
- Improved efficiency and configurability of knowledge graph construction process

Expand Down
1 change: 0 additions & 1 deletion js/sdk/__tests__/r2rClientIntegrationSuperUser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ describe("r2rClient Integration Tests", () => {
).resolves.not.toThrow();
});

// TOOD: Fix in R2R, table logs has no column named run_id
test("Agentic RAG response with streaming", async () => {
const messages = [
{ role: "system", content: "You are a helpful assistant." },
Expand Down
4 changes: 3 additions & 1 deletion py/core/main/api/ingestion_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,13 @@ async def update_files_app(
"is_update": True,
}

raw_message = await self.orchestration_provider.run_workflow(
raw_message: dict[str, Union[str, None]] = await self.orchestration_provider.run_workflow( # type: ignore
"update-files", {"request": workflow_input}, {}
)
raw_message["message"] = "Update task queued successfully."
raw_message["document_ids"] = workflow_input["document_ids"]
if "task_id" not in raw_message:
raw_message["task_id"] = None
return raw_message # type: ignore

ingest_chunks_extras = self.openapi_extras.get("ingest_chunks", {})
Expand Down
1 change: 0 additions & 1 deletion py/core/providers/orchestration/hatchet.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def get_worker(self, name: str, max_threads: Optional[int] = None) -> Any:
self.worker = self.orchestrator.worker(name, max_threads)
return self.worker


def concurrency(self, *args, **kwargs) -> Callable:
return self.orchestrator.concurrency(*args, **kwargs)

Expand Down
2 changes: 1 addition & 1 deletion py/shared/api/models/ingestion/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class UpdateResponse(BaseModel):
...,
description="A message describing the result of the ingestion request.",
)
task_id: UUID = Field(
task_id: Optional[UUID] = Field(
...,
description="The task ID of the ingestion request.",
)
Expand Down

0 comments on commit ac7f283

Please sign in to comment.