alexa / ask-cli

Alexa Skills Kit Command Line Interface
https://developer.amazon.com/en-US/docs/alexa/smapi/ask-cli-intro.html
Apache License 2.0
163 stars 54 forks source link

Unreported breaking change: --full-response headers' output format edited on v2.30.0 #485

Closed ilovelinux closed 11 months ago

ilovelinux commented 11 months ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[X] Documentation issue or request 
[ ] Other... Please describe: 

A breaking change (commit https://github.com/alexa/ask-cli/commit/fd20898d6d87cf30ce4dc3e7a78434aac531929b) reshaped the computer-readable headers' output, but it hasn't been reported in changelogs.

Expected Behavior

Report in v2.30.0 changelog (better late than never)

Current Behavior

Jovo Framework is currently broken because the parsing function that decode te two command's output (1, 2) is still using the older headers format.

Related to https://github.com/jovotech/jovo-cli/issues/357 https://github.com/jovotech/jovo-framework/issues/1568 https://github.com/jovotech/jovo-framework/pull/1575

CLI Snapshot OLD Headers format until ask-cli 2.29.2:

[
  { "key": "content-type", "value": "application/json" },
  { "key": "content-length", "value": "2" },
  { "key": "connection", "value": "keep-alive" },
  { "key": "server", "value": "Server" },
  { "key": "date", "value": "Thu, 01 Jan 1970 00:00:00 GMT" },
  { "key": "x-amz-rid", "value": "XXXXXXXXXXXXXXXXXXXXXX" },
  { "key": "x-amzn-requestid", "value": "XXXXXXXXXXXXXXXXXXXXXX" },
  { "key": "x-amz-date", "value": "Thu, 01 Jan 1970 00:00:00 GMT" },
  { "key": "location", "value": "/v1/skills/imports/amzn1.ask-package.import.XXXXXXXXXXXXXXXXXXXXXX" },
  { "key": "vary", "value": "Content-Type,Accept-Encoding,User-Agent" },
  { "key": "strict-transport-security", "value": "max-age=47474747; includeSubDomains; preload" },
  { "key": "x-cache", "value": "Miss from cloudfront" },
  { "key": "via", "value": "1.1 XXXXXXXXXXXXXXXXXXXXXX.cloudfront.net (CloudFront)" },
  { "key": "x-amz-cf-pop", "value": "XXXXX-XX" },
  { "key": "x-amz-cf-id", "value": "XXXXXXXXXXXXXXXXXXXXXX" }
]

NEW Headers format since ask-cli 2.30.0:

{
  "content-type": "application/json",
  "content-length": "2",
  "connection": "keep-alive",
  "server": "Server",
  "date": "Thu, 01 Jan 1970 00:00:00 GMT",
  "x-amz-rid": "XXXXXXXXXXXXXXXXXXXXXX",
  "x-amzn-requestid": "XXXXXXXXXXXXXXXXXXXXXX",
  "x-amz-date": "Thu, 01 Jan 1970 00:00:00 GMT",
  "location": "/v1/skills/imports/amzn1.ask-package.import.XXXXXXXXXXXXXXXXXXXXXX",
  "vary": "Content-Type,Accept-Encoding,User-Agent",
  "strict-transport-security": "max-age=47474747; includeSubDomains; preload",
  "x-cache": "Miss from cloudfront",
  "via": "1.1 XXXXXXXXXXXXXXXXXXXXXX.cloudfront.net (CloudFront)",
  "x-amz-cf-pop": "XXXXX-XX",
  "x-amz-cf-id": "XXXXXXXXXXXXXXXXXXXXXX"
}

Steps to Reproduce (for bugs)

Run:

$ ask smapi create-skill-package --full-response [...]
$ ask smapi import-skill-package --full-response [...]
[..]

Compare the output with v2.29.2 output

Possible Solution

Fix not required, but reporting the breaking change in changelog would be awesome!

Your Environment and Context

doiron commented 11 months ago

thank you for reporting this discrepancy/ missing details in the changelog!

doiron commented 11 months ago

These headers changed because the underlying package that makes http request was changed from the deprecated request to axios. This was done in order to support the extra Proxy features required and to resolve high severity security issues.

Added a link to this issue in the changelog with a Breaking flag in the linked PR.

doiron commented 11 months ago

updated the changelog please re-open this if you have any further concerns.

Again, thank you for contributing! :)

ilovelinux commented 11 months ago

@doiron would you mind updating the changelog on GitHub releases too? When I found the issue, I was looking there too.

Thank you for your blazing-fast responses!