Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
6447d88
fixed failed database connections to FDW
Aug 12, 2025
4979826
introduced allow_overlays directive for metadata
Aug 13, 2025
25ce661
fixed a bug
Aug 13, 2025
7bc6936
test runner improvements
Aug 14, 2025
ce14ca0
fixed recovery config
Aug 14, 2025
9fa5f31
resoleve merge conflicts
Aug 14, 2025
2f6d6a9
fixed some errors
Aug 14, 2025
3171b7a
feat: Settings overriding script
Aug 14, 2025
96f5650
Merge pull request #588 from Springtail-inc/jeff/SPR-939-test-runner-…
ella-springtail Aug 14, 2025
3b7e36c
bug fix
Aug 14, 2025
879ab6d
changes for nightly build config
Aug 14, 2025
4b53ab4
Merge branch 'SPR-939-test-runner-improvement' of github.com:Springta…
Aug 14, 2025
292aaa0
Merge remote-tracking branch 'origin/main' into SPR-939-test-runner-i…
Aug 18, 2025
df83485
changed configuration not to run with streaming
Aug 18, 2025
be7cc7a
temporary change to get springtail logs
Aug 18, 2025
736529f
fixed process shutdown error
Aug 18, 2025
6715725
changed configs not to use integration_test_config overlay for now
Aug 18, 2025
1f9e7f7
fixed review comment
Aug 18, 2025
aaae38d
more bug fixes and enhancements
Aug 19, 2025
cb4069f
[SPR-939]: Cleanup vacuum files after run
rsdcbabu Aug 19, 2025
2975089
moved logging
Aug 19, 2025
53a77f2
more logging
Aug 19, 2025
49f5f49
bug fix
Aug 19, 2025
8251dd3
another bug
Aug 19, 2025
9010e34
yet another bug
Aug 19, 2025
769f78c
changed workflow for ssh access to debug
Aug 19, 2025
885b321
removed large_data from CI tests
Aug 19, 2025
5b02d51
Merge remote-tracking branch 'origin/main' into SPR-939-test-runner-i…
Aug 19, 2025
9dddcaf
renamed allowed_overlays into required_overlays
Aug 20, 2025
37ba8e9
changed script to perform log check for every test set by default
Aug 20, 2025
ea76dad
singleton is not needed
Aug 20, 2025
1f879c5
Merge remote-tracking branch 'origin/main' into SPR-939-test-runner-i…
Aug 21, 2025
35ec1f2
Merge remote-tracking branch 'origin/main' into SPR-939-test-runner-i…
Aug 22, 2025
9e0905b
Merge branch 'main' into SPR-939-test-runner-improvement
garthgoodson Aug 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/nightly.overrides.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"storage": {
"vacuum_config": {
"enabled": true
}
},
"otel": {
"enabled": false
}
}
14 changes: 7 additions & 7 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,19 @@ jobs:
- name: Prepare Tests
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
# Turns off the OTEL in the system.json.settings
jq '.otel.enabled = false' system.json.settings > tmp.json && mv tmp.json system.json.settings
# Override some settings in the config file
.github/workflows/scripts/merge_system_settings.py system.json.settings .github/workflows/nightly.overrides.json system.json.test

# Replace the correct `springtail` code directory
sed -i -e "s|/home/dev/springtail|${GITHUB_WORKSPACE}|g" system.json.settings
cp system.json.settings system.json.test
sed -i -e "s|/home/dev/springtail|${GITHUB_WORKSPACE}|g" system.json.test
mkdir -p /opt/springtail/pids
service redis-server start

# Copies over the fdw_config file to the designated location
# Copy over the fdw_config file to the designated location
conf_file=/etc/postgresql/16/main/postgresql.conf
fdw_config_file_path=$(grep -E "^springtail_fdw.config_file_path" $conf_file | awk '{print $3}' | tr -d "'")
mkdir -p $(dirname $fdw_config_file_path)
cp system.json.settings $fdw_config_file_path
cp system.json.test $fdw_config_file_path

- name: Build
run: |
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:

_LOG_FLAG="failed"
echo "*** Starting iteration $i/${INTEGRATION_TEST_ITERATIONS} of integration tests"
python3 test_runner.py -a -c config.yaml -j ${GITHUB_WORKSPACE}/integration-test-report.xml 2>&1 | tee tmplog
python3 test_runner.py -c nightly -j ${GITHUB_WORKSPACE}/integration-test-report.xml 2>&1 | tee tmplog
# Grab the success/failure status of the integration tests
if [ $? -eq 0 ] && ! grep -qE "Tests failed: [1-9][0-9]*" tmplog
then
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/scripts/merge_system_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/usr/bin/env python3
# JSON config override script
# This script merges two JSON files, where the second file overrides the first.
# Usage:
# ./merge_system_settings.py <base_file> <override_file> <output_file>


import json


