Skip to content
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

Liu 304 #206

Merged
merged 76 commits into from
Oct 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
d99c27f
Re-factor to use "data" instead of "plain". Prepare for _createData
awicenec Aug 16, 2022
989c4a4
Merge branch 'liu-291' into liu-286
awicenec Aug 16, 2022
4c5fbe3
Merge branch 'master' into liu-286
awicenec Aug 16, 2022
efddb71
Removed _createPlain method
awicenec Aug 18, 2022
9465616
Fixed relative path name construction for repro tests
awicenec Aug 18, 2022
de9f6d7
More test path fixes
awicenec Aug 18, 2022
99c612a
Added pytest.ini to translator tests
awicenec Aug 18, 2022
fa17e49
cleanup of tests settings
awicenec Aug 19, 2022
fcc03c5
Moves drops to data.drops in preparation for moving io.py.
pritchardn Aug 18, 2022
77f552d
Moves io.py into dlg.data
pritchardn Aug 18, 2022
72ca58a
Adds init file for importing all supported data drops.
pritchardn Aug 18, 2022
aa22a6b
Updates documentation to reference new code locations.
pritchardn Aug 18, 2022
f86b331
Moved SharedMemory from the template palette to the daliuge palette. …
james-strauss-uwa Aug 18, 2022
c44b094
Resolved merge conflicts
awicenec Aug 19, 2022
b38d6f1
sqlite DB file for tests in /tmp
awicenec Aug 15, 2022
41b34f4
Use tempfile for sqlite3 DB file
awicenec Aug 15, 2022
f19bb6d
Also moved reprodata to sessionDir
awicenec Aug 15, 2022
6f9b232
Removes duplicate drop implementations.
pritchardn Aug 18, 2022
1bba13d
Enable correct detection of test_tool in translator
awicenec Aug 19, 2022
dae3913
Fixed merge issue
awicenec Aug 19, 2022
534422c
Moved S3, ParamSet and environmentvar_drop to data
awicenec Aug 19, 2022
804765f
Cleaned up REST API
awicenec Aug 20, 2022
c5136b9
With NM registration cleanup of startup
awicenec Aug 20, 2022
c6c7a3e
Preparation for categoryType and dataclass
awicenec Aug 20, 2022
8c4dfd0
Fixed docs for s3_drop
awicenec Aug 21, 2022
90b879d
Just trying why this test is failing
awicenec Aug 21, 2022
c9dcc2f
Still fighting with github test error
awicenec Aug 21, 2022
bdbb547
Merge branch 'master' into liu-294
awicenec Aug 21, 2022
8f5eeea
Merge with master
awicenec Aug 21, 2022
34030cc
docs merge
awicenec Aug 21, 2022
96174db
More preparation for future dataclass field
awicenec Aug 22, 2022
e7b8a2e
Move DataDrop to apps
awicenec Aug 29, 2022
7e00afc
fixed an error causing keyboard shortcuts to stop working and added a…
Sep 1, 2022
3f5ae36
First round of updates for OoD in the cloud.
Aug 1, 2022
273f463
Updated to 1 to hopefully work around an issue.
Aug 1, 2022
824b82b
Minor mod
Aug 1, 2022
2a90db5
Updates to correctly handle some None states.
Aug 2, 2022
77bd3d5
Added config fo ood_cloud.
Aug 2, 2022
f6dc407
added dummy data component
awicenec Aug 29, 2022
ea88043
Added DLG_ROOT to OOD-CLD class
awicenec Aug 29, 2022
4813cac
added start and stop of local DIM and NM
awicenec Sep 2, 2022
314d2aa
Fixed typo
awicenec Sep 2, 2022
1dbf7c6
most breadcrumbs with hyperlink
Sep 2, 2022
0dcbe0f
Merge remote-tracking branch 'origin/liu-294' into liu-296
Sep 2, 2022
474c683
links working, old links removed
Sep 5, 2022
96dd375
removed nodeIp display if no node ip is available
Sep 5, 2022
676c442
Read and write functionality of the S3drop implemented
awicenec Sep 7, 2022
189fcaf
Revamp of import_using_name
awicenec Sep 10, 2022
fdeb2c0
Fixed linting error
awicenec Sep 10, 2022
be1ee09
Various fixes
awicenec Sep 11, 2022
0ef0367
Multipart write to S3 working
awicenec Sep 14, 2022
5234bcf
Deal with known and unknown expected upload size
awicenec Sep 14, 2022
c92b7a1
Additional fixes for expected drop size in various places.
awicenec Sep 14, 2022
992cce2
Checksum is now correct
awicenec Sep 14, 2022
0057137
Checksum checking in CopyApp
awicenec Sep 14, 2022
e5b8a45
Have to figure out how to do the checksum check correctly
awicenec Sep 14, 2022
3e33371
Removed setting of expected size from CopyApp. Caused too many issues
awicenec Sep 15, 2022
ca30086
fixed log message
awicenec Sep 20, 2022
566693b
Various updates to get the S3DROP working and the xml2palette
awicenec Sep 28, 2022
e6477b3
Added in-line docs
awicenec Sep 29, 2022
b80b792
Working version
awicenec Sep 30, 2022
7d07866
Merge branch 'master' into liu-304
awicenec Oct 4, 2022
cbc3e7c
Added liu SVGs and endpoint_url parameter for S3
awicenec Oct 4, 2022
9e835c4
Fixed display of data drops as paralellograms
awicenec Oct 4, 2022
a1923aa
Updated pyfunc to make use of inspect.signature
awicenec Oct 5, 2022
8166978
updated in-line docs
awicenec Oct 5, 2022
a270cb2
more docstring updates
awicenec Oct 6, 2022
cceeed7
expireAfterUse defaults to True now
awicenec Oct 6, 2022
c4f4c65
Changes to DLM for control of EHT data drop
awicenec Oct 7, 2022
494aaa2
Fixed default file DLM behavior
awicenec Oct 7, 2022
a8b1971
changed default test dataset for S3 test
awicenec Oct 14, 2022
a4422ac
Merge branch 'master' into liu-304
awicenec Oct 14, 2022
9f4f4db
Merge with current master
awicenec Oct 14, 2022
8e5bfbb
Merge branch 'master' into liu-304
awicenec Oct 14, 2022
2ff9b47
Reverted some of the localhost replacements, might come back though
awicenec Oct 14, 2022
0a28610
Merge of block_dag fixed
awicenec Oct 14, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/run-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Install test dependencies
run: |
pip install -U coveralls pytest pytest-cov
pip install -U setuptools pip wheel dask dlg-example-cmpts
pip install -U setuptools pip wheel dask

