Skip to content

Conversation

@alexott
Copy link
Contributor

@alexott alexott commented Oct 6, 2025

Changes

With this refactoring, we'll fix a problem that occurs when a job has more than 100 tasks - the current implementation does not handle it correctly. Additionally, it won't work in workspaces with a large number of jobs...

Additionally, I refactored job tests to use the Mock API instead of HTTPFixture. And started to remove unnecessary functions for legacy Jobs APIs.

Tests

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • using Go SDK
  • using TF Plugin Framework
  • has entry in NEXT_CHANGELOG.md file

With this refactoring we'll fix a problem when a job has more than 100 tasks - current
implementation won't handle it correctly. Plus, it won't work in the workspaces with a lot
of jobs...

Also, refactored job tests to use Mock API instead of `HTTPFixture`.
@alexott alexott requested review from a team as code owners October 6, 2025 08:34
@alexott alexott requested review from parthban-db and removed request for a team October 6, 2025 08:34
@alexott alexott temporarily deployed to test-trigger-is October 6, 2025 08:34 — with GitHub Actions Inactive
@alexott alexott temporarily deployed to test-trigger-is October 6, 2025 08:35 — with GitHub Actions Inactive
@alexott alexott requested a review from Copilot October 6, 2025 08:43
Copy link
Contributor

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 refactors the databricks_job data source to use the Go SDK instead of the legacy APIs, fixing pagination issues for workspaces with more than 100 jobs and improving support for jobs with more than 100 tasks. The changes also migrate job tests from HTTPFixtures to the Mock API pattern for better maintainability.

Key Changes:

  • Migrated data source from legacy API to Go SDK with proper pagination support
  • Refactored all job tests to use Mock API instead of HTTPFixture pattern
  • Removed legacy API functions like ListByName and List methods
  • Fixed git source schema conflicts with proper prefix handling

Reviewed Changes

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

Show a summary per file
File Description
jobs/data_job.go Core data source refactoring to use Go SDK with improved job listing and retrieval
jobs/data_job_test.go Complete test migration from HTTPFixture to Mock API pattern
jobs/resource_job.go Removed legacy API methods and fixed git source schema conflicts
jobs/resource_job_test.go Extensive test refactoring using Mock API for better test isolation
jobs/resource_job_webhook_test.go Updated webhook notification tests to use Mock API
NEXT_CHANGELOG.md Added changelog entry for the refactoring

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@alexott alexott temporarily deployed to test-trigger-is October 6, 2025 08:53 — with GitHub Actions Inactive
@alexott alexott temporarily deployed to test-trigger-is October 6, 2025 08:53 — with GitHub Actions Inactive
@alexott alexott temporarily deployed to test-trigger-is October 7, 2025 14:06 — with GitHub Actions Inactive
@alexott alexott temporarily deployed to test-trigger-is October 7, 2025 14:06 — with GitHub Actions Inactive
@github-actions
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/terraform

Inputs:

  • PR number: 5078
  • Commit SHA: b2837f81ea21ca1a75ff7178aed47dc7fca3bf41

Checks will be approved automatically on success.

@alexott alexott requested a review from rauchy October 21, 2025 11:25
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