Skip to content

Conversation

@dhasani23
Copy link
Contributor

Problem

Our backend is expecting the language name (java or sql) to be lowercase, not uppercase. Also, the failure reason returned by one of our APIs was being overwritten and not shown to users.

Solution

User lowercase, and prevent overwriting.


License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dhasani23 dhasani23 requested a review from a team as a code owner November 20, 2024 04:23
@github-actions
Copy link

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.
  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

@dhasani23 dhasani23 changed the title fix(amazonq): do not overwrite failure reason and use lowercase lang fix(amazonq): do not overwrite failure reason, use lowercase lang name Nov 20, 2024
@dhasani23
Copy link
Contributor Author

dhasani23 commented Nov 20, 2024

Note: I may add a feature flag around this SQL Conversions feature in this PR too, will let you know by the early afternoon of Wednesday 11/20, if so I should also remove the CHANGELOG entry.

Copy link
Contributor

@jpinkney-aws jpinkney-aws left a comment

Choose a reason for hiding this comment

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

Also, the failure reason returned by one of our APIs was being overwritten and not shown to users.

Is that something that would be useful to have a changelog item for?

transformByQState.getTransformationType() === TransformationType.LANGUAGE_UPGRADE
? 'JAVA'
: 'SQL',
? 'java'
Copy link
Contributor

Choose a reason for hiding this comment

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

If there is potential that these values will be used in other telemetry events this may be worth putting in to a function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, post-re:Invent planning on adding a separate utils file for these kinds of things

@jpinkney-aws jpinkney-aws merged commit c6c5fc2 into aws:master Nov 20, 2024
25 of 35 checks passed
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

Successfully merging this pull request may close these issues.

4 participants