Skip to content

Commit

Permalink
Mrege for 2.25.7 release (#527)
Browse files Browse the repository at this point in the history
## Release notes: usage and product changes

We merge development to master for the 2.25.7 release.
  • Loading branch information
flyingsilverfin authored Nov 16, 2023
2 parents 0fdc4ea + b7404b9 commit 7d8e8e0
Show file tree
Hide file tree
Showing 77 changed files with 414 additions and 259 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ commands:
deploy-pip-snapshot-unix:
steps:
- run: |
ulimit -n 100000
export DEPLOY_PIP_USERNAME=$REPO_VATICLE_USERNAME
export DEPLOY_PIP_PASSWORD=$REPO_VATICLE_PASSWORD
bazel run --define version=$(git rev-parse HEAD) //python:deploy-pip39 -- snapshot
Expand Down Expand Up @@ -186,6 +187,7 @@ commands:
deploy-maven-jni-snapshot-unix:
steps:
- run: |
ulimit -n 100000
export DEPLOY_MAVEN_USERNAME=$REPO_VATICLE_USERNAME
export DEPLOY_MAVEN_PASSWORD=$REPO_VATICLE_PASSWORD
bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh
Expand Down Expand Up @@ -253,6 +255,7 @@ commands:
deploy-maven-jni-release-unix:
steps:
- run: |
ulimit -n 100000
export DEPLOY_MAVEN_USERNAME=$REPO_VATICLE_USERNAME
export DEPLOY_MAVEN_PASSWORD=$REPO_VATICLE_PASSWORD
bazel run @vaticle_dependencies//tool/bazelinstall:remote_cache_setup.sh
Expand Down
40 changes: 22 additions & 18 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
---
name: Bug Report
about: Report a bug here, or visit forum.typedb.com for troubleshooting discussions
title: ''
labels: bug
---
assignees: ''

Please replace every line in curly brackets { like this } with an appropriate description, and remove this line.
---

## Description

{ Please provide a clear and concise description of the bug. }

## Environment

1. OS (where TypeDB Driver runs): { e.g. MacOS 10, Windows 10, Ubuntu 16.4, etc. }
2. TypeDB version (and platform): { e.g. TypeDB 2.11.1, or TypeDB Enterprise 2.11.1 on Google Cloud }
3. TypeDB Driver version: { e.g. typedb-driver 2.11.1 }
4. Other environment details:
1. TypeDB distribution: Core/Enterprise/Cloud
2. TypeDB version:
3. Environment: Linux/Mac/Windows/TypeDB Cloud/Google Cloud/AWS/Azure
4. Studio version:
5. Other details:

## Reproducible Steps

Steps to create the smallest reproducible scenario:
1. { e.g. Run ... }
2. { e.g. Load ... }
3. { e.g. Query ... }
4. { e.g. See error ... }
1. Set up


2. Execute


## Expected Output
3. Test/Query

{ Please describe what you expected to happen. }

## Actual Output
4. Unexpected result



## Expected result


{ Please describe what actually happened. }

## Additional information

{ Any additional information, including logs or screenshots if you have any. }
Relevant logs from TypeDB or Driver:

9 changes: 3 additions & 6 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
---
name: Feature Request
about: Request a feature here, or visit forum.typedb.com for ideas and questions
title: ''
labels: feature
---
assignees: ''

Please replace every line in curly brackets { like this } with an appropriate description, and remove this line.
---

## Problem to Solve

{ Please describe the problem you would like to solve. }

## Current Workaround

{ Please describe how you currently solve or work around this problem, given TypeDB's limitation. }

## Proposed Solution

{ Please describe the solution you would like TypeDB to provide, to solve the problem above. }

## Additional Information

{ Any additional information, including logs or screenshots if you have any. }
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/REFACTOR.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
name: Refactor
about: Propose an architecture refactor here
title: ''
labels: refactor
assignees: ''

---

Please replace every line in curly brackets { like this } with appropriate answers, and remove this line.

## Problem to Solve

{ Please describe the problem with the current architecture that you would like to solve. }

## Proposed Solution

{ Please describe how you would like to change the architecture, to solve the problem above. }
17 changes: 2 additions & 15 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
**For the title of this PR:** please follow the grammatical rules of a usual publication title, without capitalisation (except for the first letter). Thus, the title should NOT CONTAIN CODE: no dots, no parentheses, no backticks, no brackets, etc. It needs to be distinctive (not detailed) and succinct (not lengthy). Details of this PR will go in the description. **For the description of this PR:** please replace every line in curly brackets ( { like this } ) with an appropriate description following the guidance. Finally, **please remove this paragraph**.
## Release notes: usage and product changes

## What is the goal of this PR?

{ In the form of a paragraph (only use bullet points if strictly necessary), please describe the goal of this PR, why they are valuable to achieve, and reference the related GitHub issues. This section will be automatically compiled into the release notes, so please:
- describe the impact of the change in this PR to the _user_ of this repository (e.g. end user, contributor, developer).
- describe the new product behaviour in _present tense_, and the old behaviour and how it's been changed in _past tense_.
- Use the _Royal We_: _"We"_ made changes, not _"I"_ made changes. }

## What are the changes implemented in this PR?

{ Please explain what you implemented, why your changes are the best way to achieve the goal(s) above. Please describe every method, class and package, by explaining:
- its responsibility,
- how it's expected to behave, and
- how it relates to the adjacent methods/classes/packages it interacts with.

This would allow the reviewer to understand your intentions in the code much better. If you're adding new classes, make sure these explanations are also included in the class header comments. Last but not least, please reference the GitHub issues to be automatically closed, such like 'closes #number'. }
## Implementation
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ See the table below for links to README files, documentation, and source code.

| Driver | Readme | Documentation | Driver location |
|---------|--------|-------------------------------------------------------------------------------|-------------------------------------------------------------------------------|
| Rust | [README](https://github.com/vaticle/typedb-driver/tree/development/rust/README.md) | [Documentation](https://typedb.com/docs/clients/2.x/rust/rust-overview) | [`rust/`](https://github.com/vaticle/typedb-driver/tree/development/rust) |
| Python | [README](https://github.com/vaticle/typedb-driver/tree/development/python/README.md) | [Documentation](https://typedb.com/docs/clients/2.x/python/python-overview) | [`python/`](https://github.com/vaticle/typedb-driver/tree/development/python) |
| Node.js | [README](https://github.com/vaticle/typedb-driver/tree/development/nodejs/README.md) | [Documentation](https://typedb.com/docs/clients/2.x/node-js/node-js-overview) | [`nodejs/`](https://github.com/vaticle/typedb-driver/tree/development/nodejs) |
| Java | [README](https://github.com/vaticle/typedb-driver/tree/development/java/README.md) | [Documentation](https://typedb.com/docs/clients/2.x/java/java-overview) | [`java/`](https://github.com/vaticle/typedb-driver/tree/development/java) |
| Rust | [README](https://github.com/vaticle/typedb-driver/tree/development/rust/README.md) | [Documentation](https://typedb.com/docs/clients/rust-driver) | [`rust/`](https://github.com/vaticle/typedb-driver/tree/development/rust) |
| Python | [README](https://github.com/vaticle/typedb-driver/tree/development/python/README.md) | [Documentation](https://typedb.com/docs/clients/python-driver) | [`python/`](https://github.com/vaticle/typedb-driver/tree/development/python) |
| Node.js | [README](https://github.com/vaticle/typedb-driver/tree/development/nodejs/README.md) | [Documentation](https://typedb.com/docs/clients/nodejs-driver) | [`nodejs/`](https://github.com/vaticle/typedb-driver/tree/development/nodejs) |
| Java | [README](https://github.com/vaticle/typedb-driver/tree/development/java/README.md) | [Documentation](https://typedb.com/docs/clients/java-driver) | [`java/`](https://github.com/vaticle/typedb-driver/tree/development/java) |
| C | Coming soon | Coming soon | [`c/`](https://github.com/vaticle/typedb-driver/tree/development/c) |
45 changes: 35 additions & 10 deletions RELEASE_NOTES_LATEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Documentation: https://typedb.com/docs/clients/rust-driver


```sh
cargo add [email protected].5
cargo add [email protected].7
```


Expand All @@ -29,7 +29,7 @@ Documentation: https://typedb.com/docs/clients/java-driver
<dependency>
<groupid>com.vaticle.typedb</groupid>
<artifactid>typedb-driver</artifactid>
<version>2.25.5</version>
<version>2.25.7</version>
</dependency>
</dependencies>
```
Expand All @@ -42,7 +42,7 @@ Documentation: https://typedb.com/docs/clients/python-driver
Available through https://pypi.org

```
pip install typedb-driver==2.25.5
pip install typedb-driver==2.25.7
```

### NodeJS driver
Expand All @@ -51,25 +51,50 @@ NPM package: https://www.npmjs.com/package/typedb-driver
Documentation: https://typedb.com/docs/clients/nodejs-driver

```
npm install [email protected].5
npm install [email protected].7
```


## New Features
- **Node driver package automatic version stamping**


## Bugs Fixed
- **Add untyped value getter for Java values and fix Python type hints**

We leverage Bazel's built-in workspace status and stamping capabilities to ensure that the version of TypeDB Protocol depended on by the node package doesn't go out of sync with the bazel dependency.
We add a simple untyped API to Java's `Value` concepts, which return the value inside of the Value regardless of its type (double/string/etc.). This value is returned as an Object, and useful for equality checks, printing, etc. Additionally, the same API exists in Python and Node already.

To that end, we also add a snapshot deployment test for the node driver, and fix a bug in process of opening a connection to TypeDB Core.
We also fix the Python hints for setting the name of a Type, which was incorrectly hinting the type 'Label' when it should have been a simple string.



## Bugs Fixed
## Code Refactors
- **Silence send errors in network callbacks when receiver dropped**

Downgrade the "channel closed" `SendError` from ERROR to DEBUG when the receiving end of the stream is dropped before the stream is exhausted.
This used to occur when the network delivered messages to a dropped channel, for example when executing a `match-insert`
and the responses were not consumed explicitly.


- **Optimise CI times by retaining server between Java BDD scenarios**

We optimise Java CI time by not shutting down the TypeDB server between scenarios. Instead, we delete the existing databases each test, which is much faster.

During this work, we also discovered some sub-par UX in terms of error messages thrown, and missing BDD steps that needed to be implemented.


## Code Refactors


## Other Improvements
- **Fix python BDD TLS connection configuration**

- **Fix Rust BDD infer flag and python TLS default to false**

- **Update VERSION and regenerate release notes**

- **Increase ulimits on unix CircleCI machines**

- **Update README links to docs**

- **Simplify github PR and issue templates**

- **Add linker dependencies for windows**
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.25.5
2.25.7
4 changes: 2 additions & 2 deletions dependencies/vaticle/artifacts.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def vaticle_typedb_artifact():
artifact_name = "typedb-server-{platform}-{version}.{ext}",
tag_source = deployment["artifact.release"],
commit_source = deployment["artifact.snapshot"],
commit = "525ac0f5e072242c1d2f360379e9622397497ef2",
tag = "2.25.6",
)

def vaticle_typedb_enterprise_artifact():
Expand All @@ -39,5 +39,5 @@ def vaticle_typedb_enterprise_artifact():
artifact_name = "typedb-enterprise-all-{platform}-{version}.{ext}",
tag_source = deployment_private["artifact.release"],
commit_source = deployment_private["artifact.snapshot"],
commit = "fc127f880bf85fab134ddcd1e5409142d47a1c32",
commit = "994220cb44052ba8b66c8e889f94f47ab3b15c0d",
)
2 changes: 1 addition & 1 deletion dependencies/vaticle/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ def vaticle_typedb_behaviour():
git_repository(
name = "vaticle_typedb_behaviour",
remote = "https://github.com/vaticle/typedb-behaviour",
commit = "173c15ec4f15b5f19c2509ecf43f6697efb04247", # sync-marker: do not remove this comment, this is used for sync-dependencies by @vaticle_typedb_behaviour
commit = "b6a1336260a4d11b77750f06abaccba6c9a21f13", # sync-marker: do not remove this comment, this is used for sync-dependencies by @vaticle_typedb_behaviour
)
6 changes: 3 additions & 3 deletions java/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# TypeDB Java Driver

## Driver Architecture
To learn about the mechanism that a TypeDB Driver uses to set up communication with databases running on the TypeDB Server, refer to the [Clients Overview](https://typedb.com/docs/clients/2.x/clients).
To learn about the mechanism that a TypeDB Driver uses to set up communication with databases running on the TypeDB Server, refer to the [Clients Overview](https://typedb.com/docs/clients/overview).

## API Reference
To learn about the methods available for executing queries and retrieving their answers using Driver Java, refer to the [API Reference](https://typedb.com/docs/clients/2.x/java/java-api-ref).
To learn about the methods available for executing queries and retrieving their answers using Driver Java, refer to the [API Reference](https://typedb.com/docs/clients/java-driver/api-reference).

## Import TypeDB Driver for Java through Maven

Expand All @@ -25,7 +25,7 @@ To learn about the methods available for executing queries and retrieving their
</dependencies>
```

Further documentation: https://typedb.com/docs/clients/2.x/java/java-overview
Further documentation: https://typedb.com/docs/clients/java-driver

## Build TypeDB Driver for Java from Source

Expand Down
11 changes: 11 additions & 0 deletions java/api/concept/value/Value.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,17 @@ default Value asValue() {
*/
boolean isDateTime();

/**
* Returns an untyped <code>Object</code> value of this value concept.
* This is useful for value equality or printing without having to switch on the actual contained value.
*
* <h3>Examples</h3>
* <pre>
* value.asUntyped();
* </pre>
*/
Object asUntyped();

/**
* Returns a <code>boolean</code> value of this value concept.
* If the value has another type, raises an exception.
Expand Down
17 changes: 11 additions & 6 deletions java/concept/value/ValueImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,16 @@ public boolean isDateTime() {
return value_is_date_time(nativeObject);
}

@Override
public Object asUntyped() {
if (isBoolean()) return asBoolean();
else if (isLong()) return asLong();
else if (isDouble()) return asDouble();
else if (isString()) return asString();
else if (isDateTime()) return asDateTime();
throw new TypeDBDriverException(UNEXPECTED_NATIVE_VALUE);
}

@Override
public boolean asBoolean() {
if (!isBoolean()) throw new TypeDBDriverException(ILLEGAL_CAST, "boolean");
Expand Down Expand Up @@ -160,11 +170,6 @@ public int hashCode() {
}

private int computeHash() {
if (isBoolean()) return Boolean.hashCode(asBoolean());
else if (isLong()) return Long.hashCode(asLong());
else if (isDouble()) return Double.hashCode(asDouble());
else if (isString()) return asString().hashCode();
else if (isDateTime()) return asDateTime().hashCode();
return -1;
return asUntyped().hashCode();
}
}
1 change: 1 addition & 0 deletions java/connection/TypeDBDriverImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public TypeDBSession session(String database, TypeDBSession.Type type, TypeDBOpt

@Override
public void close() {
if (!isOpen()) return;
try {
connection_force_close(nativeObject);
} catch (com.vaticle.typedb.driver.jni.Error error) {
Expand Down
22 changes: 22 additions & 0 deletions java/docs/data/Value.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,28 @@ Casts the concept to ``Type``.
concept.asType();
----

[#_Value_asUntyped_]
==== asUntyped

[source,java]
----
java.lang.Object asUntyped()
----

Returns an untyped ``Object`` value of this value concept. This is useful for value equality or printing without having to switch on the actual contained value.


[caption=""]
.Returns
`java.lang.Object`

[caption=""]
.Code examples
[source,java]
----
value.asUntyped();
----

[#_Value_asValue_]
==== asValue

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
plugin = "pretty",
glue = "com.vaticle.typedb.driver.test.behaviour",
features = "external/vaticle_typedb_behaviour/concept/thing/attribute.feature",
tags = "not @ignore and not @ignore-typedb"
tags = "not @ignore and not @ignore-typedb-driver and not @ignore-typedb-driver-java"
)
public class AttributeTest extends BehaviourTest {
// ATTENTION:
Expand Down
2 changes: 1 addition & 1 deletion java/test/behaviour/concept/thing/entity/EntityTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
plugin = "pretty",
glue = "com.vaticle.typedb.driver.test.behaviour",
features = "external/vaticle_typedb_behaviour/concept/thing/entity.feature",
tags = "not @ignore and not @ignore-typedb"
tags = "not @ignore and not @ignore-typedb-driver and not @ignore-typedb-driver-java"
)
public class EntityTest extends BehaviourTest {
// ATTENTION:
Expand Down
Loading

0 comments on commit 7d8e8e0

Please sign in to comment.