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

Unable to retrieve CloudWatch Logs Insights queries filtered by query language "CWLI" #9145

Open
1 task
cosborne83 opened this issue Dec 17, 2024 · 0 comments
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@cosborne83
Copy link

Describe the bug

The logs describe-queries command supports a --query-language option that should allow filtering at the API level for queries in a specific query language (CWLI, SQL or PPL). This appears to work for the "SQL" query language, but not for "CWLI".

A client-side filter using --query shows that I have logs insights queries with both "CWLI" and "SQL" query languages:

> aws logs describe-queries --query "length(queries[?queryLanguage=='CWLI'])"
52

> aws logs describe-queries --query "length(queries[?queryLanguage=='SQL'])"
20

Performing the same filtering via the API filter using the --query-language option produces the same result for "SQL" query language, but no results for the "CWLI" query language:

> aws logs describe-queries --query-language CWLI --query "length(queries)"
0

> aws logs describe-queries --query-language SQL --query "length(queries)"
20

Am I doing something wrong, or is this a bug in the CLI and/or API?

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Using the --query-language CWLI option to aws logs describe-queries should return the queries with query language "CWLI".

Current Behavior

No results are returned.

Reproduction Steps

  1. Perform a CloudWatch Logs Insights query using query language CWLI via the API/CLI/console.
  2. Run aws logs describe-queries (without the --query-language option) to confirm the query from step 1 is included in the results and that the queryLanguage is CWLI.
  3. Run aws logs describe-queries --query-language CWLI and check whether the query from step 1 is included in the results.

Possible Solution

No response

Additional Information/Context

No response

CLI version used

2.22.18

Environment details (OS name and version, etc.)

Windows 11

@cosborne83 cosborne83 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 17, 2024
@aemous aemous assigned aemous and unassigned aemous Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants