Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

cloud-datastore-emulator Version 1.3 leads to "Invalid version format" #2559

Copy link
Copy link

Description

@kyzrfranz
Issue body actions

After updating to Google Cloud SDK 177.0.0, we found the LocalDatastoreHelper crashing in the following way:

java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124) at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83) at org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener.prepareTestInstance(SpringBootDependencyInjectionTestExecutionListener.java:47) {...} Caused by: java.lang.IllegalArgumentException: Invalid version format at com.google.cloud.testing.Version.fromString(Version.java:90) ~[google-cloud-core-1.0.2.jar:1.0.2] at com.google.cloud.testing.BaseEmulatorHelper$GcloudEmulatorRunner.getInstalledEmulatorVersion(BaseEmulatorHelper.java:327) ~[google-cloud-core-1.0.2.jar:1.0.2] at com.google.cloud.testing.BaseEmulatorHelper$GcloudEmulatorRunner.isEmulatorUpToDate(BaseEmulatorHelper.java:306) ~[google-cloud-core-1.0.2.jar:1.0.2] at com.google.cloud.testing.BaseEmulatorHelper$GcloudEmulatorRunner.isAvailable(BaseEmulatorHelper.java:272) ~[google-cloud-core-1.0.2.jar:1.0.2] at com.google.cloud.testing.BaseEmulatorHelper.startProcess(BaseEmulatorHelper.java:100) ~[google-cloud-core-1.0.2.jar:1.0.2] at com.google.cloud.datastore.testing.LocalDatastoreHelper.start(LocalDatastoreHelper.java:192) ~[google-cloud-datastore-1.0.2.jar:1.0.2] at com.rewedigital.fulfillment.core.service.config.TestDatastoreConfig$TestHelperDatastore.afterPropertiesSet(TestDatastoreConfig.java:52) ~

It seems that com.google.cloud.testing.Version expects a version number following this RegExp:
private static final Pattern VERSION_PATTERN = Pattern.compile("^(\\d+)\\.(\\d+)\\.(\\d+)$");
Since the current Version "1.3" does not conform to it - it leads to the exceptions above.

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.