-
Notifications
You must be signed in to change notification settings - Fork 391
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
Feature/revive integration tests #1343
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
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.
❌ Changes requested. Reviewed everything up to 9d0c824 in 24 seconds
More details
- Looked at
176
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_eKKYehSlG96uogkx
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
sudo systemctl start postgresql.service | ||
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';" | ||
|
||
# Add your other steps here |
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.
The workflow is missing steps to set up Python, install dependencies, and run the integration tests. These steps were present in the original workflow and are necessary for the integration tests to run.
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.
❌ Changes requested. Incremental review on 32bba85 in 23 seconds
More details
- Looked at
163
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. .github/workflows/integration-test-workflow-debian.yml:25
- Draft comment:
The workflow is missing a step to install and configure PostgreSQL. Ensure PostgreSQL is installed and running before starting the R2R server. - Reason this comment was not posted:
Comment did not seem useful.
Workflow ID: wflow_5OnMlLFKACZ6PkpC
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
py/tests/integration/runner.py
Outdated
|
||
def run_command(command): | ||
result = subprocess.run( | ||
command, shell=True, capture_output=True, text=True |
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.
Using shell=True
can be a security risk if the command includes unsanitized input. Consider using a list of arguments instead, e.g., subprocess.run(['poetry', 'run', 'r2r', 'ingest-sample-files'], capture_output=True, text=True)
.
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.
👍 Looks good to me! Incremental review on 04c437c in 11 seconds
More details
- Looked at
15
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. .github/workflows/integration-test-workflow-debian.yml:43
- Draft comment:
Consider using a loop to check if the R2R server is ready instead of a fixed sleep time. This can prevent unnecessary delays or race conditions. - Reason this comment was not posted:
Confidence changes required:50%
The current implementation uses a fixed sleep time to wait for the R2R server to start. This can lead to unnecessary delays or race conditions if the server takes longer to start.
Workflow ID: wflow_sdEk310BLMq6nEi6
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
❌ Changes requested. Incremental review on 6843c4b in 17 seconds
More details
- Looked at
23
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_mLazMvPY6YJ4S7KN
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
POSTGRES_HOST: ${{ secrets.POSTGRES_HOST }} | ||
POSTGRES_PORT: ${{ secrets.POSTGRES_PORT }} | ||
R2R_PROJECT_NAME: ${{ secrets.R2R_PROJECT_NAME }} | ||
POSTGRES_USER: postgres |
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.
Using hardcoded PostgreSQL credentials is not secure. Consider using GitHub secrets for these values to enhance security.
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.
👍 Looks good to me! Incremental review on 5bebd3b in 8 seconds
More details
- Looked at
29
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. .github/workflows/integration-test-workflow-debian.yml:28
- Draft comment:
Consider enabling PostgreSQL to start on boot for better reliability.
sudo systemctl enable postgresql.service
- Reason this comment was not posted:
Confidence changes required:50%
The installation of PostgreSQL should ensure that the service is enabled to start on boot, which is a common best practice.
Workflow ID: wflow_d1u0NuXeULm0FvJ0
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on 2924dfa in 19 seconds
More details
- Looked at
170
lines of code in4
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. py/tests/conftest.py:75
- Draft comment:
Consider using theapp_config
fixture directly incrypto_provider
instead of passing it as an argument, as it is already available in the session scope. This applies to other fixtures likepostgres_db_provider
,temporary_postgres_db_provider
, andr2r_auth_provider
as well. - Reason this comment was not posted:
Confidence changes required:50%
Theapp_config
fixture is defined but not used in some places where it could be beneficial for consistency and potential future use.
2. .github/workflows/integration-test-workflow-debian.yml:23
- Draft comment:
Usingpkill -f "r2r serve"
can terminate unintended processes if multiple instances are running. Consider using a more specific method to stop the server, such as storing the process ID and killing that specific process. - Reason this comment was not posted:
Confidence changes required:50%
Thepkill
command in the GitHub Actions workflow might terminate unintended processes if multiple instances ofr2r serve
are running. It's safer to use a more specific method to stop the server.
Workflow ID: wflow_yKvjZNQcuALQjYKL
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on b11ce36 in 9 seconds
More details
- Looked at
126
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. .github/workflows/integration-test-workflow-debian.yml:36
- Draft comment:
Consider checking out a specific commit or tag for pgvector to ensure consistent builds. - Reason this comment was not posted:
Confidence changes required:50%
The installation of pgvector in the GitHub Actions workflow is not using a specific version or commit hash. This can lead to potential issues if the repository is updated with breaking changes.
Workflow ID: wflow_kzvRYlIMIaMA28rt
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on dc0fcb1 in 24 seconds
More details
- Looked at
104
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. py/tests/integration/harness_cli.py:88
- Draft comment:
Remove trailing whitespace for cleaner code. This issue is present in multiple places, such as lines 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, and 108. - Reason this comment was not posted:
Confidence changes required:10%
The code contains multiple instances of trailing whitespace, which is unnecessary and should be removed for cleaner code.
2. py/tests/integration/harness_sdk.py:112
- Draft comment:
Remove trailing whitespace for cleaner code. This issue is present in multiple places, such as lines 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, and 138. - Reason this comment was not posted:
Confidence changes required:10%
The code contains multiple instances of trailing whitespace, which is unnecessary and should be removed for cleaner code.
Workflow ID: wflow_wM2hSNaAkKd9TfaT
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on c329e20 in 39 seconds
More details
- Looked at
41
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. .github/workflows/integration-test-workflow-debian.yml:100
- Draft comment:
The test functiontest_delete_and_reingest_sample_file_sdk
is incorrectly named in the workflow file. It should betest_delete_and_reingest_sample_file_cli
to match the function inharness_sdk.py
. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment suggests a mismatch between the function name and the file path, but the diff shows a change that aligns the function name with the SDK path. This indicates that the change was intentional, and the function name is likely correct as 'test_delete_and_reingest_sample_file_sdk'. The comment seems to be based on an assumption rather than evidence from the diff.
I might be missing the context of the actual function names in the 'harness_sdk.py' file. If the function does not exist in 'harness_sdk.py', the comment could be valid. However, based on the diff alone, the change seems intentional.
The diff shows a clear change from CLI to SDK, suggesting the function name is correct. Without evidence from the 'harness_sdk.py' file, the comment appears speculative.
The comment should be deleted as it is speculative and not supported by the evidence in the diff, which shows an intentional change to the SDK path and function name.
2. py/tests/integration/harness_sdk.py:117
- Draft comment:
Ensure the document ID3e157b3a-8469-51db-90d9-52e7d896b49b
is correct and consistent with the test data setup. This change might affect the test results if not aligned with the data setup. - Reason this comment was not posted:
Comment did not seem useful.
Workflow ID: wflow_xAyaI13aUHUbpJ6I
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
❌ Changes requested. Incremental review on f6683a6 in 48 seconds
More details
- Looked at
471
lines of code in7
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. py/core/main/assembly/factory.py:301
- Draft comment:
Remove theprint
statement as it seems to be a leftover from debugging. - Reason this comment was not posted:
Confidence changes required:50%
Theprint
statement in thecreate_providers
method is likely a leftover from debugging and should be removed for cleaner code.
2. py/sdk/auth.py:111
- Draft comment:
Remove theprint
statement as it seems to be a leftover from debugging. - Reason this comment was not posted:
Confidence changes required:50%
Theprint
statement in theupdate_user
method is likely a leftover from debugging and should be removed for cleaner code.
Workflow ID: wflow_AvcSpwYcxOvdZPcs
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on d149776 in 35 seconds
More details
- Looked at
168
lines of code in5
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. py/core/main/api/ingestion_router.py:198
- Draft comment:
Consider re-adding the_validate_ingestion_config(ingestion_config)
call to ensure the ingestion configuration is validated before proceeding. This helps prevent potential issues with invalid configurations. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment is directly related to a change made in the diff, which is the removal of the_validate_ingestion_config(ingestion_config)
call. The comment suggests that this removal could lead to issues if the ingestion configuration is not validated. This seems like a valid concern, as validation is typically important to ensure data integrity and prevent errors.
I might be missing the context of why the validation was removed. There could be a reason why the validation is no longer necessary, such as a refactor that moved validation elsewhere.
Even if the validation was moved elsewhere, the comment is still relevant to the change made in this diff. It highlights a potential issue that should be considered.
Keep the comment as it addresses a potential issue directly related to the change made in the diff.
2. py/core/main/api/auth_router.py:145
- Draft comment:
Consider re-adding the UUID validation foruser_id
to ensure it is a valid UUID before proceeding with the update. This helps prevent potential issues with invalid user IDs. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The removal of the UUID validation could lead to issues if an invalid UUID is passed, as theupdate_user
function expects a valid UUID. The comment is suggesting a code change that could prevent runtime errors, which aligns with the rules for actionable comments.
The comment assumes that the UUID validation is necessary without considering if theupdate_user
function or other parts of the code handle invalid UUIDs. The comment might be unnecessary if there are other safeguards in place.
Given the context of the diff, it seems that the UUID validation was explicitly removed, which might indicate that the author has accounted for this elsewhere. However, without evidence of such handling, the comment remains relevant.
The comment is about a change made in the diff and suggests a potentially necessary code change to prevent issues with invalid UUIDs. It should be kept.
3. py/tests/integration/harness_sdk.py:484
- Draft comment:
Consider removing or commenting out the print statements used for debugging purposes to keep the test output clean. Use assertions for test validations instead. This applies to other test functions as well. - Reason this comment was not posted:
Confidence changes required:30%
The print statements in the test functions are useful for debugging but can clutter the output. It's better to use assertions for test validations and only print when necessary.
Workflow ID: wflow_H0lixVfd3U1s09cw
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on 8f9fde0 in 22 seconds
More details
- Looked at
13
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. py/tests/integration/harness_sdk.py:6
- Draft comment:
Ensure that the change in port from 7274 to 7272 matches the intended server configuration. - Reason this comment was not posted:
Confidence changes required:50%
The change in the client URL from port 7274 to 7272 should be verified to ensure it aligns with the intended server configuration.
Workflow ID: wflow_1l4IDNhp3gWdWaEC
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
* add postgres to integration * add postgres to integration * up * rename * hardcode * add back postgres * add back postgres * add pgvector * add pgvector * add pgvector * add pgvector * add pgvector * add pgvector * add pgvector * tweak config docs * fix integration suite * fix integration suite * fix integration suite * up * up * up * up * up * up * up * up * up * update integration test * final user tests * final user tests
* Feature/revive integration tests (#1343) * add postgres to integration * add postgres to integration * up * rename * hardcode * add back postgres * add back postgres * add pgvector * add pgvector * add pgvector * add pgvector * add pgvector * add pgvector * add pgvector * tweak config docs * fix integration suite * fix integration suite * fix integration suite * up * up * up * up * up * up * up * up * up * update integration test * final user tests * final user tests * Fix validation error on collection creation responses, remove unnecessary error on deletion (#1344) * Don't throw an error when deleting a collection with no documents, fix return on create collection, more js tests * Revert "Don't throw an error when deleting a collection with no documents, fix return on create collection, more js tests" This reverts commit f9f6ead. * Don't throw an error when deleting a collection with no documents, fix return on create collection, more js tests * more * Improve kg throughput (#1342) * try * up * up * space * add it in ingestion * rm ingestion * init * add semaphore * test * rm duplicates * kg_creation_settings * rm semaphores * increase conns * change it back * clean * up * up * up * up --------- Co-authored-by: --global=Shreyas Pimpalgaonkar <[email protected]> Co-authored-by: emrgnt-cmplxty <[email protected]> --------- Co-authored-by: Nolan Tremelling <[email protected]> Co-authored-by: Shreyas Pimpalgaonkar <[email protected]> Co-authored-by: --global=Shreyas Pimpalgaonkar <[email protected]>
* add postgres to integration * add postgres to integration * up * rename * hardcode * add back postgres * add back postgres * add pgvector * add pgvector * add pgvector * add pgvector * add pgvector * add pgvector * add pgvector * tweak config docs * fix integration suite * fix integration suite * fix integration suite * up * up * up * up * up * up * up * up * up * update integration test * final user tests * final user tests
* Feature/revive integration tests (SciPhi-AI#1343) * add postgres to integration * add postgres to integration * up * rename * hardcode * add back postgres * add back postgres * add pgvector * add pgvector * add pgvector * add pgvector * add pgvector * add pgvector * add pgvector * tweak config docs * fix integration suite * fix integration suite * fix integration suite * up * up * up * up * up * up * up * up * up * update integration test * final user tests * final user tests * Fix validation error on collection creation responses, remove unnecessary error on deletion (SciPhi-AI#1344) * Don't throw an error when deleting a collection with no documents, fix return on create collection, more js tests * Revert "Don't throw an error when deleting a collection with no documents, fix return on create collection, more js tests" This reverts commit f9f6ead. * Don't throw an error when deleting a collection with no documents, fix return on create collection, more js tests * more * Improve kg throughput (SciPhi-AI#1342) * try * up * up * space * add it in ingestion * rm ingestion * init * add semaphore * test * rm duplicates * kg_creation_settings * rm semaphores * increase conns * change it back * clean * up * up * up * up --------- Co-authored-by: --global=Shreyas Pimpalgaonkar <[email protected]> Co-authored-by: emrgnt-cmplxty <[email protected]> --------- Co-authored-by: Nolan Tremelling <[email protected]> Co-authored-by: Shreyas Pimpalgaonkar <[email protected]> Co-authored-by: --global=Shreyas Pimpalgaonkar <[email protected]>
Important
Revives integration tests with updated workflows, test scripts, and configuration changes, along with OpenAPI schema and type hint updates.
integration-test-workflow-debian.yml
to include PostgreSQL setup and test execution.harness_cli.py
andharness_sdk.py
for CLI and SDK test execution.AppConfig
toconftest.py
for better test configuration management.openapi.json
to include new response models for ingestion and update endpoints.ingestion_router.py
for response models.get_entities()
andget_triples()
inkg.py
fromlist
todict
.IngestionResponse
andUpdateResponse
inresponses.py
to handle optionaltask_id
.This description was created by
for 8f9fde0. It will automatically update as commits are pushed.