- name: Install daliuge-common
run: pip install -e daliuge-common/
Expand Down
12 changes: 6 additions & 6 deletions OpenAPI/composite_manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ paths:
type: string
operationId: getCMNodes
description: Returns the list of nodes covered by this Composite Manager
'/api/nodes/{node}':
'/api/node/{node}':
parameters:
- schema:
type: string
Expand All @@ -58,7 +58,7 @@ paths:
'200':
description: OK
description: "Add `node` to this Composite Manager's nodes list"
'/api/nodes/{node}/sessions':
'/api/node/{node}/sessions':
parameters:
- schema:
type: string
Expand Down Expand Up @@ -103,7 +103,7 @@ paths:
description: Generic session information type
operationId: getNodeSessions
description: 'Get the list of sessions on `node`, managed by this Manager'
'/api/nodes/{node}/sessions/{sessionId}':
'/api/node/{node}/sessions/{sessionId}':
parameters:
- schema:
type: string
Expand All @@ -127,7 +127,7 @@ paths:
$ref: './manager_common.yaml#/components/schemas/session'
operationId: getNodeSessionInformation
description: Returns the main information of session `sessionId` in node `node`
'/api/nodes/{node}/sessions/{sessionId}/status':
'/api/node/{node}/sessions/{sessionId}/status':
parameters:
- schema:
type: string
Expand All @@ -151,7 +151,7 @@ paths:
type: integer
operationId: getNodeSessionStatus
description: Returns the status of `sessionId` in `node`
'/api/nodes/{node}/sessions/{sessionId}/graph':
'/api/node/{node}/sessions/{sessionId}/graph':
parameters:
- schema:
type: string
Expand All @@ -175,7 +175,7 @@ paths:
$ref: './manager_common.yaml#/components/schemas/physical_graph'
operationId: getNodeGraph
description: Returns the physical graph of session `sessionId` in `node`
'/api/nodes/{node}/sessions/{sessionId}/graph/status':
'/api/node/{node}/sessions/{sessionId}/graph/status':
parameters:
- schema:
type: string
Expand Down
4 changes: 2 additions & 2 deletions OpenAPI/tests/managers_test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from composite_manager_client.api.default_api import DefaultApi

nm_config = nmc.Configuration()
nm_config.host = "127.0.0.1:8000"
nm_config.host = "localhost:8000"
dim_config = cmc.Configuration()
dim_config.host = "127.0.0.1:8001"
dim_config.host = "localhost:8001"

with nmc.ApiClient(nm_config) as nm_client, cmc.ApiClient(dim_config) as dim_client:
dim = DefaultApi(dim_client)
Expand Down
2 changes: 1 addition & 1 deletion OpenAPI/tests/test_managers_openapi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ rm config.properties
tmpdir=`mktemp -d`
dlg nm -w . -v --no-dlm -l $tmpdir -w $tmpdir &
nm_pid=$!
dlg dim -v -N 127.0.0.1 -l $tmpdir -w $tmpdir &
dlg dim -v -N localhost -l $tmpdir -w $tmpdir &
dim_pid=$!
dlg lgweb -d $tmpdir -t $tmpdir -v &
lgweb_pid=$!
Expand Down
2 changes: 1 addition & 1 deletion OpenAPI/tests/translator_test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import translator_client as tc

translator_config = tc.Configuration()
translator_config.host = "127.0.0.1:8084"
translator_config.host = "localhost:8084"

with open(sys.argv[1], "rt") as f:
graph = f.read()
Expand Down
Empty file removed __init__.py
Empty file.
14 changes: 7 additions & 7 deletions daliuge-common/dlg/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,10 @@ def nodes(self):
return self._get_json("/nodes")