def merge_dict(base, override):
"""
Merges two dictionaries, where the second dictionary overrides the first.
If a key is missing from the second dictionary, the value from the first is used.
If a key exists in both dictionaries and both values are dictionaries, we merge them recursively.
If a key exists in both dictionaries and the values are not dictionaries, the value from the second dictionary is used.

:param base: The base dictionary.
:param override: The dictionary with overrides.
:return: A new dictionary with merged values.
"""
merged = base.copy() # Start with a copy of the base dictionary
for key, value in override.items():
if key not in merged:
raise KeyError(f"Key '{key}' in overrides not found in base.")
# Assert types are the same if both exist
base_value = merged[key]
bvt, ovt = type(base_value), type(value)
if bvt != ovt:
raise TypeError(f"Type mismatch for key '{key}': base type {bvt} does not match override type {ovt}.")
if bvt is dict:
# If both are dictionaries, merge them recursively
merged[key] = merge_dict(base_value, value)
else:
# Otherwise, override the value
merged[key] = value
return merged


def merge_system_settings(base_file, override_file, output_file):
"""
Merges two YAML files containing system settings, where the second file overrides the first.

:param base_file: Path to the base system settings YAML file.
:param override_file: Path to the override system settings YAML file.
:param output_file: Path to save the merged output YAML file.
"""
with open(base_file, 'r') as f:
base_settings = json.load(f)

with open(override_file, 'r') as f:
override_settings = json.load(f)

merged_settings = merge_dict(base_settings, override_settings)

with open(output_file, 'w') as f:
json.dump(merged_settings, f, indent=4)


if __name__ == "__main__":
import argparse

parser = argparse.ArgumentParser(description="Merge system settings JSON files.")
parser.add_argument("base_file", help="Path to the base system settings file.")
parser.add_argument("override_file", help="Path to the override system settings file.")
parser.add_argument("output_file", help="Path to save the merged output file.")

args = parser.parse_args()

merge_system_settings(args.base_file, args.override_file, args.output_file)
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ jobs:

set +e
_LOG_FLAG="failed"
python3 test_runner.py -c config.yaml -j /__w/springtail/springtail/integration-test-report.xml --skip-downloads 2>&1 | tee tmplog
python3 test_runner.py -c github_ci -j /__w/springtail/springtail/integration-test-report.xml --skip-downloads 2>&1 | tee tmplog
# Grab the success/failure status of the integration tests
if [ $? -eq 0 ] && ! grep -qE "Tests failed: [1-9][0-9]*" tmplog
then
Expand Down
9 changes: 6 additions & 3 deletions include/pg_fdw/pg_fdw_ddl_common.hh
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ namespace springtail::pg_fdw {
std::string _partition_bound;
};

class PgFdwCommon : public Singleton<PgFdwCommon> {
friend class Singleton<PgFdwCommon>;
class PgFdwCommon {
public:
struct TableEntry {
uint64_t table_id;
Expand Down Expand Up @@ -347,8 +346,12 @@ namespace springtail::pg_fdw {
auto fields = table->extent_schema()->get_fields();
for (auto row : (*table)) {
uint64_t tid = fields->at(sys_tbl::Schemas::Data::TABLE_ID)->get_uint64(&row);
uint64_t xid = fields->at(sys_tbl::Schemas::Data::XID)->get_uint64(&row);
if (xid > schema_xid) {
continue;
}

LOG_DEBUG(LOG_FDW, "Found table in schemas table: {}", tid);
LOG_DEBUG(LOG_FDW, "Found table in schemas table: {}, xid: {}, schema_xid: {}", tid, xid, schema_xid);

// check if we have moved to next tid
if (tid != current_tid) {
Expand Down
3 changes: 2 additions & 1 deletion python/shared/sysutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def stop_daemons(pid_path : str, daemons : List[tuple] = []) -> None:
"""Stop all daemons."""
# Stop the daemons
if not os.path.exists(pid_path):
raise Exception(f"PID path not found: {pid_path}")
print(f"PID path: {pid_path} does not exist")
return

found_pids = []

Expand Down
35 changes: 0 additions & 35 deletions python/testing/config.yaml

This file was deleted.

11 changes: 8 additions & 3 deletions python/testing/overlays/small_log_rotate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"log_mgr": {
"log_size_rollover_threshold": 32768,
"archive_logs": true
}
"log_size_rollover_threshold": 32768,
"archive_logs": true
},
"storage": {
"vacuum_config": {
"enabled": false
}
}
}
11 changes: 11 additions & 0 deletions python/testing/overlays/small_log_rotate_with_streaming.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"log_mgr": {
"log_size_rollover_threshold": 32768,
"archive_logs": true
},
"storage": {
"vacuum_config": {
"enabled": false
}
}
}
8 changes: 7 additions & 1 deletion python/testing/overlays/streaming_postgres_config.json
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
{}
{
"storage": {
"vacuum_config": {
"enabled": false
}
}
}
Loading
Loading