-
Notifications
You must be signed in to change notification settings - Fork 3
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
Visualize dag #903
Closed
Closed
Visualize dag #903
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
52850ca
Connect BEE Node to new Workflow
35a9c51
Add SOME queries to check if wf_id matches workflow
65c8680
Add checks for workflow ID in dependency queries
cd20720
Most major checking for wf_id added within cypher / passing from driv…
3ccb511
Remove and skip over gdb_interface
f76d101
Changed gdb_driver take wf_id as parameter & wf_interface to call wf_…
ad4424f
Working for multiple workflows in one database (lacks pause / cancel …
530db47
Delete beeflow/wf_manager/resources/:
kabir-vats 3f4376a
Add GDB to beeflow client processes, GDB now launches on beeflow core…
489b4ff
Merge branch 'Multiple-Workflows-One-Database' of github.com:lanl/BEE…
778e516
Merge branch 'develop' into Multiple-Workflows-One-Database
kabir-vats b489e6b
change default sleep time for gdb to one second
5e3b5d9
Restructure dep_manager and separate container, redis, and neo4j from…
59ad3c5
Merge pull request #891 from lanl/Launch-Deps-Background
kabir-vats d318d4c
Remove some unncessesary code from wfi/neo4j database and rewrite mos…
0f61ef1
Fixed linting issues
0b00ff7
minor linting fixes
298fb25
Fix failing unit tests
f20df89
linting
036bdc8
linting
7ce1524
linting
614a7bc
Add noqa to gdb_driver connection and popen
319ba73
check for neo4j for certs dir, remove debug prints
20ba911
Document Graph Database Structure
0b0b61a
Revise GDB Design Documentation
kabir-vats 01e866f
added call to export_dag
c53de6d
added export_dag function and call to export_dag in driver
8cc81ad
added export_dag abstract method
2c16645
added export_dag function
adbc4a9
added export_dag function
a040388
subtracted indent
80aab29
Merge branch 'develop' into visualize-dag
e2f35ac
initial working graphml commit
b3dc890
Merge branch 'develop' into visualize-dag to add pre-release version …
12c3725
saving dags in a dags folder in .beeflow
6a244f8
export and graph generation first commit
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
#!/usr/bin/env python3 | ||
|
||
"""Functions for managing the BEE depency container and associated bind mounts.""" | ||
|
||
import os | ||
import shutil | ||
import subprocess | ||
|
||
from beeflow.common.config_driver import BeeConfig as bc | ||
from beeflow.common import paths | ||
from celery import shared_task #noqa pylama can't find celery | ||
|
||
|
||
class NoContainerRuntime(Exception): | ||
"""An exception for no container runtime like charliecloud or singularity.""" | ||
|
||
|
||
def check_container_runtime(): | ||
"""Check if the container runtime is currently installed.""" | ||
# Needs to support singuarity as well | ||
if shutil.which("ch-convert") is None or shutil.which("ch-run") is None: | ||
print("ch-convert or ch-run not found. Charliecloud required" | ||
" for neo4j container.") | ||
raise NoContainerRuntime('') | ||
|
||
|
||
def make_dep_dir(): | ||
"""Make a new bee dependency container directory.""" | ||
bee_workdir = paths.workdir() | ||
bee_dir = f'{bee_workdir}/deps' | ||
bee_dir_exists = os.path.isdir(bee_dir) | ||
if not bee_dir_exists: | ||
os.makedirs(bee_dir) | ||
|
||
|
||
def get_dep_dir(): | ||
"""Return the dependency directory path.""" | ||
bee_workdir = paths.workdir() | ||
bee_container_dir = f'{bee_workdir}/deps/' | ||
return bee_container_dir | ||
|
||
|
||
def get_container_dir(dep_name): | ||
"""Return the depency container path.""" | ||
container_name = dep_name + '_container' | ||
return get_dep_dir() + container_name | ||
|
||
|
||
def check_container_dir(dep_name): | ||
"""Return true if the container directory exists.""" | ||
container_dir = get_container_dir(dep_name) | ||
container_dir_exists = os.path.isdir(container_dir) | ||
return container_dir_exists | ||
|
||
|
||
def create_image(dep_name): | ||
"""Create a new BEE dependency container if one does not exist. | ||
|
||
By default, the container is stored in /tmp/<user>/beeflow/deps. | ||
""" | ||
# Can throw an exception that needs to be handled by the caller | ||
check_container_runtime() | ||
|
||
image = bc.get('DEFAULT', dep_name + '_image') | ||
|
||
# Check for BEE dependency container directory: | ||
container_dir_exists = check_container_dir(dep_name) | ||
if container_dir_exists: | ||
print(f"Already have {dep_name} container") | ||
return | ||
|
||
make_dep_dir() | ||
container_dir = get_container_dir(dep_name) | ||
|
||
# Build new dependency container | ||
try: | ||
subprocess.run(["ch-convert", "-i", "tar", "-o", "dir", | ||
str(image), str(container_dir)], check=True) | ||
except subprocess.CalledProcessError as error: | ||
print(f"ch-convert failed: {error}") | ||
shutil.rmtree(container_dir) | ||
print(f"{dep_name} container mount directory {container_dir} removed") | ||
return | ||
|
||
# If neo4j, make the certificates directory | ||
if dep_name == 'neo4j': | ||
container_certs_path = os.path.join(container_dir, 'var/lib/neo4j/certificates') | ||
os.makedirs(container_certs_path, exist_ok=True) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 changes made to bee_client.py and wf_utils.py are causing the NOT_RESPONDING state to appear -- I think. But this is my first attempt at having the "beeflow dag" command.
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.
Do the steps actually complete and then show NOT_RESPONDING ?
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.
Yes