Skip to content

Conversation

@KshitijaChoudhari
Copy link
Collaborator

Description

Testing plan

External links

Output from tests

Including output from tests may require access to a TFE instance. Ignore this section if you have no environment to test against.

Rollback Plan

Changes to Security Controls

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've documented the impact of any changes to security controls.

    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

If you have any questions, please contact your direct supervisor, GRC (#team-grc), or the PCI working group (#proj-pci-reboot). You can also find more information at PCI Compliance.

- Add QueryRun model with support for filter, search, and analytics queries
- Implement QueryRuns resource with all CRUD operations:
  - List: with pagination and filtering options
  - Create: with timeout and result limits
  - Read: basic and with additional options
  - ReadWithOptions: include results and logs
  - Logs: retrieve query execution logs
  - Results: retrieve query results with pagination
  - Cancel: graceful cancellation
  - ForceCancel: force cancellation for stuck queries

- Add comprehensive error handling with InvalidQueryRunIDError
- Create extensive unit tests (18 test cases) covering all operations
- Add example script demonstrating complete workflow
- Export all new types through models/__init__.py
- Integrate QueryRuns service into TFEClient

Query run operations support:
- Multiple query types (filter, search, analytics)
- Status tracking (pending, running, completed, errored, canceled)
- Timeout and result limit configuration
- Real-time monitoring capabilities
- Comprehensive logging and result retrieval

All tests passing (226/226) with full type checking and linting compliance.
@KshitijaChoudhari KshitijaChoudhari requested a review from a team as a code owner September 29, 2025 17:45
Copy link
Member

@iam404 iam404 left a comment

Choose a reason for hiding this comment

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

LGTM

@iam404 iam404 merged commit 027b3e4 into main Sep 30, 2025
11 checks passed
Copy link
Collaborator

@isivaselvan isivaselvan Sep 30, 2025

Choose a reason for hiding this comment

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

Rename the functions at examples folder by removing the prefix (test_)

@iam404 iam404 deleted the query_run branch October 28, 2025 06:40
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.

3 participants