-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[WIP] sam publish app design doc #819
Conversation
|
||
1. Add a new top-level command called ``sam publish app`` with the following options. | ||
|
||
-t, --template PATH AWS SAM template to publish. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any defaults to this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can make the default template path the same as other sam commands, what would be a good value?
*Explain how this feature will be implemented. Highlight the components of your implementation, relationships* | ||
*between components, constraints, etc.* | ||
|
||
SAM CLI will read the packaged SAM template and pass it as string to `aws-serverlessrepo-python <https://github.com/awslabs/aws-serverlessrepo-python>`_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't exist.
Adding another dependency isn't trivial and has lots of questions:
- How do we keep SAM CLI updated to the latest (or recently latest versions)?
- What python versions does this support?
- Will this library support all new versions?
- Is there an SLA for supporting new python versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I just made it public. We don't expect this library to be frequently updated, and we will make sure that SAM CLI gets updated to the latest version following any required processes.
The library supports the same versions that SAM CLI support: https://github.com/awslabs/aws-serverlessrepo-python/blob/master/setup.py#L50. I use Tox to test against different Python versions and will set up integration with Travis to run tests for every code changes.
We haven't considered about supporting new Python versions or the SLA, happy to discuss the details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Will use the same dependency versions as SAM CLI: https://github.com/awslabs/aws-serverlessrepo-python/blob/b029e3c3dfebcedb53d1c1ef4c92e71527bdc32b/setup.py#L8-L12
- The library is integrated with Travis to run tests against Python 2.7, 3.6, 3.7: https://github.com/awslabs/aws-serverlessrepo-python/blob/master/.travis.yml
designs/sam_publish_app_cmd.rst
Outdated
|
||
Out-of-Scope | ||
------------ | ||
#. Create new application or version if the ``--meta-data`` option is used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is only to update an application? If this isn't being used to publishing, why it is an option for the sam publish app
command?
What is the reason this isn't supported with publishing an app?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In SAR, application version and metadata are separate entities, so updating the metadata doesn't create a new version. Initially we thought about just using sam publish app
to update metadata and publish app, but there are some fields that can't be modified after the app/version is created which makes it complicated.
For example, license can't be changed after an app is created, if customers provide a different license, should we ignore it or fail the command? Ignoring the new license value may make customers feel that it has been updated because the publish command succeeds. Failing the command would require them to provide different metadata spec.
Considering the above, we decided to separate updating metadata from publishing app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR to support updating metadata with publishing and returning details if you'd like to take a look: amazon-archives/aws-serverlessrepo-python#14.
889a984
to
a1bfa61
Compare
@paoptu023 Please fork the repo and work from that instead of pushing work to the main repo. This is called out in our CONTRIBUTING.md in the "To send us a pull request, please:" section. |
Closing in favor of #844. |
Issue #, if available:
N/A
Description of changes:
Design doc for
sam publish app
commandChecklist:
make pr
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.