Skip to content

Commit

Permalink
Restructure and organize project files
Browse files Browse the repository at this point in the history
  • Loading branch information
saratomaz committed Nov 26, 2024
1 parent 7598420 commit 31d8e68
Show file tree
Hide file tree
Showing 21 changed files with 64 additions and 294 deletions.
6 changes: 3 additions & 3 deletions .buildkite/db_sync_full_sync.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
steps:
- label: ':drum_with_drumsticks: Full sync test :drum_with_drumsticks:'
commands:
- nix develop --accept-flake-config .#python --command python ./db_sync_tests/tests/full_sync_from_clean_state.py -nv "${node_version}" -dv "${db_sync_version}" -dsa "${db_sync_start_arguments}" -e "${environment}"
- nix develop --accept-flake-config .#python --command python ./db_sync_tests/tests/snapshot_creation.py -dv "${db_sync_version}" -e "${environment}" -rosc "${run_only_sync_test}"
- nix develop --accept-flake-config .#python --command python ./db_sync_tests/tests/local_snapshot_restoration.py -nv "${node_version}" -dv "${db_sync_version}" -dsa "${db_sync_start_arguments}" -e "${environment}" -rosc "${run_only_sync_test}"
- nix develop --accept-flake-config .#python --command python ./sync_tests/tests/full_sync_from_clean_state.py -nv "${node_version}" -dv "${db_sync_version}" -dsa "${db_sync_start_arguments}" -e "${environment}"
- nix develop --accept-flake-config .#python --command python ./sync_tests/tests/snapshot_creation.py -dv "${db_sync_version}" -e "${environment}" -rosc "${run_only_sync_test}"
- nix develop --accept-flake-config .#python --command python ./sync_tests/tests/local_snapshot_restoration.py -nv "${node_version}" -dv "${db_sync_version}" -dsa "${db_sync_start_arguments}" -e "${environment}" -rosc "${run_only_sync_test}"
timeout_in_minutes: 43200
agents:
system: x86_64-linux
Expand Down
278 changes: 0 additions & 278 deletions db_sync_tests/utils/aws_db_utils.py

This file was deleted.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
nativeBuildInputs = with pkgs; [ bash nix gnugrep gnumake gnutar coreutils git xz ];
};
python = pkgs.mkShell {
nativeBuildInputs = with pkgs; with python39Packages; [ python39Full virtualenv pip matplotlib pandas requests xmltodict psutil GitPython pymysql postgresql_14 wget curl psycopg2 assertpy ];
nativeBuildInputs = with pkgs; with python39Packages; [ python39Full virtualenv pip matplotlib pandas requests xmltodict psutil GitPython pymysql postgresql_14 wget curl psycopg2 assertpy colorama];
};
postgres = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ glibcLocales postgresql_14 lsof procps wget ];
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

sys.path.append(os.getcwd())

from db_sync_tests.utils.utils import seconds_to_time, get_no_of_cpu_cores, get_current_date_time, \
from sync_tests.utils.utils_db_sync import seconds_to_time, get_no_of_cpu_cores, get_current_date_time, \
get_os_type, get_total_ram_in_GB, upload_artifact, clone_repo, zip_file, execute_command, \
print_file, stop_process, write_data_as_json_to_file, get_node_config_files, \
get_node_version, get_db_sync_version, start_node_in_cwd, wait_for_db_to_sync, \
Expand All @@ -25,7 +25,7 @@
NODE_ARCHIVE, DB_SYNC_ARCHIVE, SYNC_DATA_ARCHIVE, EXPECTED_DB_SCHEMA, EXPECTED_DB_INDEXES, \
ENVIRONMENT \

from db_sync_tests.utils.aws_db_utils import get_identifier_last_run_from_table, \
from sync_tests.utils.aws_db_utils import get_identifier_last_run_from_table, \
add_bulk_rows_into_db, add_single_row_into_db


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

sys.path.append(os.getcwd())

from db_sync_tests.utils.utils import seconds_to_time, get_no_of_cpu_cores, get_current_date_time, \
from sync_tests.utils.utils_db_sync import seconds_to_time, get_no_of_cpu_cores, get_current_date_time, \
get_os_type, get_total_ram_in_GB, upload_artifact, clone_repo, wait, zip_file, \
print_file, stop_process, copy_node_executables, write_data_as_json_to_file, \
execute_command, get_node_config_files, are_errors_present_in_db_sync_logs, \
Expand All @@ -26,7 +26,7 @@
DB_SYNC_PERF_STATS, NODE_LOG, DB_SYNC_LOG, EPOCH_SYNC_TIMES, PERF_STATS_ARCHIVE, \
NODE_ARCHIVE, DB_SYNC_ARCHIVE, SYNC_DATA_ARCHIVE, ENVIRONMENT \

from utils.aws_db_utils import get_identifier_last_run_from_table, \
from sync_tests.utils.aws_db_utils import get_identifier_last_run_from_table, \
add_bulk_rows_into_db, add_single_row_into_db


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

sys.path.append(os.getcwd())

from db_sync_tests.utils.utils import seconds_to_time, get_no_of_cpu_cores, \
from sync_tests.utils.utils_db_sync import seconds_to_time, get_no_of_cpu_cores, \
get_current_date_time, get_os_type, get_total_ram_in_GB, \
upload_artifact, print_file, stop_process, export_env_var, is_string_present_in_file, \
zip_file, write_data_as_json_to_file, get_db_sync_version, start_node_in_cwd, \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def check_string_format(input_string):


def delete_node_files():
for p in Path(".").glob("cardano-*"):
for p in Path("..").glob("cardano-*"):
print_info_warn(f"deleting file: {p}")
p.unlink(missing_ok=True)

Expand Down Expand Up @@ -133,7 +133,7 @@ def disable_p2p_node_config():
def rm_node_config_files() -> None:
print_info_warn('Removing existing config files')
os.chdir(Path(ROOT_TEST_PATH))
for gen in Path(".").glob("*-genesis.json"):
for gen in Path("..").glob("*-genesis.json"):
Path(gen).unlink(missing_ok=True)
for f in ('config.json', 'topology.json'):
Path(f).unlink(missing_ok=True)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

sys.path.append(os.getcwd())

from db_sync_tests.utils.utils import seconds_to_time, get_no_of_cpu_cores, \
from sync_tests.utils.utils_db_sync import seconds_to_time, get_no_of_cpu_cores, \
get_current_date_time, get_os_type, get_total_ram_in_GB, \
upload_artifact, print_file, create_db_sync_snapshot_stage_2, \
write_data_as_json_to_file, set_buildkite_meta_data, \
Expand All @@ -17,7 +17,7 @@
get_file_size, create_db_sync_snapshot_stage_1, print_color_log, \
ROOT_TEST_PATH, ENVIRONMENT

from db_sync_tests.utils.aws_db_utils import get_identifier_last_run_from_table, add_single_row_into_db
from sync_tests.utils.aws_db_utils import get_identifier_last_run_from_table, add_single_row_into_db



Expand Down
File renamed without changes.
Loading

0 comments on commit 31d8e68

Please sign in to comment.