Skip to content

fix: edge case fix on iceberg target table being dropped instead on being renamed first #667

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

Merged
merged 12 commits into from
Jun 7, 2024

Conversation

nicor88
Copy link
Contributor

@nicor88 nicor88 commented Jun 4, 2024

Description

See https://getdbt.slack.com/archives/C013MLFR7BQ/p1717497450266499

Pretty much #625 introduced a regression that was not letting iceberg working in an full high available mode.
This PR cover the issue, and add functional tests to catch these edge case.
Plus it introduce some improvements that allow to work properly in some restrictive LF permission models, where drop can happen only on existing objects.

Models used to test - Optional

See functional tests

Checklist

  • You followed contributing section
  • You kept your Pull Request small and focused on a single feature or bug fix.
  • You added unit testing when necessary
  • You added functional testing when necessary

@nicor88 nicor88 changed the title fix: lint and fix fix: edge case fix on iceberg target table being dropped instead on being renamed first Jun 4, 2024
@nicor88
Copy link
Contributor Author

nicor88 commented Jun 4, 2024

@octiva might give some input here, as he has a LF env with restricted policies, and we want to be sure that all works fine.

Copy link
Contributor

@octiva octiva left a comment

Choose a reason for hiding this comment

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

@nicor88 I reviewed my previous work, and my changes were in earlier parts of this file: #550.

I think the suggestion ive made about the rename not occurring ever could resolve? Keen to work it out.

@nicor88 nicor88 requested review from Avinash-1394 and octiva June 5, 2024 09:51
@nicor88
Copy link
Contributor Author

nicor88 commented Jun 5, 2024

@octiva it will be good if you can test this feature again in your environment to see if all works as expected.
Thanks.

@Avinash-1394 I hope that I cover and addressed your question/suggestion. Feel free to have a look.

Copy link
Contributor

@octiva octiva left a comment

Choose a reason for hiding this comment

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

LGTM 🇮🇹

@nicor88 nicor88 merged commit aaca397 into main Jun 7, 2024
10 checks passed
@nicor88 nicor88 deleted the fix/iceberg_tables_are_not_ha branch June 7, 2024 09:13
kodiakhq bot referenced this pull request in cloudquery/policies Jul 1, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [dbt-athena-community](https://github.com/dbt-athena/dbt-athena) | patch | `==1.8.2` -> `==1.8.3` |

---

### Release Notes

<details>
<summary>dbt-athena/dbt-athena (dbt-athena-community)</summary>

### [`v1.8.3`](https://github.com/dbt-athena/dbt-athena/releases/tag/v1.8.3)

[Compare Source](https://github.com/dbt-athena/dbt-athena/compare/v1.8.2...v1.8.3)

#### What's Changed

##### Features

-   feat: Update `AthenaColumn` to parse array types by [@&#8203;jeancochrane](https://github.com/jeancochrane) in [https://github.com/dbt-athena/dbt-athena/pull/672](https://github.com/dbt-athena/dbt-athena/pull/672)

##### Fixes

-   fix: edge case fix on iceberg target table being dropped instead on being renamed first by [@&#8203;nicor88](https://github.com/nicor88) in [https://github.com/dbt-athena/dbt-athena/pull/667](https://github.com/dbt-athena/dbt-athena/pull/667)
-   fix: Improve caching of work_group lookup by [@&#8203;namelessjon](https://github.com/namelessjon) in [https://github.com/dbt-athena/dbt-athena/pull/678](https://github.com/dbt-athena/dbt-athena/pull/678)

##### Chore

-   chore: improve function tests for iceberg retries by [@&#8203;nicor88](https://github.com/nicor88) in [https://github.com/dbt-athena/dbt-athena/pull/674](https://github.com/dbt-athena/dbt-athena/pull/674)
-   chore: increase num_iceberg retries by [@&#8203;nicor88](https://github.com/nicor88) in [https://github.com/dbt-athena/dbt-athena/pull/679](https://github.com/dbt-athena/dbt-athena/pull/679)
-   chore: prepare release 1.8.3 by [@&#8203;nicor88](https://github.com/nicor88) in [https://github.com/dbt-athena/dbt-athena/pull/680](https://github.com/dbt-athena/dbt-athena/pull/680)

##### Dependencies

-   chore: Update moto requirement from ~=5.0.8 to ~=5.0.9 by [@&#8203;dependabot](https://github.com/dependabot) in [https://github.com/dbt-athena/dbt-athena/pull/666](https://github.com/dbt-athena/dbt-athena/pull/666)
-   chore: Update pyupgrade requirement from ~=3.15 to ~=3.16 by [@&#8203;dependabot](https://github.com/dependabot) in [https://github.com/dbt-athena/dbt-athena/pull/669](https://github.com/dbt-athena/dbt-athena/pull/669)
-   chore: Update flake8 requirement from ~=7.0 to ~=7.1 by [@&#8203;dependabot](https://github.com/dependabot) in [https://github.com/dbt-athena/dbt-athena/pull/670](https://github.com/dbt-athena/dbt-athena/pull/670)
-   chore: Update dbt-tests-adapter requirement from ~=1.8.0 to ~=1.9.1 by [@&#8203;dependabot](https://github.com/dependabot) in [https://github.com/dbt-athena/dbt-athena/pull/673](https://github.com/dbt-athena/dbt-athena/pull/673)

##### Docs

-   chore: Added information about location table to readme ([#&#8203;628](https://github.com/dbt-athena/dbt-athena/issues/628)) by [@&#8203;cuff-links](https://github.com/cuff-links) in [https://github.com/dbt-athena/dbt-athena/pull/665](https://github.com/dbt-athena/dbt-athena/pull/665)

#### New Contributors

-   [@&#8203;cuff-links](https://github.com/cuff-links) made their first contribution in [https://github.com/dbt-athena/dbt-athena/pull/665](https://github.com/dbt-athena/dbt-athena/pull/665)
-   [@&#8203;namelessjon](https://github.com/namelessjon) made their first contribution in [https://github.com/dbt-athena/dbt-athena/pull/678](https://github.com/dbt-athena/dbt-athena/pull/678)

**Full Changelog**: dbt-labs/dbt-athena@v1.8.2...v1.8.3

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjQyMS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
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.

4 participants