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

feat: Dynamically determine latest init runtime #7593

Merged
merged 3 commits into from
Oct 25, 2024

Conversation

lucashuy
Copy link
Contributor

@lucashuy lucashuy commented Oct 21, 2024

Which issue(s) does this change fix?

None

Why is this change necessary?

The current "most popular" runtime is hard coded to Python 3.9.

How does it address the issue?

Dynamically checks the (Python) runtimes we support, and returns the latest one.

Choose an AWS Quick Start application template
        1 - Hello World Example
        2 - Data processing
.
.
<truncated>
.
.
Template: 1

Use the most popular runtime and package type? (python3.12 and zip) [y/N]: y

Would you like to enable X-Ray tracing on the function(s) in your application?  [y/N]: 

Would you like to enable monitoring using CloudWatch Application Insights?
For more info, please view https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch-application-insights.html [y/N]: 

Would you like to set Structured Logging in JSON format on your Lambda functions?  [y/N]: 

Project name [sam-app]: sam2

    -----------------------
    Generating application:
    -----------------------
    Name: sam2
    Runtime: python3.12
    Architectures: x86_64
    Dependency Manager: pip
    Application Template: hello-world
    Output Directory: .
    Configuration file: sam2/samconfig.toml
    
    Next steps can be found in the README file at sam2/README.md

$ cat sam2/template.yaml | grep Runtime
      Runtime: python3.12

What side effects does this change have?

None.

Mandatory Checklist

PRs will only be reviewed after checklist is complete

  • Add input/output type hints to new functions/methods
  • Write design document if needed (Do I need to write a design document?)
  • Write/update unit tests
  • Write/update integration tests
  • Write/update functional tests if needed
  • make pr passes
  • make update-reproducible-reqs if dependencies were changed
  • Write documentation

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

samcli/commands/init/interactive_init_flow.py Outdated Show resolved Hide resolved
samcli/commands/init/interactive_init_flow.py Outdated Show resolved Hide resolved
tests/unit/commands/init/test_cli.py Outdated Show resolved Hide resolved
@lucashuy lucashuy added this pull request to the merge queue Oct 24, 2024
Merged via the queue into aws:develop with commit 6ea45a7 Oct 25, 2024
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants