Skip to content

Commit

Permalink
Grab capabilities/run as context from latest app version available
Browse files Browse the repository at this point in the history
  • Loading branch information
sonicaj committed Sep 19, 2024
1 parent 349740b commit 357c34c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions apps_ci/scripts/catalog_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,17 @@ def get_trains(location: str) -> typing.Tuple[dict, dict]:
else:
catalog_data[train_name][app_name][k] = v

# We will add capabilities and run as context from latest version to catalog data now
latest_version = app_data.get('latest_version')
metadata_info = {'capabilities': [], 'run_as_context': []}
if latest_version in app_data.get('versions', {}):
version_metadata_info = app_data['versions'][latest_version].get('app_metadata', {})
metadata_info.update({
'capabilities': version_metadata_info.get('capabilities', metadata_info['capabilities']),
'run_as_context': version_metadata_info.get('run_as_context', metadata_info['run_as_context']),
})
catalog_data[train_name][app_name].update(metadata_info)

return catalog_data, versions_data


Expand Down

0 comments on commit 357c34c

Please sign in to comment.