-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- default base docker image set to CALDP_20221010_CAL_final - default crds update to hst_1038.pmap - pull cert chain from ami where the image is built - significant unit test coverage additions - node install bugfix in ami-rotation userdata Co-authored-by: Brian Hayden <[email protected]> Co-authored-by: jshihstsci <[email protected]>
- Loading branch information
1 parent
c9a6ce6
commit 2bb0f5d
Showing
34 changed files
with
2,353 additions
and
65 deletions.
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
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 |
---|---|---|
@@ -1 +1,5 @@ | ||
- hotfix for protobuf pinned to 3.20.1 to deal with dependency-related error in modeling lambda/training images | ||
- default base docker image set to CALDP_20221010_CAL_final | ||
- default crds update to hst_1038.pmap | ||
- pull cert chain from ami where the image is built | ||
- significant unit test coverage additions | ||
- node install bugfix in ami-rotation userdata |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
[tool.black] | ||
line-length = 120 | ||
line-length = 120 | ||
|
||
[tool.pytest.ini_options] | ||
pythonpath = [ | ||
"." | ||
] |
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
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 @@ | ||
{"Records": [{"eventVersion": "2.1", "eventSource": "aws:s3", "awsRegion": "us-east-1", "eventTime": "2022-07-25T15:51:12.813Z", "eventName": "ObjectCreated:Put", "userIdentity": {"principalId": "xxxxxxxxxxx"}, "requestParameters": {"sourceIPAddress": "xxxxxxxxxxx"}, "responseElements": {"x-amz-request-id": "xxxxxxxxxxx", "x-amz-id-2": "xxxxxxxxxxx"}, "s3": {"s3SchemaVersion": "1.0", "configurationId": "xxxxxxxxxxx", "bucket": {"name": "calcloud-processing-moto", "ownerIdentity": {"principalId": "xxxxxxxxxxx"}, "arn": "arn:aws:s3:::calcloud-processing-moto"}, "object": {"key": "messages/clean-ipppssoot", "size": 0, "eTag": "xxxxxxxxxxx", "sequencer": "xxxxxxxxxxx"}}}]} |
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,26 @@ | ||
Records: | ||
- awsRegion: us-east-1 | ||
eventName: ObjectCreated:Put | ||
eventSource: aws:s3 | ||
eventTime: '2022-07-25T15:51:12.813Z' | ||
eventVersion: '2.1' | ||
requestParameters: | ||
sourceIPAddress: xxxxxxxxxxx | ||
responseElements: | ||
x-amz-id-2: xxxxxxxxxxx | ||
x-amz-request-id: xxxxxxxxxxx | ||
s3: | ||
bucket: | ||
arn: arn:aws:s3:::calcloud-processing-moto | ||
name: calcloud-processing-moto | ||
ownerIdentity: | ||
principalId: xxxxxxxxxxx | ||
configurationId: xxxxxxxxxxx | ||
object: | ||
eTag: xxxxxxxxxxx | ||
key: messages/generic-ipppssoot | ||
sequencer: xxxxxxxxxxx | ||
size: 0 | ||
s3SchemaVersion: '1.0' | ||
userIdentity: | ||
principalId: xxxxxxxxxxx |
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,83 @@ | ||
"""This module exists because importing calcloud into conftest.py causes doctests to run and fail, | ||
and I don't know why. But it doesn't happen with this module.""" | ||
|
||
import copy | ||
|
||
from calcloud import io | ||
|
||
|
||
def assert_empty_messages(comm): | ||
messages = comm.messages.listl() | ||
assert len(messages) == 0 | ||
|
||
|
||
def setup_diverse_messages(comm, overrides={}): | ||
"""posts messages of most types from io.MESSAGE_TYPES | ||
ignores broadcast and clean message types | ||
note (bhayden): I tried putting this function into conftest | ||
but importing calcloud.io caused pytest to run all of the doctests | ||
and fail miserably. | ||
""" | ||
assert_empty_messages(comm) | ||
|
||
# we'll make a message of each type for a unique list of ipppssoots | ||
message_types = copy.copy(io.MESSAGE_TYPES) | ||
# ... except for broadcast and clean | ||
message_types.remove("broadcast") | ||
message_types.remove("clean") | ||
|
||
# insert the messages | ||
ipppssoots = [] | ||
for i, m in enumerate(message_types): | ||
ipst = f"ipppss{str(i).zfill(2)}t" | ||
ipppssoots.append(ipst) | ||
comm.messages.put(f"{m}-{ipst}", payload=overrides) | ||
|
||
# read them back and assert they're there | ||
mess = comm.messages.listl() | ||
for i, m in enumerate(message_types): | ||
ipst = f"ipppss{str(i).zfill(2)}t" | ||
assert f"{m}-{ipst}" in mess | ||
|
||
return ipppssoots, message_types | ||
|
||
|
||
def setup_ingest_messages(comm, overrides={}): | ||
"""adds a few extra ingested messages to the diverse messages list""" | ||
ipppssoots, message_types = setup_diverse_messages(comm, overrides) | ||
n = len(ipppssoots) | ||
|
||
# insert the extra ingested messages | ||
for i in range(3): | ||
ipst = f"ipppss{str(i+n).zfill(2)}t" | ||
comm.messages.put(f"ingested-{ipst}", payload=overrides) | ||
ipppssoots.append(ipst) | ||
message_types.append("ingested") | ||
|
||
# read all messages back and assert they match the lists | ||
mess = comm.messages.listl() | ||
for i, m in enumerate(message_types): | ||
ipst = f"ipppss{str(i).zfill(2)}t" | ||
assert f"{m}-{ipst}" in mess | ||
return ipppssoots, message_types | ||
|
||
|
||
def setup_error_messages(comm, overrides={}): | ||
"""adds a few extra error messages to the diverse messages list""" | ||
ipppssoots, message_types = setup_diverse_messages(comm, overrides=overrides) | ||
n = len(ipppssoots) | ||
|
||
# insert the extra error messages | ||
for i in range(3): | ||
ipst = f"ipppss{str(i+n).zfill(2)}t" | ||
comm.messages.put(f"error-{ipst}", payload=overrides) | ||
ipppssoots.append(ipst) | ||
message_types.append("error") | ||
print("error", ipst, comm.messages.get(f"{'error'}-{ipst}")) | ||
|
||
# read all messages back and assert they match the lists | ||
mess = comm.messages.listl() | ||
for i, m in enumerate(message_types): | ||
ipst = f"ipppss{str(i).zfill(2)}t" | ||
assert f"{m}-{ipst}" in mess | ||
return ipppssoots, message_types |
Oops, something went wrong.