googleapis / googleapis/google-cloud-java

java-datastore: LocalDatastoreHelper is downloading datastore emulator zip every time even when file exists

Aperta
#12,058 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
api: datastore priority: p3 type: bug
Lingua principale
Java
Stelle
2.1k
Fork
1.2k
Merge medio
1g 23h
PR unite (30g)
154

Descrizione

When the [LocalDatastoreHelper](https://github.com/googleapis/google-cloud-java/blob/main/java-datastore/google-cloud-datastore/src/main/java/com/google/cloud/datastore/testing/LocalDatastoreHelper.java) is started with `.start()` API it is downloading a 36mb zip file from `http://storage.googleapis.com/gcd/tools/cloud-datastore-emulator-2.3.1.zip` every time even if file already exist locally.

This is due to checksum mismatch at:

https://github.com/googleapis/sdk-platform-java/blob/56aa3438393e1992bb8f688291fb12030ec9bc0e/java-core/google-cloud-core/src/main/java/com/google/cloud/testing/BaseEmulatorHelper.java#L465-L479

The checksum value that LocalDatastoreHelper is passing down is not correct:

https://github.com/googleapis/google-cloud-java/blob/aa2c24982903071ab0408fac4357fb8dd067a3fa/java-datastore/google-cloud-datastore/src/main/java/com/google/cloud/datastore/testing/LocalDatastoreHelper.java#L68

The actual file checksum is `7c1f5a3276241a8f78cb1a837daaaa47`:

```
> curl http://storage.googleapis.com/gcd/tools/cloud-datastore-emulator-2.3.1.
zip | md5sum
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 36.1M 100 36.1M 0 0 8831k 0 0:00:04 0:00:04 --:--:-- 8833k
7c1f5a3276241a8f78cb1a837daaaa47 -
```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.