def add_node(self, node):
self._POST(f"/nodes/{node}", content=None)
self._POST(f"/node/{node}", content=None)

def remove_node(self, node):
self._DELETE(f"/nodes/{node}")
self._DELETE(f"/node/{node}")


class DataIslandManagerClient(CompositeManagerClient):
Expand Down Expand Up @@ -278,27 +278,27 @@ def __init__(

def create_island(self, island_host, nodes):
self._post_json(
f"/managers/{quote(island_host)}/dataisland", {"nodes": nodes}
f"/managers/{quote(island_host)}/island", {"nodes": nodes}
)

def dims(self):
return self._get_json("/islands")

def add_dim(self, dim):
self._POST(f"/islands/{dim}", content=None)
self._POST(f"/island/{dim}", content=None)

def remove_dim(self, dim):
self._DELETE(f"/islands/{dim}")
self._DELETE(f"/island/{dim}")

def add_node_to_dim(self, dim, nm):
"""
Adds a nm to a dim
"""
self._POST(
f"managers/{dim}/nodes/{nm}", content=None, )
f"/managers/{dim}/node/{nm}", content=None, )

def remove_node_from_dim(self, dim, nm):
"""
Removes a nm from a dim
"""
self._DELETE(f"managers/{dim}/nodes/{nm}")
self._DELETE(f"/managers/{dim}/node/{nm}")
22 changes: 18 additions & 4 deletions daliuge-common/dlg/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class Categories:
Categories.PLASMAFLIGHT,
Categories.PARSET,
Categories.ENVIRONMENTVARS,
Categories.S3,
}
APP_DROP_TYPES = [
Categories.COMPONENT,
Expand All @@ -90,12 +91,25 @@ class Categories:


class DropType:
PLAIN = "plain"
# this gives the mapping to fields containing class paths
DATA = "data" # TODO: need to drop this one
DATACLASS = "dataclass"
APPCLASS = "appclass"
SOCKET = "socket"
APP = "app" # Application drop that terminates onces executed
APP = "app" # TODO: need to drop this one
SERVICE_APP = "serviceapp" # App drop that runs continously
CONTAINER = "container" # Drop that contains other drops

class CategoryType:
DATA = "Data"
APPLICATION = "Application"
GROUP = "Group"
UNKNOWN = "Unknown"
SERVICE = "Service"
CONTAINER = "Container"
SOCKET = "Socket"
CONTROL = "Control"
OTHER = "Other"

def b2s(b, enc="utf8"):
"Converts bytes into a string"
Expand Down Expand Up @@ -200,7 +214,7 @@ def get_roots(pg_spec):
if dropspec.get("outputs", None):
do = _sanitize_links(dropspec["outputs"])
nonroots |= set(do)
elif dropspec["type"] == DropType.PLAIN:
elif dropspec["type"] == DropType.DATA:
if dropspec.get("producers", None):
nonroots.add(oid)
if dropspec.get("consumers", None):
Expand Down Expand Up @@ -245,7 +259,7 @@ def get_leaves(pg_spec):
if dropspec.get("inputs", None):
di = _sanitize_links(dropspec["inputs"])
nonleaves |= set(di)
elif dropspec["type"] == DropType.PLAIN:
elif dropspec["type"] == DropType.DATA:
if dropspec.get("producers", None):
dp = _sanitize_links(dropspec["producers"])
nonleaves |= set(dp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ def pgt_unroll_block_fields(category_type, rmode: ReproducibilityFlags):
if rmode != ReproducibilityFlags.NOTHING:
data["type"] = FieldOps.STORE
if rmode != ReproducibilityFlags.REPRODUCE:
if category_type != "plain":
if category_type != "data":
data["dt"] = FieldOps.STORE
if category_type == "plain":
if category_type == "data":
data["storage"] = FieldOps.STORE
if rmode in (ReproducibilityFlags.RECOMPUTE, ReproducibilityFlags.REPLICATE_COMP):
data["rank"] = FieldOps.STORE
Expand Down
12 changes: 12 additions & 0 deletions daliuge-common/dlg/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,18 @@ class InvalidGraphException(DaliugeException):
Daliuge.
"""

class DropChecksumException(DaliugeException):
"""
An exception thrown when a DROP does not pass a checksum check
"""
def __init__(self, drop):
DaliugeException.__init__(self, drop)
self.drop = drop
self.msg = "DropChecksumException <%r> checksum: %s" % (self.drop, drop.checksum)

def __str__(self, *args, **kwargs):
return self.msg


class NoDropException(DaliugeException):
"""
Expand Down
4 changes: 2 additions & 2 deletions daliuge-engine/dlg/apps/dynlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ def _to_c_output(o):
Convert an output drop into its corresponding C structure
"""

def _write(_o, buf, n):
return _o.write(buf[:n])
def _write(_o, buf, n, **kwargs):
return _o.write(buf[:n], **kwargs)

w = _write_cb_type(functools.partial(_write, o))
return CDlgOutput(
Expand Down
Loading