kevlened / fireway

A schema migration tool for firestore
MIT License
280 stars 43 forks source link

Fireway collection is updated to last migration on dryrun #9

Closed Nicholaiii closed 4 years ago

Nicholaiii commented 4 years ago

This means we need to clear the Fireway collection whenever we want to test the migrations. This is a huge hassle.

kevlened commented 4 years ago

If dryrun performs writes to the db, it's a bug. Is this a problem with 0.2.3?

Nicholaiii commented 4 years ago

I took a deep dive. It happens because you monkeypatch google firestore functions, specifically WriteBatch.commit_, but since this is an internal function it's not guaranteed by the project to remain consistent so when you bumped Firestore to version 4, it is no longer there, they just use commit() now.

Nicholaiii commented 4 years ago

This also means any potential write operation (not just the Fireway collection) in fireway@0.3.0 is performed regardless of dryrun.

kevlened commented 4 years ago

Ah, I checked quickly before publishing and saw this._commit(), which is close, but certainly not this.commit_().

Fixing. Thanks for the heads up.

kevlened commented 4 years ago

Resolved by 0.3.1