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

adding support for module manifest schema #621

Merged
merged 3 commits into from
Jun 13, 2024

Conversation

dgraeber
Copy link
Contributor

Issue #, if available:
#612
Description of changes:
Adding support to fetch only the module manifest schema

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

elif "module" == type.lower():
return ModuleManifest.model_json_schema()
else:
return None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nitpick: We could just raise an error here, and that way wouldn't need to change the return type of the function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm...will check

Comment on lines 795 to 796
if type not in ["deployment", "module"]:
print_bolded(message="Only 'deployment' or 'module' can be passed in", color="yellow")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use click.Choice to perform this validation for us.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will research

@@ -67,4 +67,4 @@ def test_get_build_params(mocker):
@pytest.mark.mgmt
@pytest.mark.mgmt_build_info
def test_validate_group_parameters():
bi.get_manifest_schema()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we maybe want another unit test here for type="module"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep....can do

@dgraeber dgraeber requested review from LeonLuttenberger and srinivasreddych and removed request for NickCorbett June 13, 2024 17:12
@dgraeber dgraeber merged commit cf1a8f5 into awslabs:main Jun 13, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants