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] Allow to match resource names by regular expression #4177

Merged
merged 4 commits into from
Nov 1, 2024

Conversation

alexott
Copy link
Contributor

@alexott alexott commented Oct 31, 2024

Changes

In addition to the existing -match option, this PR allows the matching of names by regex during the listing operation. There are new options:

  • -matchRegex - checks if name matches a regex - this could be useful for exporting notebooks for only specific users, or something like that.
  • -excludeRegex - checks if name matches a regex, and skips processing of that object. For example, it could be used to exclude databricks_automl directories. This parameter has higher priority than the -match and -matchRegex.
  • filterDirectoriesDuringWorkspaceWalking - if we should apply match logic to directory names when we're performing workspace tree walking. Note: be careful with it as it will be applied to all entries, so if you want to filter only specific users, then you will need to specify the condition for /Users as well, so regex will be ^(/Users|/Users/[a-c].*)$

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

In addition to existing `-match` option, this PR allows to match names by regex during the
listing operation.  There are two options:

- `-matchRegex` - checks if name matches a regex - this could be useful for exporting
  notebooks for only specific users, or something like that.
- `-excludeRegex` - checks if name matches a regex, and skips processing of that
  object. For example, it could be used to exclude `databricks_automl` directories.  This
  parameter has higher priority than the `-match` and `-matchRegex`.
@alexott alexott requested review from a team as code owners October 31, 2024 08:54
@alexott alexott requested review from tanmay-db and removed request for a team October 31, 2024 08:54
@alexott alexott temporarily deployed to test-trigger-is October 31, 2024 08:54 — with GitHub Actions Inactive
@alexott alexott requested a review from mgyucht October 31, 2024 08:54
@alexott alexott temporarily deployed to test-trigger-is October 31, 2024 13:02 — with GitHub Actions Inactive
@alexott alexott temporarily deployed to test-trigger-is October 31, 2024 13:12 — with GitHub Actions Inactive
docs/guides/experimental-exporter.md Outdated Show resolved Hide resolved
Co-authored-by: Miles Yucht <miles@databricks.com>
@alexott alexott temporarily deployed to test-trigger-is October 31, 2024 13:40 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot
Copy link
Collaborator

Test Details: go/deco-tests/11613030493

@alexott alexott added this pull request to the merge queue Nov 1, 2024
Merged via the queue into main with commit 0fbfbf4 Nov 1, 2024
12 checks passed
@alexott alexott deleted the exporter/match-with-regexes branch November 1, 2024 07:34
tanmay-db added a commit that referenced this pull request Nov 5, 2024
### New Features and Improvements

 * Added `databricks_functions` data source ([#4154](#4154)).

### Bug Fixes

 * Handle edge case for `effective_properties` in `databricks_sql_table` ([#4153](#4153)).
 * Provide more prescriptive error when users fail to create a single node cluster ([#4168](#4168)).

### Internal Changes

 * Add test instructions for external contributors ([#4169](#4169)).
 * Always write message for manual test integration ([#4188](#4188)).
 * Make `Read` after `Create`/`Update` configurable ([#4190](#4190)).
 * Migrate Share Data Source to Plugin Framework ([#4161](#4161)).
 * Migrate Share Resource to Plugin Framework ([#4047](#4047)).
 * Rollout Plugin Framework  ([#4134](#4134)).

### Dependency Updates

 * Bump Go SDK to v0.50.0 ([#4178](#4178)).

### Exporter

 * Allow to match resource names by regular expression ([#4177](#4177)).
github-merge-queue bot pushed a commit that referenced this pull request Nov 6, 2024
### New Features and Improvements

* Added `databricks_functions` data source
([#4154](#4154)).


### Bug Fixes

* Handle edge case for `effective_properties` in `databricks_sql_table`
([#4153](#4153)).
* Provide more prescriptive error when users fail to create a single
node cluster
([#4168](#4168)).


### Internal Changes

* Add test instructions for external contributors
([#4169](#4169)).
* Always write message for manual test integration
([#4188](#4188)).
* Make `Read` after `Create`/`Update` configurable
([#4190](#4190)).
* Migrate Share Data Source to Plugin Framework
([#4161](#4161)).
* Migrate Share Resource to Plugin Framework
([#4047](#4047)).
* Rollout Plugin Framework
([#4134](#4134)).


### Dependency Updates

* Bump Go SDK to v0.50.0
([#4178](#4178)).


### Exporter

* Allow to match resource names by regular expression
([#4177](#4177)).
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