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

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

Closed
ilovelinux opened this issue Aug 3, 2023 · 4 comments

Comments

@ilovelinux
Copy link

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 fd20898) 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 jovotech/jovo-cli#357 jovotech/jovo-framework#1568 jovotech/jovo-framework#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

  • ask-cli version: 2.30.4
  • Operating System and version: Alpine
  • Node.js version used for development: 20.5.0
  • NPM version used for development: 9.8.0
@doiron
Copy link
Contributor

doiron commented Aug 3, 2023

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

@doiron
Copy link
Contributor

doiron commented Aug 4, 2023

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 added a commit that referenced this issue Aug 4, 2023
Adding a Breaking note to the changelog #485
@doiron
Copy link
Contributor

doiron commented Aug 4, 2023

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

Again, thank you for contributing! :)

@doiron doiron closed this as completed Aug 4, 2023
@ilovelinux
Copy link
Author

@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!

CamdenFoucht pushed a commit that referenced this issue Aug 9, 2023
Adding a Breaking note to the changelog #485
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants