Skip to content

Conversation

ruokun-niu
Copy link
Contributor

Currently the Github client can only be used in the Building Comfort test scenario.
It can be configured as follows:

"data_store": {
            "test_repos": [
              {
                "id": "github_dev_repo",
                "kind": "GitHub",
                "owner": "drasi-project",
                "repo": "test-repo",
                "branch": "main",
                "force_cache_refresh": false,
                "root_path": "dev_repo"
            }
          ]
        },

We are currently storing the test config files in the test-repo repository

Copilot

This comment was marked as outdated.

@ruokun-niu ruokun-niu requested a review from Copilot July 1, 2025 21:16
@ruokun-niu ruokun-niu force-pushed the test-repo-github-storage branch from 207fd4c to 2cfaea9 Compare July 1, 2025 21:17
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for GitHub as a test repository client and updates related configurations and examples.

  • Introduces a new GithubTestRepoClient variant in the test data‐store layer, with associated config and client code.
  • Updates Dockerfiles across services to use newer base images (rust:1.82, debian:bookworm-slim) and adds necessary packages.
  • Adjusts example scenarios and scripts to reference github_dev_repo instead of the Azure client.

Reviewed Changes

Copilot reviewed 18 out of 20 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
e2e-test-framework/test-service/Dockerfile Updated base images and installed libssl3
e2e-test-framework/reactivator/Dockerfile Updated Rust builder image
e2e-test-framework/proxy/Dockerfile Updated Rust builder image
e2e-test-framework/test-data-store/src/test_repo_storage/repo_clients/mod.rs Added GitHub enum variant and config mapping
e2e-test-framework/test-data-store/src/test_repo_storage/repo_clients/github_test_repo_client.rs New GitHub client implementation with download logic
e2e-test-framework/test-data-store/Cargo.toml Added base64 and reqwest dependencies
e2e-test-framework/examples/building_comfort/drasi/web_api_source.http Switched @repo_id to github_dev_repo
e2e-test-framework/examples/building_comfort/drasi/web_api_query.http Switched @repo_id to github_dev_repo
e2e-test-framework/examples/building_comfort/drasi/test_service_deployment.yaml Configured GitHub test repo settings and image bump
e2e-test-framework/examples/building_comfort/drasi/source.yaml Updated TEST_RUN_SOURCE_ID to use GitHub repo ID
e2e-test-framework/examples/building_comfort/drasi/run_test_with_rocks.sh Adjusted file paths for Rocks container deployment
e2e-test-framework/examples/building_comfort/drasi/run_test_with_memory.sh Adjusted file paths for Memory container deployment
e2e-test-framework/examples/building_comfort/drasi/run_test.sh Commented out redundant init and updated query paths
e2e-test-framework/examples/building_comfort/drasi/query_container_rocks/query_rocks.yaml Added Rocks container query spec
e2e-test-framework/examples/building_comfort/drasi/query_container_rocks/query_container_rocks.yaml Defined Rocks container metadata
e2e-test-framework/examples/building_comfort/drasi/query_container_memory/query_memory.yaml Added Memory container query spec
e2e-test-framework/examples/building_comfort/drasi/query_container_memory/query_container_memory.yaml Defined Memory container metadata
Comments suppressed due to low confidence (2)

e2e-test-framework/test-data-store/src/test_repo_storage/repo_clients/mod.rs:96

  • The acronym ‘GitHub’ is typically capitalized with a capital ‘H’. Consider renaming GithubTestRepoConfig (and related structs/modules) to GitHubTestRepoConfig for consistency.
pub struct GithubTestRepoConfig {

e2e-test-framework/test-data-store/src/test_repo_storage/repo_clients/github_test_repo_client.rs:59

  • There are no tests covering the new GithubTestRepoClient. Add unit and integration tests for new, copy_test_definition, and error paths to ensure expected behavior and catch regressions.
    pub async fn new(common_config: CommonTestRepoConfig, unique_config: GithubTestRepoConfig) -> anyhow::Result<Box<dyn RemoteTestRepoClient + Send + Sync>> {

Comment on lines +91 to +93
todo!();
// This is still WIP; we will work on this when we have fixed the population test.
// log::debug!("Downloading Bootstrap Script Files from {:?} to {:?}", repo_folder, local_folder);
Copy link

Copilot AI Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The download_bootstrap_script_files and download_change_script_files methods are unimplemented and will panic at runtime when invoked. Provide real implementations or return descriptive errors to avoid unexpected panics.

Suggested change
todo!();
// This is still WIP; we will work on this when we have fixed the population test.
// log::debug!("Downloading Bootstrap Script Files from {:?} to {:?}", repo_folder, local_folder);
log::warn!("The method `download_bootstrap_script_files` is not yet implemented. Called with repo_folder: {:?}, local_folder: {:?}", repo_folder, local_folder);
anyhow::bail!("The method `download_bootstrap_script_files` is not implemented. This functionality is currently unavailable.");
// This is still WIP; we will work on this when we have fixed the population test.

Copilot uses AI. Check for mistakes.

ruokun-niu and others added 19 commits July 7, 2025 13:12
Signed-off-by: ruokun-niu <[email protected]>
Signed-off-by: ruokun-niu <[email protected]>
Signed-off-by: ruokun-niu <[email protected]>
Signed-off-by: ruokun-niu <[email protected]>
Signed-off-by: ruokun-niu <[email protected]>
Signed-off-by: ruokun-niu <[email protected]>
…clients/github_test_repo_client.rs

Co-authored-by: Copilot <[email protected]>
Signed-off-by: ruokun-niu <[email protected]>
…clients/github_test_repo_client.rs

Co-authored-by: Copilot <[email protected]>
Signed-off-by: ruokun-niu <[email protected]>
Signed-off-by: ruokun-niu <[email protected]>
Signed-off-by: ruokun-niu <[email protected]>
@ruokun-niu ruokun-niu force-pushed the test-repo-github-storage branch from 481fb19 to 867e804 Compare July 7, 2025 20:14
@ruokun-niu ruokun-niu force-pushed the test-repo-github-storage branch from 791d819 to 212dcaa Compare July 7, 2025 20:36
@ruokun-niu ruokun-niu merged commit fb84b46 into main Jul 7, 2025
4 checks passed
@ruokun-niu ruokun-niu deleted the test-repo-github-storage branch July 7, 2025 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants