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] Improving reliability of Emit function #4163

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

alexott
Copy link
Contributor

@alexott alexott commented Oct 28, 2024

Changes

I found in the large-scale testing that sometimes we don't handle emitting of the same resource reliably, and this may lead to generation of duplicate resources (very small amount, but still) - found this in a very specific case when notebooks were listed without directories.

This PR fixes this problem:

  • by tracking if resource is already in importing queue
  • detecting duplicates during code generation

It also may improve performance a bit (2-3%).

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

I found in the large-scale testing that sometimes we don't handle emitting of the same
resource reliably, and this may lead to generation of duplicate resources (very small
amount, but still) - found this in a very specific case when notebooks were listed without
directories.

This PR fixes this problem:

- by tracking if resource is already in importing queue
- detecting duplicates during code generation

It also may improve performance a bit (2-3%).
@alexott alexott requested review from a team as code owners October 28, 2024 11:06
@alexott alexott requested review from tanmay-db and removed request for a team October 28, 2024 11:06
@alexott alexott temporarily deployed to test-trigger-is October 28, 2024 11:06 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot
Copy link
Collaborator

Test Details: go/deco-tests/11552649280

exporter/context.go Dismissed Show dismissed Hide dismissed
@alexott alexott requested a review from mgyucht October 28, 2024 11:32
@alexott alexott added this pull request to the merge queue Oct 28, 2024
Merged via the queue into main with commit 2c13e8d Oct 28, 2024
10 checks passed
@alexott alexott deleted the exporter/improve-emit branch October 28, 2024 14:09
mgyucht added a commit that referenced this pull request Oct 28, 2024
### Bug Fixes

 * Recreate missing system schema  ([#4068](#4068)).
 * Tolerate `databricks_permissions` resources for SQL warehouses with `/warehouses/...` IDs ([#4158](#4158)).

### Documentation

 * Fix `databricks_grant` regarding metastore_id description ([#4164](#4164)).

### Internal Changes

 * Automatically trigger integration tests on PR ([#4149](#4149)).

### Exporter

 * **Breaking change** Use new query and alert resources instead of legacy resources ([#4150](#4150)).
 * Improve exporting of `databricks_pipeline` resources ([#4142](#4142)).
 * Improving reliability of `Emit` function ([#4163](#4163)).
mgyucht added a commit that referenced this pull request Oct 28, 2024
### Bug Fixes

 * Recreate missing system schema  ([#4068](#4068)).
 * Tolerate `databricks_permissions` resources for SQL warehouses with `/warehouses/...` IDs ([#4158](#4158)).

### Documentation

 * Fix `databricks_grant` regarding metastore_id description ([#4164](#4164)).

### Internal Changes

 * Automatically trigger integration tests on PR ([#4149](#4149)).

### Exporter

 * **Breaking change** Use new query and alert resources instead of legacy resources ([#4150](#4150)).
 * Improve exporting of `databricks_pipeline` resources ([#4142](#4142)).
 * Improving reliability of `Emit` function ([#4163](#4163)).
github-merge-queue bot pushed a commit that referenced this pull request Oct 28, 2024
### Bug Fixes

* Recreate missing system schema
([#4068](#4068)).
* Tolerate `databricks_permissions` resources for SQL warehouses with
`/warehouses/...` IDs
([#4158](#4158)).


### Documentation

* Fix `databricks_grant` regarding metastore_id description
([#4164](#4164)).


### Internal Changes

* Automatically trigger integration tests on PR
([#4149](#4149)).


### Exporter

* **Breaking change** Use new query and alert resources instead of
legacy resources
([#4150](#4150)).
* Improve exporting of `databricks_pipeline` resources
([#4142](#4142)).
* Improving reliability of `Emit` function
([#4163](#4163)).
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