-
Notifications
You must be signed in to change notification settings - Fork 14
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
base: main
Are you sure you want to change the base?
Conversation
…source and resource
…ed + updated docs
There was a problem hiding this 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. |
const ( | ||
FabricItemType = fabcore.ItemTypeApacheAirflowJob | ||
ItemDefinitionEmpty = `{"properties":{}}` | ||
ItemDefinitionPathDocsURL = "https://learn.microsoft.com/fabric/data-factory/apache-airflow-jobs-concepts" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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.`), |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
📥 Pull Request
❓ What are you trying to address
Onboard new
fabric_apache_airflow_job
data source and resourceClose #466 and #467