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

fix(cx-api): protocol version was wrong, which lead to a confusing error message #6033

Closed
wants to merge 3 commits into from

Conversation

iliapolo
Copy link
Contributor

@iliapolo iliapolo commented Jan 30, 2020

This PR changes the protocol version so that users start getting the correct mismatch error message.

Assuming this change will be released in 1.23.0.

What are the affects of this change

  • Users having CLI version <= 1.22.0 who upgrade the framework, will receive the following error:

    A newer version of the CDK CLI (>= 1.23.0) is necessary to interact with this app
    

    Note that for users who have CLI <= 1.21.1 and framework 1.22.0, the message makes sense because they are currently in a broken state.

    For users who have CLI 1.22.0 and framework 1.22.0, the message actually breaks their setup, but at least the instruction is correct.

  • Users who upgrade the CLI will not be affected.

While this change causes temporary breakage for some customers, it has the benefit of unblocking others. It also aligns our version to (kind of) what it should have been in the first place. Currently, the version doesn't point to the latest release, which is kind of bent.

What if we dont do this

Users who only upgrade their framework, will continue seeing the wrong error message, forever.

Our assumption is that users who see it, either upgrade the CLI on their own, or search for the error and wind up at our issue, instructing them to upgrade.

I don't like this because i feel we might be missing a class of users who are baffled and simply don't take any action to unblock themselves.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 30, 2020
@github-actions
Copy link

🚫 Fixes must contain a change to a test file

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

@nija-at nija-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on reading your description, in all cases where the user sees this error, they have to upgrade their CLI. Am I reading that correctly?

In what specific case, would an upgrade not be necessary with this fix?

@iliapolo
Copy link
Contributor Author

@nija-at Wrote:

Based on reading your description, in all cases where the user sees this error, they have to upgrade their CLI. Am I reading that correctly?

Yes, basically if they upgrade their framework first, they will see a message instructing them to upgrade the CLI as well.

@nija-at Wrote:

In what specific case, would an upgrade not be necessary with this fix?

Only if the user upgrades the CLI first

Remember that currently, users who have CLI <= 1.21.1 and framework 1.22.0, have to upgrade their CLI as well.

This change makes it so that also users who will have CLI 1.22.0 and framework 1.23.0 have to upgrade their CLI as well, with no apparent reason...I think its worth it though.

@@ -75,7 +75,7 @@ export function upgradeAssemblyManifest(manifest: AssemblyManifest): AssemblyMan
// Backwards compatible changes to ContainerImageAssetMetadataEntry:
// * Make `imageNameParameter` optional (new apps do not require it anymore because container images go to a well-known repository)
// * Add optional `imageTag` to allow apps to specify exactly where to store the image (required if `imageNameParameter` is not defined)
manifest = justUpgradeVersion(manifest, '1.21.0');
manifest = justUpgradeVersion(manifest, '1.23.0');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this also include a section upgrading the version from 1.21.0 to 1.23.0?

We will be publishing Cloud Assemblies with version 1.21.0 with a few versions of the framework (1.22.0 at least).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are so right. Good catch! Fixed 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@github-actions
Copy link

🚫 Fixes must contain a change to a test file

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@eladb eladb removed their assignment Feb 5, 2020
@iliapolo
Copy link
Contributor Author

The ship has probably sailed with regards to this change. Closing this as we don't seem to need it.

@iliapolo iliapolo closed this Feb 11, 2020
@iliapolo iliapolo deleted the epolon/fix-cx-protocol-version branch February 11, 2020 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants