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

Adds to AMI Access Endpoint URL used for aws marketplace #463

Merged

Conversation

jajreidy
Copy link
Contributor

Adds to AMI ability to add access endpoint url. Used for version creation for some products in AWS Marketplace.

Refers to SPSTRAT-126

@jajreidy
Copy link
Contributor Author

@lslebodn @JAVGan PTAL as well

Copy link

codecov bot commented Feb 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (848c637) 100.00% compared to head (1614bb4) 100.00%.
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #463   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           53        53           
  Lines         2335      2344    +9     
=========================================
+ Hits          2335      2344    +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

minimum: 0
maximum: 65536
protocol:
enum: ["http", "https"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you confirm the supported types are just these in some docs? Or are we just following the logic here as the endpoint must be a web one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I checked via the WebUI when creating a version.

Copy link
Member

Choose a reason for hiding this comment

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

Related to my other comment about "scheme" vs "protocol", does this follow some existing API which uses "protocol"?

@JAVGan
Copy link
Contributor

JAVGan commented Feb 20, 2024

Just adding a bit of context: this will be required for some AMIs with certain products that has administrative Web pages exposed as an endpoint, like JBoss EAP.

port = attr.ib(type=int, validator=instance_of(int))
"""Port to access the endpoint URL."""

protocol = attr.ib(type=str, validator=instance_of_str)
Copy link
Member

Choose a reason for hiding this comment

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

Minor: I'm not sure if you are copying some existing AWS API which already uses the term "protocol". If so, ignore this.

But in the context of a URL, this part of a URL is referred to as a "scheme", not "protocol". For example the named tuple returned by https://docs.python.org/3/library/urllib.parse.html uses "scheme". Given that this class also represents a URL, it would be nice to be consistent with that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it's part of the create changeset for product versions. They still don't have a doc showing all possible inputs for it in Boto3. So we're kinda left checking their own API inputs and going from there.


@classmethod
def _from_data(cls, data):
"""Instantiate SecurityGroup from raw dict"""
Copy link
Member

Choose a reason for hiding this comment

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

False copy-pasted comment, this isn't a SecurityGroup.

Deleting a comment entirely is preferred over copy-pasting an incorrect one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed, fixed.

default=None,
validator=optional(instance_of(AmiAccessEndpointUrl)),
)
"""Billing codes associated with this image."""
Copy link
Member

Choose a reason for hiding this comment

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

Another false copy-pasted comment/doc string (this will be part of the public docs so it has to be fixed).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same here

minimum: 0
maximum: 65536
protocol:
enum: ["http", "https"]
Copy link
Member

Choose a reason for hiding this comment

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

Related to my other comment about "scheme" vs "protocol", does this follow some existing API which uses "protocol"?

@jajreidy jajreidy force-pushed the add-aws-access-endpoint-url branch from 648f7f5 to 1614bb4 Compare February 21, 2024 13:11
@rohanpm rohanpm merged commit 747bdde into release-engineering:master Feb 21, 2024
8 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.

3 participants