Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
c222390
first progress
kabir-vats Dec 2, 2025
2ac017f
begin task state store change
kabir-vats Dec 2, 2025
6a30b5e
task state move
kabir-vats Dec 2, 2025
a471203
add more functionalities to move over
kabir-vats Dec 2, 2025
c0dfe80
dependency resolution
kabir-vats Dec 2, 2025
1d96fa0
input output propogation
kabir-vats Dec 2, 2025
1ff3767
more basic get/set
kabir-vats Dec 2, 2025
5b781e7
still launching neo4j, but pretest prototype for sql driver done
kabir-vats Dec 3, 2025
20ae971
deps not working but one task is now
kabir-vats Dec 3, 2025
3f1cf24
resolve dependencies, cat grep tar working
kabir-vats Dec 4, 2025
b8d9532
add proper foreign key def
kabir-vats Dec 4, 2025
eef5556
conditional logic for getting neo4j
kabir-vats Dec 4, 2025
bf63cf3
fix bad fail state
kabir-vats Dec 4, 2025
fe64c96
fix minor sql issues
kabir-vats Dec 4, 2025
28a9dbd
change graphdb default to sqlite3
kabir-vats Dec 4, 2025
85a719b
fix unit tests and linting
kabir-vats Dec 9, 2025
b30d954
add submit as an incpmlete state
kabir-vats Dec 9, 2025
9c702dc
Update beeflow/tests/test_sqlite_gdb.py
kabir-vats Dec 11, 2025
8b08a6b
Merge branch 'develop' into replace-neo4j
rstyd Dec 15, 2025
3818bd2
Updated coverage.svg
github-actions[bot] Dec 15, 2025
3212892
Update github actions CI
rstyd Dec 18, 2025
c6cb39b
Correct gdb_backend type
rstyd Dec 18, 2025
6b23a17
Update coverage for sqlite
rstyd Dec 18, 2025
b4a1db1
Fix sqlite driver.
rstyd Dec 18, 2025
051292b
Upload error artifact.
rstyd Dec 18, 2025
2cdad7e
Fix tab issue
rstyd Dec 18, 2025
436c52c
Remove fail fast to see exactly what's happening to each test.
rstyd Dec 18, 2025
f675132
Merge branch 'develop' into replace-neo4j
rstyd Dec 19, 2025
6063e30
Make get_port more robust
rstyd Dec 19, 2025
dd6f2f7
Merge branch 'develop' into replace-neo4j
rstyd Jan 9, 2026
a3b49c1
Pylint fixes
jeffreyt Jan 15, 2026
9867ddd
Merge branch 'develop' into replace-neo4j
pagrubel Jan 20, 2026
2b82b0a
Log formatting fix
jeffreyt Jan 21, 2026
9b65d7b
Increase get_port retry num
jeffreyt Jan 21, 2026
a494cfa
Save more data artifacts on failure
jeffreyt Jan 21, 2026
efe22d5
Save error log expanded
jeffreyt Jan 22, 2026
385cfd6
Stash job run on failure
jeffreyt Jan 22, 2026
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
68 changes: 56 additions & 12 deletions .github/workflows/testing-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ jobs:
if: ${{ !(contains(github.event.pull_request.labels.*.name, 'WIP (no-ci)')) && !(contains(github.event.pull_request.labels.*.name, 'WIP (lint-only)')) }}
name: BEE Integration Test
strategy:
fail-fast: false
matrix:
bee_worker: [Slurmrestd, SlurmCommands, Flux]
# bee_worker: [Slurmrestd, SlurmCommands, Flux]
# gdb_backend: [neo4j, sqlite3]
bee_worker: [Slurmrestd]
gdb_backend: [neo4j]
env:
BEE_WORKER: ${{ matrix.bee_worker }}
GDB_BACKEND: ${{ matrix.gdb_backend }}
# Note: Needs to run on 22.04 or later since slurmrestd doesn't seem to be
# available on 20.04
runs-on: ubuntu-22.04
Expand All @@ -29,6 +34,10 @@ jobs:
- name: Install and Configure
run: |
. ./ci/env.sh
echo "LOG_DIR=$LOG_DIR" >> $GITHUB_ENV
echo "SLURM_CONF=$SLURM_CONF" >> $GITHUB_ENV
echo "BEE_WORKDIR=$BEE_WORKDIR" >> $GITHUB_ENV
echo "BEE_CONFIG=$BEE_CONFIG" >> $GITHUB_ENV
./ci/deps_install.sh
./ci/batch_scheduler.sh
./ci/bee_install.sh
Expand All @@ -37,13 +46,30 @@ jobs:
run: |
. ./ci/env.sh
./ci/integration_test.sh
mv .coverage.integration ".coverage.${{ matrix.bee_worker }}"
mv .coverage.integration ".coverage.${{ matrix.bee_worker }}.${{ matrix.gdb_backend }}"
- name: Stash bee error logs
if: failure()
run: |
mkdir bee-error-logs
cp bee-error-*.log bee-error-logs
cp -R $LOG_DIR bee-error-logs
cp -R $SLURM_CONF bee-error-logs
cp -R $BEE_WORKDIR/logs bee-error-logs
cp -R $BEE_WORKDIR/*.db bee-error-logs
cp -R $BEE_CONFIG bee-error-logs
- name: Upload bee error logs
if: failure() # only when the job fails
uses: actions/upload-artifact@v4
with:
name: bee-error-logs-${{ matrix.bee_worker }}-${{ matrix.gdb_backend }}.log
path: bee-error-logs
if-no-files-found: ignore
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.bee_worker }}
name: coverage-${{ matrix.bee_worker }}-${{ matrix.gdb_backend }}
include-hidden-files: true
path: ".coverage.${{ matrix.bee_worker }}"
path: ".coverage.${{ matrix.bee_worker }}.${{ matrix.gdb_backend }}"

unit-test:
if: ${{ !(contains(github.event.pull_request.labels.*.name, 'WIP (no-ci)')) && !(contains(github.event.pull_request.labels.*.name, 'WIP (lint-only)')) }}
Expand Down Expand Up @@ -93,22 +119,40 @@ jobs:
name: coverage-unit-tests
path: ./

- name: Get Slurmrestd coverage
- name: Get Slurmrestd+neo4j coverage
uses: actions/download-artifact@v4
with:
name: coverage-Slurmrestd
name: coverage-Slurmrestd-neo4j
path: ./

- name: Get SlurmCommands coverage
- name: Get Slurmrestd+sqlite3 coverage
uses: actions/download-artifact@v4
with:
name: coverage-SlurmCommands
name: coverage-Slurmrestd-sqlite3
path: ./

- name: Get Flux coverage

- name: Get SlurmCommands+neo4j coverage
uses: actions/download-artifact@v4
with:
name: coverage-SlurmCommands-neo4j
path: ./

- name: Get SlurmCommands+sqlite3 coverage
uses: actions/download-artifact@v4
with:
name: coverage-SlurmCommands-sqlite3
path: ./

- name: Get Flux+neo4j coverage
uses: actions/download-artifact@v4
with:
name: coverage-Flux-neo4j
path: ./

- name: Get Flux+sqlite3 coverage
uses: actions/download-artifact@v4
with:
name: coverage-Flux
name: coverage-Flux-sqlite3
path: ./

- name: Combine coverage
Expand Down
33 changes: 21 additions & 12 deletions beeflow/client/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ def need_slurmrestd():
and not bc.get('slurm', 'use_commands'))


def need_neo4j():
"""Check if neo4j is needed."""
return bc.get('graphdb', 'type').lower() == 'neo4j'


def init_components(remote=False):
"""Initialize the components and component manager."""
mgr = ComponentManager()
Expand Down Expand Up @@ -255,14 +260,15 @@ def celery():
# container_path = paths.redis_container()
# If it exists, we assume that it actually has a valid container

if not container_manager.check_container_dir('neo4j'):
print('Unpacking Neo4j image...')
container_manager.create_image('neo4j')
if need_neo4j():
if not container_manager.check_container_dir('neo4j'):
print('Unpacking Neo4j image...')
container_manager.create_image('neo4j')

@mgr.component('neo4j-database', ('wf_manager',))
def start_neo4j():
"""Start the neo4j graph database."""
return neo4j_manager.start()
@mgr.component('neo4j-database', ('wf_manager',))
def start_neo4j():
"""Start the neo4j graph database."""
return neo4j_manager.start()

@mgr.component('redis', ())
def start_redis():
Expand Down Expand Up @@ -673,14 +679,17 @@ def pull_deps(outdir: str = typer.Option('.', '--outdir', '-o',
help='directory to store containers in')):
"""Pull required BEE containers and store in outdir."""
load_check_charliecloud()
neo4j_path = os.path.join(os.path.realpath(outdir), 'neo4j.tar.gz')
neo4j_dockerfile = str(Path(REPO_PATH, "beeflow/data/dockerfiles/Dockerfile.neo4j"))
build_to_tar('neo4j_image', neo4j_dockerfile, neo4j_path)
if need_neo4j():
neo4j_path = os.path.join(os.path.realpath(outdir), 'neo4j.tar.gz')
neo4j_dockerfile = str(Path(REPO_PATH, "beeflow/data/dockerfiles/Dockerfile.neo4j"))
build_to_tar('neo4j_image', neo4j_dockerfile, neo4j_path)
redis_path = os.path.join(os.path.realpath(outdir), 'redis.tar.gz')
pull_to_tar('redis', redis_path)

AlterConfig(changes={'DEFAULT': {'neo4j_image': neo4j_path,
'redis_image': redis_path}}).save()
if need_neo4j():
AlterConfig(changes={'DEFAULT': {'neo4j_image': neo4j_path}}).save()

AlterConfig(changes={'DEFAULT': {'redis_image': redis_path}}).save()

dep_dir = container_manager.get_dep_dir()
if os.path.isdir(dep_dir):
Expand Down
2 changes: 2 additions & 0 deletions beeflow/common/config_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,8 @@ def validate_chrun_opts(opts):
info='extra Charliecloud setup to put in a job script')
# Graph Database
VALIDATOR.section('graphdb', info='Main graph database configuration section.')
VALIDATOR.option('graphdb', 'type', default='sqlite3', choices=('neo4j', 'sqlite3'),
info='type of graph database to use', prompt=False)
VALIDATOR.option('graphdb', 'hostname', default='localhost', prompt=False,
info='hostname of database')

Expand Down
26 changes: 23 additions & 3 deletions beeflow/common/db/bdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ def create_connection(db_file):
conn = None
try:
conn = sqlite3.connect(db_file)
conn.execute("PRAGMA foreign_keys = ON;")
return conn
except Error as error:
print(error)
print("Error connecting to database: ", error)
return conn


Expand All @@ -42,9 +43,24 @@ def run(db_file, stmt, params=None):
cursor.execute(stmt)
conn.commit()
except Error as error:
print("Error running: ", stmt)
print(error)



def runscript(db_file, script):
"""Run the sql script on the database. Doesn't return anything."""
with create_connection(db_file) as conn:
try:
cursor = conn.cursor()
cursor.executescript(script)
conn.commit()
except Error as error:
print("Error running script")
print(error)



def getone(db_file, stmt, params=None):
"""Run the sql statement on the database and return the result."""
with create_connection(db_file) as conn:
Expand All @@ -55,7 +71,9 @@ def getone(db_file, stmt, params=None):
else:
cursor.execute(stmt)
result = cursor.fetchone()
except Error:
except Error as error:
print("Error fetching one: ", stmt)
print(error)
result = None
return result

Expand All @@ -70,7 +88,9 @@ def getall(db_file, stmt, params=None):
else:
cursor.execute(stmt)
result = cursor.fetchall()
except Error:
except Error as error:
print("Error fetching all: ", stmt)
print(error)
result = None
return result

Expand Down
Loading
Loading