Skip to content

Add table aws_batch_queue #2486

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

Merged
merged 9 commits into from
May 20, 2025
Merged

Add table aws_batch_queue #2486

merged 9 commits into from
May 20, 2025

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented May 5, 2025

Integration test logs

Logs
Add passing integration test logs here

Example query results

Results
> select * from aws_batch_queue;
+----------------------+---------------------------------------------------------------------+---------+--------+----------+-------------------------------------------------------------------------------------------------------------------+--->
| job_queue_name       | arn                                                                 | state   | status | priority | compute_environment_order                                                                                         | sc>
+----------------------+---------------------------------------------------------------------+---------+--------+----------+-------------------------------------------------------------------------------------------------------------------+--->
| steampipe-test-queue | arn:aws:batch:us-east-1:123456789012:job-queue/steampipe-test-queue | ENABLED | VALID  | 1        | [{"ComputeEnvironment":"arn:aws:batch:us-east-1:123456789012:compute-environment/steampipe-test-env2","Order":1}] | <n>
+----------------------+---------------------------------------------------------------------+---------+--------+----------+-------------------------------------------------------------------------------------------------------------------+--->
> select * from aws_batch_queue where job_queue_name = 'steampipe-test-queue';
+----------------------+---------------------------------------------------------------------+---------+--------+----------+-------------------------------------------------------------------------------------------------------------------+--->
| job_queue_name       | arn                                                                 | state   | status | priority | compute_environment_order                                                                                         | sc>
+----------------------+---------------------------------------------------------------------+---------+--------+----------+-------------------------------------------------------------------------------------------------------------------+--->
| steampipe-test-queue | arn:aws:batch:us-east-1:123456789012:job-queue/steampipe-test-queue | ENABLED | VALID  | 1        | [{"ComputeEnvironment":"arn:aws:batch:us-east-1:123456789012:compute-environment/steampipe-test-env2","Order":1}] | <n>
+----------------------+---------------------------------------------------------------------+---------+--------+----------+-------------------------------------------------------------------------------------------------------------------+--->
> select * from aws_batch_queue where job_queue_name = 'steampipe-test-queue1';
+----------------+-----+-------+--------+----------+---------------------------+-----------------------+---------------+------+-------+------+-----------+--------+------------+--------------------+--------+------+
| job_queue_name | arn | state | status | priority | compute_environment_order | scheduling_policy_arn | status_reason | tags | title | akas | partition | region | account_id | sp_connection_name | sp_ctx | _ctx |
+----------------+-----+-------+--------+----------+---------------------------+-----------------------+---------------+------+-------+------+-----------+--------+------------+--------------------+--------+------+
+----------------+-----+-------+--------+----------+---------------------------+-----------------------+---------------+------+-------+------+-----------+--------+------------+--------------------+--------+------+

@ParthaI ParthaI requested review from misraved and Copilot May 5, 2025 15:04
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new Steampipe table for querying AWS Batch Job Queues by adding both documentation and Go source code implementations.

  • Added a markdown file that documents the aws_batch_queue table and includes usage examples for various SQL dialects.
  • Implemented the aws_batch_queue table in Go with list and get functions to interact with the AWS Batch API.
  • Added a BatchClient function in the aws/service.go file to support the new table's connectivity.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
docs/tables/aws_batch_queue.md New documentation outlining table usage and SQL example queries.
aws/table_aws_batch_queue.go New table implementation with get and list functions for job queues.
aws/service.go Added BatchClient function to create a client for the Batch service.

@ParthaI ParthaI force-pushed the add-table-batch-queue branch from c296f1a to e440942 Compare May 5, 2025 15:17
@ParthaI ParthaI requested a review from Copilot May 7, 2025 06:32
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for querying AWS Batch Job Queues by introducing a new table, aws_batch_queue.

  • Adds comprehensive markdown documentation with usage examples for querying AWS Batch Queues.
  • Implements get and list functions in aws/table_aws_batch_queue.go to fetch job queue data from AWS Batch.
  • Introduces a new BatchClient in aws/service.go and registers the new table within the plugin in aws/plugin.go.

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

File Description
docs/tables/aws_batch_queue.md Added documentation and SQL examples for the aws_batch_queue table.
aws/table_aws_batch_queue.go Implemented table schema and data hydration functions for AWS Batch.
aws/service.go Added BatchClient function for establishing Batch API client.
aws/plugin.go Registered the new aws_batch_queue table with the plugin.
Files not reviewed (1)
  • go.mod: Language not supported

@ParthaI ParthaI self-assigned this May 7, 2025
Copy link
Contributor

@misraved misraved left a comment

Choose a reason for hiding this comment

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

@ParthaI please take a look at the review comment. Thanks!!

@misraved misraved merged commit 60d4264 into main May 20, 2025
1 check passed
@misraved misraved deleted the add-table-batch-queue branch May 20, 2025 15:13
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.

2 participants