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

[Internal] Make Read after Create/Update configurable #4190

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

alexott
Copy link
Contributor

@alexott alexott commented Nov 3, 2024

Changes

This PR adds the ability for a resource to specify that it may not need to call Read after Create and Update operations so we can avoid performing another API call(s). The resource may implement CanSkipReadAfterCreateAndUpdate function that can decide if the Read operation should be skipped.

I decided to move common part from #4173 to make it easier to review

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

This PR adds the ability for a resource to specify that it may not need to call `Read`
after `Create` and `Update` operations so we can avoid performing another API call(s). The
resource may implement `CanSkipReadAfterCreateAndUpdate` function that can decide if the
`Read` operation should be skipped.

I decided to move common part from #4173 to make it easier to review
@alexott alexott requested review from a team as code owners November 3, 2024 10:55
@alexott alexott requested review from parthban-db and removed request for a team November 3, 2024 10:55
@alexott alexott temporarily deployed to test-trigger-is November 3, 2024 10:55 — with GitHub Actions Inactive
@alexott alexott requested a review from mgyucht November 3, 2024 10:55
@alexott alexott temporarily deployed to test-trigger-is November 3, 2024 10:55 — with GitHub Actions Inactive
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 on the test.

common/resource_test.go Outdated Show resolved Hide resolved
@alexott alexott temporarily deployed to test-trigger-is November 4, 2024 11:56 — with GitHub Actions Inactive
Copy link

github-actions bot commented Nov 4, 2024

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/terraform

Inputs:

  • PR number: 4190
  • Commit SHA: 3c0a6c74c7851f8e0d391e0205d68f436d4d1493

Checks will be approved automatically on success.

@alexott alexott temporarily deployed to test-trigger-is November 4, 2024 11:56 — with GitHub Actions Inactive
@alexott alexott enabled auto-merge November 4, 2024 11:57
@eng-dev-ecosystem-bot
Copy link
Collaborator

Test Details: go/deco-tests/11668917615

@alexott alexott added this pull request to the merge queue Nov 4, 2024
Merged via the queue into main with commit 1e067f7 Nov 4, 2024
12 checks passed
@alexott alexott deleted the skip-read-configurable branch November 4, 2024 19:24
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