Skip to content

feat(cloudwatch-dashboards): add support for queryLanguage property#34547

Merged
mergify[bot] merged 14 commits intoaws:mainfrom
CDillinger:cw-sql
Jul 4, 2025
Merged

feat(cloudwatch-dashboards): add support for queryLanguage property#34547
mergify[bot] merged 14 commits intoaws:mainfrom
CDillinger:cw-sql

Conversation

@CDillinger
Copy link
Copy Markdown
Contributor

@CDillinger CDillinger commented May 24, 2025

Issue # (if applicable)

Closes #34482

Reason for this change

CloudWatch recently added support for using multiple query languages to query logs. Currently, CDK is missing the functionality to specify a query language when creating a Log Query Widget inside a CloudWatch Dashboard.

Description of changes

Applied suggested implementation by @ykethan and added tests.

Describe any new or updated permissions being added

N/A

Description of how you validated changes

Added unit test and updated integ test.

Checklist


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

@github-actions github-actions bot added the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label May 24, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team May 24, 2025 03:26
@github-actions github-actions bot added feature-request A feature should be added or improved. p2 labels May 24, 2025
@CDillinger
Copy link
Copy Markdown
Contributor Author

Clarification Request: is there any way to view logs to debug the build failure?

@aws-cdk-automation aws-cdk-automation added the pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run label Jun 4, 2025
@kumsmrit
Copy link
Copy Markdown
Contributor

kumsmrit commented Jun 4, 2025

Clarification Request: is there any way to view logs to debug the build failure?

The build logs are posted in the comment from aws-cdk-automation here

@kumsmrit kumsmrit self-assigned this Jun 4, 2025
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jun 5, 2025
@CDillinger
Copy link
Copy Markdown
Contributor Author

@kumsmrit thank you for the guidance. The build failure was due to invalid code references I added in the README updates. I have fixed it, and the build is passing now.

Copy link
Copy Markdown
Contributor

@kumsmrit kumsmrit left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution; I have added a comment.

* Supported values include: 'Logs', 'SQL', 'PPL'
* @default - Logs Insights Query Language (default CloudWatch Logs query language)
*/
readonly queryLanguage?: string;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we consider using an enum for the query language options instead of a string. This would provide better type safety and discoverability of available options.

export enum LogQueryLanguage {
  LOGS_INSIGHTS = 'Logs',
  SQL = 'SQL',
  PPL = 'PPL'
}

/* @default LogQueryLanguage.LOGS_INSIGHTS */
readonly queryLanguage?: LogQueryLanguage;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, added a commit to incorporate this!

Copy link
Copy Markdown
Contributor

@kumsmrit kumsmrit left a comment

Choose a reason for hiding this comment

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

Thanks for incorporating the feedbacks. I have added few additional comments.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jun 25, 2025
@mergify mergify bot dismissed kumsmrit’s stale review July 2, 2025 02:30

Pull request has been modified.

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jul 2, 2025
@CDillinger CDillinger requested a review from kumsmrit July 2, 2025 21:12
Copy link
Copy Markdown
Contributor

@kumsmrit kumsmrit left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jul 4, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jul 4, 2025
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jul 4, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Jul 4, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 8a77828 into aws:main Jul 4, 2025
18 checks passed
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 7348aaa
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 4, 2025

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK feature-request A feature should be added or improved. p2 pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(cloudwatch-dashboards): Add support for queryLanguage property

5 participants