Skip to content

feat(apache_airflow_job): onboard new Apache Airflow Job DS and RS #469

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

CatalinDabuleanu
Copy link
Contributor

📥 Pull Request

❓ What are you trying to address

Onboard new fabric_apache_airflow_job data source and resource

Close #466 and #467

@Copilot Copilot AI review requested due to automatic review settings May 28, 2025 22:45
@CatalinDabuleanu CatalinDabuleanu requested a review from a team as a code owner May 28, 2025 22:45
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 onboards a new fabric_apache_airflow_job data source and resource, extending Terraform-provider-fabric functionality.

  • Introduces new acceptance and unit tests for the Apache Airflow Job data source.
  • Implements resource and data source registration in provider.go.
  • Adds examples and documentation for the new resource and data source.

Reviewed Changes

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

Show a summary per file
File Description
internal/services/apacheairflowjob/data_apache_airflow_job_test.go Adds thorough unit and acceptance tests for various error scenarios and valid configurations.
internal/services/apacheairflowjob/data_apache_airflow_job.go Implements the data source using existing fabricitem helper functions.
internal/services/apacheairflowjob/base_test.go Provides shared test helpers and constants used across tests.
internal/services/apacheairflowjob/base.go Defines type information and item definition formats used by the resource and data source.
internal/provider/provider.go Registers the new Apache Airflow Job resource and data sources with the provider.
examples/** Adds example Terraform configurations (resources, data sources, providers, outputs) for Apache Airflow Job.
docs/** Provides updated documentation for both resource and data source regarding Apache Airflow Job.
.changes/unreleased/** Contains release notes for the new resource and data source.

@CatalinDabuleanu CatalinDabuleanu changed the title Catalindabuleanu/apache airflow job feat(apache_airflow_job): onboard new Apache Airflow Job DS and RS May 28, 2025
Copy link

github-actions bot commented May 28, 2025

Changelog Preview

v1.2.1-dev - June 05, 2025

✨ Added

  • #466 Onboard new fabric_apache_airflow_job data source
  • #467 Onboard new fabric_apache_airflow_job resource

💫 Changed

  • #471 Removed preview for fabric_gateway
  • #472 Removed preview for fabric_gateway_role_assignment

const (
FabricItemType = fabcore.ItemTypeApacheAirflowJob
ItemDefinitionEmpty = `{"properties":{}}`
ItemDefinitionPathDocsURL = "https://learn.microsoft.com/fabric/data-factory/apache-airflow-jobs-concepts"
Copy link
Collaborator

Choose a reason for hiding this comment

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

add a TODO to replace once the definition article it out

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding a TODO will generate a lint error and tests will fail. Is there a way to bypass this?

Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttrPtr(testDataSourceItemFQN, "workspace_id", entity.WorkspaceID),
resource.TestCheckResourceAttrPtr(testDataSourceItemFQN, "id", entity.ID),
resource.TestCheckResourceAttrPtr(testDataSourceItemFQN, "display_name", entity.DisplayName),
Copy link
Collaborator

Choose a reason for hiding this comment

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

add get definition stage to UT

mapvalidator.SizeAtMost(1),
mapvalidator.KeysAre(fabricitem.DefinitionPathKeysValidator(itemDefinitionFormats)...),
},
DefinitionRequired: true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

false

"display_name": "test",
},
)),
ExpectError: regexp.MustCompile(`The argument "definition" is required, but no definition was found.`),
Copy link
Collaborator

Choose a reason for hiding this comment

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

when changing required definition to false, change this UT

}))
}

func TestUnit_ApacheAirflowJobResource_ImportState(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

to all this file, add checks without definition, both for UTs and Acc tests

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.

[DS] Add Apache Airflow Job Data Source
2 participants