Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 9 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ on:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions: #Needed for OIDC authentication
id-token: write
contents: read
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Expand Down Expand Up @@ -42,10 +44,14 @@ jobs:
# show loaded versions of various poetry-related libraries
pip freeze --all | egrep '(pip|poetry(.[a-z]+)?|tomlkit)=='

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_OIDC_ROLE_ARN }}
aws-region: us-east-1

- name: QA
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
S3_ENCRYPT_KEY: ${{ secrets.S3_ENCRYPT_KEY }}
GLOBAL_ENV_BUCKET: foursight-envs
run: |
Expand Down
3 changes: 2 additions & 1 deletion dcicutils/structured_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ def set_value_backtrack_object(path_index: int, path_element: str) -> None:

original_data = data
json_value = None
is_schema_string = typeinfo is not None and typeinfo.get("type") == "string"
if isinstance(path[-1], int) and (json_value := load_json_if(value, is_array=True)):
path = right_trim(path, remove=lambda value: isinstance(value, int))
for i, p in enumerate(path[:-1]):
Expand All @@ -631,7 +632,7 @@ def set_value_backtrack_object(path_index: int, path_element: str) -> None:
values = [mapv(value, src) for value in values]
merge_objects(data, values)
else:
if json_value or (json_value := load_json_if(value, is_array=True, is_object=True)):
if json_value or (not is_schema_string and (json_value := load_json_if(value, is_array=True, is_object=True))):
data[p] = json_value
else:
if isinstance(p, str) and (not isinstance(data, dict) or p not in data):
Expand Down
Loading
Loading