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

AWS: Allow using "snapshot_accouts" from StArMap #97

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions src/pubtools/_marketplacesvm/tasks/push/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ def _push_upload(
pi,
custom_tags=mapped_item.get_tags_for_marketplace(marketplace),
accounts=meta.get("sharing_accounts", []),
snapshot_accounts=meta.get("snapshot_accounts", []),
Copy link
Collaborator

Choose a reason for hiding this comment

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

@JAVGan I though we need tit for community workflow and not for stratosphere
and looks like we already have it in the community workflow

But related slack discussion is still in my TODO list.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Great! I thought we would need it for the stratosphere workflow as well... Do you still think it makes sense to include it on such workflow? Or is it better to close the PR?

ami_version_template=mapped_item.get_ami_version_template_for_mapped_item(
marketplace
),
Expand Down
4 changes: 2 additions & 2 deletions tests/combined_push/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,14 @@ def starmap_response_azure() -> List[Dict[str, Any]]:

@pytest.fixture
def starmap_query_aws_marketplace(
starmap_response_aws_marketplace: Dict[str, Any]
starmap_response_aws_marketplace: Dict[str, Any],
) -> QueryResponseContainer:
return QueryResponseContainer.from_json(starmap_response_aws_marketplace)


@pytest.fixture
def starmap_query_aws_community(
starmap_response_aws_community: Dict[str, Any]
starmap_response_aws_community: Dict[str, Any],
) -> QueryResponseContainer:
return QueryResponseContainer.from_json(starmap_response_aws_community)

Expand Down
2 changes: 1 addition & 1 deletion tests/delete/test_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def fake_ami_source_dif_amis(

@pytest.fixture()
def bad_fake_vmi_source(
bad_pub_response_vmi: List[Dict[str, str]]
bad_pub_response_vmi: List[Dict[str, str]],
) -> Generator[mock.MagicMock, None, None]:
with mock.patch("pubtools._marketplacesvm.tasks.delete.command.Source") as m:
m.get.return_value.__enter__.return_value = bad_pub_response_vmi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[ INFO] Retrieving the mappings for second_push_item from https://starmap-example.com
[ ERROR] No marketplace mappings found for second-build on cloud aws
[ WARNING] Missing information for the attribute ami_pushitem.build, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.opener, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.description, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.boot_mode, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.cloud_info, leaving it unset.
Expand Down Expand Up @@ -49,6 +50,7 @@
[ DEBUG] Merging original release information with data from StArMap
[ DEBUG] Creating a VMIRelease object with {'product': 'sample_product', 'date': datetime.datetime(2023, 12, 12, 0, 0), 'arch': 'x86_64', 'respin': 1, 'version': '7.0', 'base_product': 'sample_base', 'base_version': '1.0', 'variant': 'variant', 'type': 'ga'}
[ WARNING] Missing information for the attribute ami_pushitem.build, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.opener, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.boot_mode, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.cloud_info, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.marketplace_title_template, leaving it unset.
Expand Down Expand Up @@ -83,6 +85,7 @@
[ DEBUG] Merging original release information with data from StArMap
[ DEBUG] Creating a VMIRelease object with {'product': 'sample_product', 'date': datetime.datetime(2023, 12, 12, 0, 0), 'arch': 'x86_64', 'respin': 1, 'version': '7.0', 'base_product': 'sample_base', 'base_version': '1.0', 'variant': 'variant', 'type': 'ga'}
[ WARNING] Missing information for the attribute ami_pushitem.build, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.opener, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.boot_mode, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.cloud_info, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.marketplace_title_template, leaving it unset.
Expand Down Expand Up @@ -117,6 +120,7 @@
[ DEBUG] Merging original release information with data from StArMap
[ DEBUG] Creating a VMIRelease object with {'product': 'sample_product', 'date': datetime.datetime(2023, 12, 12, 0, 0), 'arch': 'x86_64', 'respin': 1, 'version': '7.0', 'base_product': 'sample_base', 'base_version': '1.0', 'variant': 'variant', 'type': 'ga'}
[ WARNING] Missing information for the attribute ami_pushitem.build, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.opener, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.boot_mode, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.cloud_info, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.marketplace_title_template, leaving it unset.
Expand Down Expand Up @@ -151,6 +155,7 @@
[ DEBUG] Merging original release information with data from StArMap
[ DEBUG] Creating a VMIRelease object with {'product': 'sample_product', 'date': datetime.datetime(2023, 12, 12, 0, 0), 'arch': 'x86_64', 'respin': 1, 'version': '7.0', 'base_product': 'sample_base', 'base_version': '1.0', 'variant': 'variant', 'type': 'ga'}
[ WARNING] Missing information for the attribute ami_pushitem.build, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.opener, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.boot_mode, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.cloud_info, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.marketplace_title_template, leaving it unset.
Expand Down Expand Up @@ -185,6 +190,7 @@
[ DEBUG] Merging original release information with data from StArMap
[ DEBUG] Creating a VMIRelease object with {'product': 'sample_product', 'date': datetime.datetime(2023, 12, 12, 0, 0), 'arch': 'x86_64', 'respin': 1, 'version': '7.0', 'base_product': 'sample_base', 'base_version': '1.0', 'variant': 'variant', 'type': 'ga'}
[ WARNING] Missing information for the attribute ami_pushitem.build, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.opener, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.boot_mode, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.cloud_info, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.marketplace_title_template, leaving it unset.
Expand Down Expand Up @@ -219,6 +225,7 @@
[ DEBUG] Merging original release information with data from StArMap
[ DEBUG] Creating a VMIRelease object with {'product': 'sample_product', 'date': datetime.datetime(2023, 12, 12, 0, 0), 'arch': 'x86_64', 'respin': 1, 'version': '7.0', 'base_product': 'sample_base', 'base_version': '1.0', 'variant': 'variant', 'type': 'ga'}
[ WARNING] Missing information for the attribute ami_pushitem.build, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.opener, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.boot_mode, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.cloud_info, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.marketplace_title_template, leaving it unset.
Expand Down Expand Up @@ -253,6 +260,7 @@
[ DEBUG] Merging original release information with data from StArMap
[ DEBUG] Creating a VMIRelease object with {'product': 'sample_product', 'date': datetime.datetime(2023, 12, 12, 0, 0), 'arch': 'x86_64', 'respin': 1, 'version': '7.0', 'base_product': 'sample_base', 'base_version': '1.0', 'variant': 'variant', 'type': 'ga'}
[ WARNING] Missing information for the attribute ami_pushitem.build, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.opener, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.boot_mode, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.cloud_info, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.marketplace_title_template, leaving it unset.
Expand Down Expand Up @@ -287,6 +295,7 @@
[ DEBUG] Merging original release information with data from StArMap
[ DEBUG] Creating a VMIRelease object with {'product': 'sample_product', 'date': datetime.datetime(2023, 12, 12, 0, 0), 'arch': 'x86_64', 'respin': 1, 'version': '7.0', 'base_product': 'sample_base', 'base_version': '1.0', 'variant': 'variant', 'type': 'ga'}
[ WARNING] Missing information for the attribute ami_pushitem.build, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.opener, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.boot_mode, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.cloud_info, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.marketplace_title_template, leaving it unset.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[ INFO] Retrieving the mappings for second_push_item from https://starmap-example.com
[ ERROR] No marketplace mappings found for test-build on cloud aws
[ WARNING] Missing information for the attribute ami_pushitem.build, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.opener, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.description, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.boot_mode, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.cloud_info, leaving it unset.
Expand Down Expand Up @@ -49,6 +50,7 @@
[ DEBUG] Merging original release information with data from StArMap
[ DEBUG] Creating a VMIRelease object with {'product': 'sample_product', 'date': datetime.datetime(2023, 12, 12, 0, 0), 'arch': 'x86_64', 'respin': 1, 'version': '7.0', 'base_product': 'sample_base', 'base_version': '1.0', 'variant': 'variant', 'type': 'ga'}
[ WARNING] Missing information for the attribute ami_pushitem.build, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.opener, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.boot_mode, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.cloud_info, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.marketplace_title_template, leaving it unset.
Expand Down Expand Up @@ -83,6 +85,7 @@
[ DEBUG] Merging original release information with data from StArMap
[ DEBUG] Creating a VMIRelease object with {'product': 'sample_product', 'date': datetime.datetime(2023, 12, 12, 0, 0), 'arch': 'x86_64', 'respin': 1, 'version': '7.0', 'base_product': 'sample_base', 'base_version': '1.0', 'variant': 'variant', 'type': 'ga'}
[ WARNING] Missing information for the attribute ami_pushitem.build, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.opener, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.boot_mode, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.cloud_info, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.marketplace_title_template, leaving it unset.
Expand Down Expand Up @@ -117,6 +120,7 @@
[ DEBUG] Merging original release information with data from StArMap
[ DEBUG] Creating a VMIRelease object with {'product': 'sample_product', 'date': datetime.datetime(2023, 12, 12, 0, 0), 'arch': 'x86_64', 'respin': 1, 'version': '7.0', 'base_product': 'sample_base', 'base_version': '1.0', 'variant': 'variant', 'type': 'ga'}
[ WARNING] Missing information for the attribute ami_pushitem.build, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.opener, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.boot_mode, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.cloud_info, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.marketplace_title_template, leaving it unset.
Expand Down Expand Up @@ -151,6 +155,7 @@
[ DEBUG] Merging original release information with data from StArMap
[ DEBUG] Creating a VMIRelease object with {'product': 'sample_product', 'date': datetime.datetime(2023, 12, 12, 0, 0), 'arch': 'x86_64', 'respin': 1, 'version': '7.0', 'base_product': 'sample_base', 'base_version': '1.0', 'variant': 'variant', 'type': 'ga'}
[ WARNING] Missing information for the attribute ami_pushitem.build, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.opener, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.boot_mode, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.cloud_info, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.marketplace_title_template, leaving it unset.
Expand Down Expand Up @@ -185,6 +190,7 @@
[ DEBUG] Merging original release information with data from StArMap
[ DEBUG] Creating a VMIRelease object with {'product': 'sample_product', 'date': datetime.datetime(2023, 12, 12, 0, 0), 'arch': 'x86_64', 'respin': 1, 'version': '7.0', 'base_product': 'sample_base', 'base_version': '1.0', 'variant': 'variant', 'type': 'ga'}
[ WARNING] Missing information for the attribute ami_pushitem.build, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.opener, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.boot_mode, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.cloud_info, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.marketplace_title_template, leaving it unset.
Expand Down Expand Up @@ -219,6 +225,7 @@
[ DEBUG] Merging original release information with data from StArMap
[ DEBUG] Creating a VMIRelease object with {'product': 'sample_product', 'date': datetime.datetime(2023, 12, 12, 0, 0), 'arch': 'x86_64', 'respin': 1, 'version': '7.0', 'base_product': 'sample_base', 'base_version': '1.0', 'variant': 'variant', 'type': 'ga'}
[ WARNING] Missing information for the attribute ami_pushitem.build, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.opener, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.boot_mode, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.cloud_info, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.marketplace_title_template, leaving it unset.
Expand Down Expand Up @@ -253,6 +260,7 @@
[ DEBUG] Merging original release information with data from StArMap
[ DEBUG] Creating a VMIRelease object with {'product': 'sample_product', 'date': datetime.datetime(2023, 12, 12, 0, 0), 'arch': 'x86_64', 'respin': 1, 'version': '7.0', 'base_product': 'sample_base', 'base_version': '1.0', 'variant': 'variant', 'type': 'ga'}
[ WARNING] Missing information for the attribute ami_pushitem.build, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.opener, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.boot_mode, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.cloud_info, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.marketplace_title_template, leaving it unset.
Expand Down Expand Up @@ -287,6 +295,7 @@
[ DEBUG] Merging original release information with data from StArMap
[ DEBUG] Creating a VMIRelease object with {'product': 'sample_product', 'date': datetime.datetime(2023, 12, 12, 0, 0), 'arch': 'x86_64', 'respin': 1, 'version': '7.0', 'base_product': 'sample_base', 'base_version': '1.0', 'variant': 'variant', 'type': 'ga'}
[ WARNING] Missing information for the attribute ami_pushitem.build, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.opener, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.boot_mode, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.cloud_info, leaving it unset.
[ WARNING] Missing information for the attribute ami_pushitem.marketplace_title_template, leaving it unset.
Expand Down
Loading