Giter VIP home page Giter VIP logo

Comments (5)

lucashuy avatar lucashuy commented on September 24, 2024

Thanks for opening this feature request. It looks like the inverse of the flag needs to be configured (ie. --no-resolve-s3) so that your desired behaviour is achieved. Let me raise this with the team for prioritization and to see if this aligns with what we wanted to do with this option.

In the mean time, I'm going to mark this as a good first issue for folks that wanted to contribute to this project.

from aws-sam-cli.

nitintecg avatar nitintecg commented on September 24, 2024

@lucashuy I would like to contribute this issue. I'm having doubt that new option--no-resolve-s3 will ignores resolve-s3 option if its present. for eg like this in deploy command.py file

if not no_resolve_s3 and resolve_s3: # here means resolve_s3 will be supported when no_resolve_s3 is not present
            if bool(s3_bucket):
                raise DeployResolveS3AndS3SetError()

am i right here ?

from aws-sam-cli.

lucashuy avatar lucashuy commented on September 24, 2024

Hi @nitintecg, this would actually be something that is changed in the existing click option, as opposed to a new option or flag. The click documentation for this behaviour can be found here: https://click.palletsprojects.com/en/8.1.x/options/#boolean-flags, and an example of how we do this with a different flag in our code can be found here:

def experimental_click_option(default: Optional[bool]):
return click.option(
"--beta-features/--no-beta-features",
default=default,
required=False,
is_flag=True,
expose_value=False,
callback=_experimental_option_callback,
help="Enable/Disable beta features.",
)

Since resolve_s3 is a boolean, we can just use the same variable by updating the existing option.

from aws-sam-cli.

lucashuy avatar lucashuy commented on September 24, 2024

The place where we define our --resolve-s3 flag can be found here:

return click.option(
"--resolve-s3",
required=False,
is_flag=True,
callback=callback,
help="Automatically resolve AWS S3 bucket for non-guided deployments. "
"Enabling this option will also create a managed default AWS S3 bucket for you. "
"If one does not provide a --s3-bucket value, the managed bucket will be used. "
"Do not use --guided with this option.",
)

The changes here should be adding the inverse to the flag, and updating/adding any new unit tests to validate that the new inverse doesn't break anything.

Integration tests that actually deploy resources can be run too, but incurs any related AWS costs. The team can help out with running or writing these tests when you're ready for that.

from aws-sam-cli.

github-actions avatar github-actions commented on September 24, 2024

Patch is released in v1.119.0. Closing

from aws-sam-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.