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

fix(indexing)!: Node ID no longer memoized #414

Merged
merged 5 commits into from
Oct 27, 2024
Merged

Conversation

timonv
Copy link
Member

@timonv timonv commented Oct 27, 2024

As @shamb0 pointed out in #392, there is a potential issue where Node ids are get cached before chunking or other transformations, breaking upserts and potentially resulting in data loss.

BREAKING CHANGE: This PR reworks Nodes with a builder API and a private id. Hence, manually creating nodes no longer works. In the future, all the fields are likely to follow the same pattern, so that we can decouple the inner fields from the Node's implementation.

@timonv timonv changed the title fix(indexing): Reset memoized node id everywhere fix(indexing)!: Reset memoized node id everywhere Oct 27, 2024
@timonv timonv marked this pull request as ready for review October 27, 2024 14:39
@timonv timonv changed the title fix(indexing)!: Reset memoized node id everywhere fix(indexing)!: Node ID no longer memoized Oct 27, 2024
@timonv timonv merged commit 551a9cb into master Oct 27, 2024
16 checks passed
@timonv timonv deleted the fix/enforce-node-id-reset branch October 27, 2024 14:45
This was referenced Oct 27, 2024
timonv pushed a commit that referenced this pull request Oct 27, 2024
## 🤖 New release
* `swiftide`: 0.13.4 -> 0.14.0 (✓ API compatible changes)
* `swiftide-core`: 0.13.4 -> 0.14.0 (⚠️ API breaking changes)
* `swiftide-indexing`: 0.13.4 -> 0.14.0 (✓ API compatible changes)
* `swiftide-macros`: 0.13.4 -> 0.14.0
* `swiftide-integrations`: 0.13.4 -> 0.14.0 (✓ API compatible changes)
* `swiftide-query`: 0.13.4 -> 0.14.0 (✓ API compatible changes)

### ⚠️ `swiftide-core` breaking changes

```
--- failure inherent_method_missing: pub method removed or renamed ---

Description:
A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/inherent_method_missing.ron

Failed in:
  Node::update_id, previously in file /tmp/.tmpp9ZuUf/swiftide-core/src/node.rs:204

--- failure struct_pub_field_missing: pub struct's pub field removed or renamed ---

Description:
A publicly-visible struct has at least one public field that is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/struct_pub_field_missing.ron

Failed in:
  field id of struct Node, previously in file /tmp/.tmpp9ZuUf/swiftide-core/src/node.rs:41
```

<details><summary><i><b>Changelog</b></i></summary><p>

## `swiftide`
<blockquote>

##
[0.14.0](v0.13.4...v0.14.0)
- 2024-10-27

### New features

-
[a866d38](a866d38)
*(integrations)* Support in process hugging face models via mistralrs
([#386](#386))

### Bug fixes

-
[551a9cb](551a9cb)
*(indexing)* [**breaking**] Node ID no longer memoized
([#414](#414))

````text
As @shamb0 pointed out in [#392](#392), there is a potential issue where Node
  ids are get cached before chunking or other transformations, breaking
  upserts and potentially resulting in data loss.
````

**BREAKING CHANGE**: This PR reworks Nodes with a builder API and a
private
id. Hence, manually creating nodes no longer works. In the future, all
the fields are likely to follow the same pattern, so that we can
decouple the inner fields from the Node's implementation.

-
[c091ffa](c091ffa)
*(indexing)* Use atomics for key generation in memory storage
([#415](#415))

### Miscellaneous

- [0000000](0000000) Update
Cargo.toml dependencies


**Full Changelog**:
0.13.4...0.14.0
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).
shamb0 pushed a commit to shamb0/swiftide that referenced this pull request Oct 30, 2024
As @shamb0 pointed out in bosun-ai#392, there is a potential issue where Node
ids are get cached before chunking or other transformations, breaking
upserts and potentially resulting in data loss.

BREAKING CHANGE: This PR reworks Nodes with a builder API and a private
id. Hence, manually creating nodes no longer works. In the future, all
the fields are likely to follow the same pattern, so that we can
decouple the inner fields from the Node's implementation.
shamb0 pushed a commit to shamb0/swiftide that referenced this pull request Oct 30, 2024
## 🤖 New release
* `swiftide`: 0.13.4 -> 0.14.0 (✓ API compatible changes)
* `swiftide-core`: 0.13.4 -> 0.14.0 (⚠️ API breaking changes)
* `swiftide-indexing`: 0.13.4 -> 0.14.0 (✓ API compatible changes)
* `swiftide-macros`: 0.13.4 -> 0.14.0
* `swiftide-integrations`: 0.13.4 -> 0.14.0 (✓ API compatible changes)
* `swiftide-query`: 0.13.4 -> 0.14.0 (✓ API compatible changes)

### ⚠️ `swiftide-core` breaking changes

```
--- failure inherent_method_missing: pub method removed or renamed ---

Description:
A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/inherent_method_missing.ron

Failed in:
  Node::update_id, previously in file /tmp/.tmpp9ZuUf/swiftide-core/src/node.rs:204

--- failure struct_pub_field_missing: pub struct's pub field removed or renamed ---

Description:
A publicly-visible struct has at least one public field that is no longer available under its prior name. It may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/struct_pub_field_missing.ron

Failed in:
  field id of struct Node, previously in file /tmp/.tmpp9ZuUf/swiftide-core/src/node.rs:41
```

<details><summary><i><b>Changelog</b></i></summary><p>

## `swiftide`
<blockquote>

##
[0.14.0](bosun-ai/swiftide@v0.13.4...v0.14.0)
- 2024-10-27

### New features

-
[a866d38](bosun-ai@a866d38)
*(integrations)* Support in process hugging face models via mistralrs
([bosun-ai#386](bosun-ai#386))

### Bug fixes

-
[551a9cb](bosun-ai@551a9cb)
*(indexing)* [**breaking**] Node ID no longer memoized
([bosun-ai#414](bosun-ai#414))

````text
As @shamb0 pointed out in [bosun-ai#392](bosun-ai#392), there is a potential issue where Node
  ids are get cached before chunking or other transformations, breaking
  upserts and potentially resulting in data loss.
````

**BREAKING CHANGE**: This PR reworks Nodes with a builder API and a
private
id. Hence, manually creating nodes no longer works. In the future, all
the fields are likely to follow the same pattern, so that we can
decouple the inner fields from the Node's implementation.

-
[c091ffa](bosun-ai@c091ffa)
*(indexing)* Use atomics for key generation in memory storage
([bosun-ai#415](bosun-ai#415))

### Miscellaneous

- [0000000](bosun-ai@0000000) Update
Cargo.toml dependencies


**Full Changelog**:
bosun-ai/swiftide@0.13.4...0.14.0
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant