question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sls print is including deprecation text

See original GitHub issue

Yes, version 2.16.0

I’m using “sls print” within a bash script to resolve variables. This is read from YAML format, and piped to a an output file which is also expected to contain YAML. The deprecation text is also written out, which renders it invalid YAML when trying to parse/query with yq library.

Apologies, I cannot include the full configuration. Regardless - there is nothing special to this issue; it simply requires a version of serverless for which “sls print” includes the deprecation text as output, and a script using yq to read any arbitrary property from it.

sls print
–stage ${SLS_STAGE}
–region ${AWS_REGION} \

/tmp/serverless.yml

⚠️⚠️ REPLACE WITH FULL COMMAND OUTPUT

myservice-api | Y A M L Exception -------------------------------------- myservice-api |
myservice-api | incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line in “/var/task/serverless.yml” at line 1, column 32: myservice-api | Serverless: Deprecation warning: Starting with next major versi … myservice-api | ^ myservice-api |
myservice-api | Get Support -------------------------------------------- myservice-api | Docs: docs.serverless.com myservice-api | Bugs: github.com/serverless/serverless/issues myservice-api | Issues: forum.serverless.com myservice-api |
myservice-api | Your Environment Information --------------------------- myservice-api | Operating System: linux myservice-api | Node Version: 10.18.0 myservice-api | Framework Version: 2.16.0 myservice-api | Plugin Version: 4.3.0 myservice-api | SDK Version: 2.3.2 myservice-api | Components Version: 3.4.3

⚠️⚠️ REPLACE WITH `serverless --version` OUTPUT

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
thetumpercommented, Dec 22, 2020

The env variable worked. Thank you for that! Specifically, I used in my bash startup script:

export SLS_DEPRECATION_DISABLE=*

0reactions
pgrzesikcommented, Dec 23, 2020

Hello @thetumper, thanks for reporting back. As for using the variable, I believe you should still be able to prepend your command with SLS_DEPRECATION_DISABLE, e.g. SLS_DEPRECATION_DISABLE='*' sls print.

What is the full list of deprecation codes?

Unfortunately, we don’t have the codes listed anywhere in the documentation, but I’ve just opened an issue that aims to improve existing deprecation documentation: https://github.com/serverless/serverless/issues/8665

As for not including warnings in print command, we have a plan for a bigger refactoring/improvement of our logging mechanisms: https://github.com/serverless/serverless/issues/1720 which we will be prioritizing in the near future. That should resolve issue with print as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Serverless Framework Deprecations
To disable a deprecation, use the SLS_DEPRECATION_DISABLE=CODE environment variable. You can disable multiple deprecations via SLS_DEPRECATION_DISABLE=CODE1, ...
Read more >
Diagnosing a print failure (SLS) - Support | Formlabs
If you experience print failures with a Formlabs SLS printer, consult the list below and visit the relevant support article to troubleshoot and ......
Read more >
Scala Standard Library 2.12.5 - scala.deprecated
An annotation that designates that a definition is deprecated. A deprecation warning is issued upon usage of the annotated definition.
Read more >
Text - H.R.2471 - 117th Congress (2021-2022): Consolidated ...
Include full text when available Tip ... The explanatory statement regarding this Act, printed in the House section of the Congressional Record on...
Read more >
The Best 3D Printing Services Online in 2022 - All3DP
Beamler's 3D printing capabilities include FDM, SLS, SLA, Binder Jetting, DoD, SLM, DLMS, and EBM. The company specializes in high-performance ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found