Skip to content

Commit

Permalink
Merge for 2.26.6-rc0 release (#316)
Browse files Browse the repository at this point in the history
## Usage and product changes

We merge for the 2.26.6-rc0 release.
  • Loading branch information
flyingsilverfin authored Jan 29, 2024
2 parents 025798c + 152dfc4 commit e65f556
Show file tree
Hide file tree
Showing 31 changed files with 1,503 additions and 73 deletions.
48 changes: 38 additions & 10 deletions .factory/automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ config:
version-candidate: VERSION
dependencies:
dependencies: [build]
typedb-common: [build, release]
typedb-behaviour: [build]

build:
quality:
filter:
owner: vaticle
branch: master
branch: [master, development]
dependency-analysis:
image: vaticle-ubuntu-22.04
command: |
Expand Down Expand Up @@ -68,7 +67,7 @@ build:
deploy-crate-snapshot:
filter:
owner: vaticle
branch: master
branch: [master, development]
image: vaticle-ubuntu-22.04
dependencies: [build, build-dependency, test-rust]
command: |
Expand All @@ -78,7 +77,7 @@ build:
deploy-maven-snapshot:
filter:
owner: vaticle
branch: master
branch: [master, development]
image: vaticle-ubuntu-22.04
dependencies: [build, build-dependency, test-java]
command: |
Expand All @@ -92,10 +91,11 @@ build:
bazel run --define version=$(git rev-parse HEAD) //java/query:deploy-maven -- snapshot
bazel run --define version=$(git rev-parse HEAD) //java/parser:deploy-maven -- snapshot
bazel run --define version=$(git rev-parse HEAD) //java:deploy-maven -- snapshot
bazel run --define version=$(git rev-parse HEAD) //common/java:deploy-maven -- snapshot
deploy-pip-snapshot:
filter:
owner: vaticle
branch: master
branch: [master, development]
image: vaticle-ubuntu-20.04
dependencies: [ build, build-dependency ]
command: |
Expand All @@ -105,21 +105,35 @@ build:
test-deployment-maven:
filter:
owner: vaticle
branch: master
branch: [master, development]
image: vaticle-ubuntu-22.04
dependencies: [deploy-maven-snapshot]
command: |
sed -i -e "s/TYPEQL_LANG_VERSION_MARKER/$FACTORY_COMMIT/g" java/test/deployment/pom.xml
sed -i -e "s/TYPEQL_LANG_VERSION_MARKER/0.0.0-$FACTORY_COMMIT/g" java/test/deployment/pom.xml
cd java/test/deployment/ && mvn test
sync-dependencies:
image: vaticle-ubuntu-22.04
filter:
owner: vaticle
branch: [master, development]
dependencies:
- build
- build-dependency
- test-java
- test-rust
- deploy-crate-snapshot
- deploy-maven-snapshot
- deploy-pip-snapshot
- test-deployment-maven
command: |
export SYNC_DEPENDENCIES_TOKEN=$REPO_GITHUB_TOKEN
bazel run @vaticle_dependencies//tool/sync:dependencies -- --source ${FACTORY_REPO}@${FACTORY_COMMIT}
release:
filter:
owner: vaticle
branch: master
validation:
validate-dependencies:
image: vaticle-ubuntu-22.04
command: bazel test //java:release-validate-deps --test_output=streamed
validate-release-notes:
image: vaticle-ubuntu-22.04
command: |
Expand Down Expand Up @@ -158,10 +172,24 @@ release:
bazel run --define version=$(cat VERSION) //java/query:deploy-maven -- release
bazel run --define version=$(cat VERSION) //java/parser:deploy-maven -- release
bazel run --define version=$(cat VERSION) //java:deploy-maven -- release
bazel run --define version=$(cat VERSION) //common/java:deploy-maven -- release
deploy-pip-release:
image: vaticle-ubuntu-20.04
dependencies: [ deploy-github ]
command: |
export DEPLOY_PIP_USERNAME=$REPO_PYPI_USERNAME
export DEPLOY_PIP_PASSWORD=$REPO_PYPI_PASSWORD
bazel run --define version=$(cat VERSION) //grammar/python:deploy-pip -- release
sync-dependencies-release:
image: vaticle-ubuntu-22.04
filter:
owner: vaticle
branch: [master, development]
dependencies:
- deploy-github
- deploy-crate-release
- deploy-maven-release
- deploy-pip-release
command: |
export SYNC_DEPENDENCIES_TOKEN=$REPO_GITHUB_TOKEN
bazel run @vaticle_dependencies//tool/sync:dependencies -- --source ${FACTORY_REPO}@$(cat VERSION)
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**.
## 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
52 changes: 36 additions & 16 deletions RELEASE_NOTES_LATEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Available through https://crates.io/crates/typeql.
```
cargo add typeql@2.25.8
cargo add typeql@2.26.6-rc0
```

## TypeQL Grammar and Language Library distributions for Java
Expand All @@ -20,12 +20,12 @@ cargo add [email protected]
<dependency>
<groupId>com.vaticle.typeql</groupId>
<artifactId>typeql-grammar</artifactId>
<version>2.25.8</version>
<version>2.26.6-rc0</version>
</dependency>
<dependency>
<groupId>com.vaticle.typeql</groupId>
<artifactId>typeql-lang</artifactId>
<version>2.25.8</version>
<version>2.26.6-rc0</version>
</dependency>
</dependencies>
```
Expand All @@ -35,33 +35,53 @@ cargo add [email protected]
Available through https://pypi.org

```
pip install typeql-grammar==2.25.8
pip install typeql-grammar==2.26.6-rc0
```


## New Features

- **Implement non-ascii variables in Java and Rust**
We update to TypeQL with Unicode support in both value and concept variables. This makes the following valid TypeQL:
```
match $人 isa person, has name "Liu"; get $人;
```
```
match $אדם isa person, has name "Solomon"; get $אדם;
```

We now require all Labels and Variables are valid unicode identifiers not starting with `_`.

This change is fully backwards compatible. We also validate that Type Labels and Variables created using the TypeQL language builders in both Rust and Java are conforming to our Unicode specification.



## Bugs Fixed

- **Fix snapshot version in test-deployment-maven**

We update the generated snapshot version in test-deployment-maven CI job to correspond to the updated snapshot version format.


## Code Refactors
- **Technical debt: improve error_messages, cleanup**

- **Merge typedb-common repository into typeql**

As part of the effort to reduce the number of vaticle organization repositories, we merge typedb-common into the typeql repo as a subpackage.


## Other Improvements
- **Sync dependencies in CI**

`error_messages!` now accepts struct enum variants, rather than tuple variants. This forces the user to name the fields and to refer to the fields by name in the format strings, reducing user error.
We add a sync-dependencies job to be run in CI after successful snapshot and release deployments. The job sends a request to vaticle-bot to update all downstream dependencies.

Note: this PR does _not_ update the `dependencies` repo dependency. It will be updated automatically by the bot during its first pass.

- **Set up CI filters for master-development workflow**

## Other Improvements
- **Update README.md**

- **Update readme: fix the forum badge**
- **Migrate artifact hosting to cloudsmith**
Updates artifact deployment & consumption rules to use cloudsmith instead of the self-hosted sonatype repository.


Update the readme file to fix the forum badge.


- **Fixed badges in README.md to refer to TypeQL**




2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.25.8
2.26.6-rc0
5 changes: 1 addition & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,10 @@ install_uploader_deps()
# Load @vaticle dependencies #
################################

load("//dependencies/vaticle:repositories.bzl", "vaticle_typedb_common", "vaticle_typedb_behaviour")
vaticle_typedb_common()
load("//dependencies/vaticle:repositories.bzl", "vaticle_typedb_behaviour")
vaticle_typedb_behaviour()

load("@vaticle_dependencies//tool/common:deps.bzl", vaticle_dependencies_tool_maven_artifacts = "maven_artifacts")
load("@vaticle_typedb_common//dependencies/maven:artifacts.bzl", vaticle_typedb_common_artifacts = "artifacts")

############################
# Load @maven dependencies #
Expand All @@ -150,7 +148,6 @@ load("@vaticle_dependencies//library/maven:rules.bzl", "maven")
maven(
vaticle_bazel_distribution_maven_artifacts +
vaticle_dependencies_tool_maven_artifacts +
vaticle_typedb_common_artifacts +
vaticle_typeql_artifacts
)

Expand Down
30 changes: 30 additions & 0 deletions common/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#
# Copyright (C) 2022 Vaticle
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

load("@vaticle_dependencies//tool/checkstyle:rules.bzl", "checkstyle_test")

checkstyle_test(
name = "checkstyle",
include = ["BUILD"],
license_type = "apache-header",
)


80 changes: 80 additions & 0 deletions common/java/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#
# Copyright (C) 2022 Vaticle
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

exports_files(["VERSION"], visibility = ["//visibility:public"])
load("@vaticle_bazel_distribution//maven:rules.bzl", "assemble_maven", "deploy_maven")
load("@vaticle_dependencies//distribution/maven:version.bzl", "version")
load("@vaticle_dependencies//library/maven:artifacts.bzl", "artifacts")
load("@vaticle_dependencies//tool/checkstyle:rules.bzl", "checkstyle_test")
load("@vaticle_dependencies//distribution:deployment.bzl", "deployment")

java_library(
name = "common",
srcs = glob([
"collection/*.java",
"concurrent/*.java",
"concurrent/actor/*.java",
"concurrent/actor/eventloop/*.java",
"exception/*.java",
"util/*.java",
"yaml/*.java",
]),
deps = [
"@maven//:org_yaml_snakeyaml",
],
visibility = ["//visibility:public"],
tags = [
"maven_coordinates=com.vaticle.typedb:typedb-common:{pom_version}",
],
)

assemble_maven(
name = "assemble-maven",
target = ":common",
workspace_refs = "@vaticle_typeql_workspace_refs//:refs.json",
version_overrides = version(artifacts_org = artifacts, artifacts_repo={}),
project_name = "TypeDB Common",
project_description = "TypeDB Common classes and tools",
project_url = "https://github.com/vaticle/typeql",
scm_url = "https://github.com/vaticle/typeql",
)

deploy_maven(
name = "deploy-maven",
target = ":assemble-maven",
snapshot = deployment['maven']['snapshot']['upload'],
release = deployment['maven']['release']['upload']
)

checkstyle_test(
name = "checkstyle",
include = glob([
"BUILD",
"collection/*",
"concurrent/*",
"concurrent/actor/*.java",
"concurrent/actor/eventloop/*.java",
"exception/*",
"util/*",
"yaml/*.java"
]),
license_type = "apache-header",
)
Loading

0 comments on commit e65f556

Please sign in to comment.