Skip to content
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

Exporter: generate cluster libraries blocks directly in databricks_cluster, don't generate databricks_library resources #2983

Merged
merged 4 commits into from
Dec 21, 2023

Conversation

alexott
Copy link
Contributor

@alexott alexott commented Dec 3, 2023

Changes

Instead of generating separate databricks_library resources, cluster libraries are now generated inside of the databricks_cluster definition. This decreases the number of the generated resources that is important for big workspaces as it decreases the state size.

Tests

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • relevant acceptance tests are passing
  • using Go SDK

@alexott alexott requested review from a team as code owners December 3, 2023 09:42
@alexott alexott requested review from tanmay-db and removed request for a team December 3, 2023 09:42
@codecov-commenter
Copy link

codecov-commenter commented Dec 3, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d0ef4ba) 83.93% compared to head (fcad965) 83.93%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2983      +/-   ##
==========================================
- Coverage   83.93%   83.93%   -0.01%     
==========================================
  Files         160      160              
  Lines       14131    14129       -2     
==========================================
- Hits        11861    11859       -2     
  Misses       1585     1585              
  Partials      685      685              
Files Coverage Δ
clusters/resource_cluster.go 85.77% <100.00%> (+0.06%) ⬆️
common/util.go 100.00% <100.00%> (ø)
exporter/importables.go 73.85% <ø> (-0.08%) ⬇️
exporter/util.go 77.44% <100.00%> (-0.23%) ⬇️

@alexott alexott added the exporter TF configuration generator label Dec 3, 2023
Copy link
Contributor

@mgyucht mgyucht left a comment

Choose a reason for hiding this comment

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

LGTM, one suggestion to refactor the isExporter logic to a common place.

clusters/resource_cluster.go Outdated Show resolved Hide resolved
…luster`, don't generate `databricks_library` resources

Instead of generating separate `databricks_library` resources, cluster libraries are now
generated inside of the `databricks_cluster` definition.  This decrease the number of the
generated resources that is important for big workspaces as it decreases the state size.
@alexott alexott force-pushed the exporter-dont-export-library-resource branch from 0bcbd6b to 327c4e9 Compare December 21, 2023 10:19
@alexott alexott added this pull request to the merge queue Dec 21, 2023
Merged via the queue into master with commit c68253b Dec 21, 2023
5 checks passed
@alexott alexott deleted the exporter-dont-export-library-resource branch December 21, 2023 10:50
@tanmay-db tanmay-db mentioned this pull request Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exporter TF configuration generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants