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
BREAKING - Update function name displaying for info plugin #3239
Conversation
hmmm imo we should not merge this. If the user wants to know the "short name" of the function he can look at So I see no value in displaying the short name in the CLI, but I see some value for displaying the actual lambda name in the CLI Just my two cents 😊 🙌 |
Do you think some users might be using the stdout of the CLI in CI or such systems? |
The main problem with the current approach is that new users who come to the framework might have problems with that since they do smth. like the following:
Then they see the output of the @brianneisler stumbled upon this issue. At first, I too thought that it makes sense to display the full AWS name. The problem is that our goal is to keep the user out of the AWS console as much as possible. So why should the user see the name the function is deployed under on AWS. Another valid argument is that he can see the name in the Maybe @brianneisler can share his view about this here.
We've had the exact same issue when @nikgraf reviewed a PR where the output of the |
Just pushed a change so that we get the best of both worlds. The output now looks something like this and includes the name in the Service Information
service: service
stage: dev
region: us-east-1
api keys:
None
endpoints:
GET - https://foo.execute-api.us-east-1.amazonaws.com/dev/goodbye
functions:
hello: service-dev-hello
goodbye: service-dev-goodbye |
Deal Philipp, you are AWESOME! 😄 🥇 Haven't thought about all those points, thanks for clarifying! Ok I say let's declare this as a breaking change, so that we do our part and notify the user about it. So that means lets merge this after the 1.7 release, and I'll add a note about it as a breaking change. I think it'll hit very few subset of users, but we care about them too 😊 |
@eahefnawy Thanks for the feedback!
❤️ Adding this to the next milestone as a breaking change sounds good to me! |
BTW. The only user which comes to my mind who parses CLI output is... Serverless 😆 Remember the regex magic for the API keys integration test? serverless/tests/integration/aws/api-gateway/integration-lambda-proxy/api-keys/tests.js Lines 43 to 48 in cc94945
yikes 😅 |
What did you implement:
Updates the
name
so that it's the name one would use for e.g. theinvoke
command rather than the name on AWS (which introduces confusion)./cc @brianneisler
How did you implement it:
Simply renamed the function name in the
awsInfo
plugin.How can we verify it:
See the tests or do a
serverless deploy
orserverless info
.Todos:
Is this ready for review?: YES
Is it a breaking change?: YES...for CI systems depending on stdout