Skip to content

Commit

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

We merge development into master for 2.26.6-rc1 release.
  • Loading branch information
flyingsilverfin authored Jan 30, 2024
2 parents 74e45a9 + 9660e2f commit 32c1de6
Show file tree
Hide file tree
Showing 12 changed files with 132 additions and 96 deletions.
71 changes: 29 additions & 42 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,6 @@ jobs:
export DEPLOY_ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME
export DEPLOY_ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD
bazel run --define version=$(cat VERSION) //:deploy-linux-x86_64-targz --compilation_mode=opt -- release
- run: |
mkdir -p ~/dist
cp bazel-bin/typedb-console-linux-x86_64.tar.gz ~/dist/typedb-console-linux-x86_64.tar.gz
- persist_to_workspace:
root: ~/dist
paths: ["./*"]
deploy-artifact-release-linux-arm64:
executor: linux-arm64-amazonlinux-2
Expand All @@ -163,13 +157,7 @@ jobs:
export DEPLOY_ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME
export DEPLOY_ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD
bazel run --define version=$(cat VERSION) //:deploy-linux-arm64-targz --compilation_mode=opt -- release
- run: |
mkdir -p ~/dist
cp bazel-bin/typedb-console-linux-arm64.tar.gz ~/dist/typedb-console-linux-arm64.tar.gz
- persist_to_workspace:
root: ~/dist
paths: ["./*"]

deploy-artifact-release-mac-x86_64:
executor: mac-x86_64
steps:
Expand All @@ -179,13 +167,7 @@ jobs:
export DEPLOY_ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME
export DEPLOY_ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD
bazel run --define version=$(cat VERSION) //:deploy-mac-x86_64-zip --compilation_mode=opt -- release
- run: |
mkdir -p ~/dist
cp bazel-bin/typedb-console-mac-x86_64.zip ~/dist/typedb-console-mac-x86_64.zip
- persist_to_workspace:
root: ~/dist
paths: ["./*"]

deploy-artifact-release-mac-arm64:
executor: mac-arm64
steps:
Expand All @@ -195,13 +177,7 @@ jobs:
export DEPLOY_ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME
export DEPLOY_ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD
bazel run --define version=$(cat VERSION) //:deploy-mac-arm64-zip --compilation_mode=opt -- release
- run: |
mkdir -p ~/dist
cp bazel-bin/typedb-console-mac-arm64.zip ~/dist/typedb-console-mac-arm64.zip
- persist_to_workspace:
root: ~/dist
paths: [ "./*" ]

deploy-artifact-release-windows-x86_64:
executor:
name: win/default
Expand All @@ -212,26 +188,31 @@ jobs:
- checkout
- run: .circleci\windows\prepare.bat
- run: .circleci\windows\deploy_release.bat
- persist_to_workspace:
root: dist
paths: [ "./*" ]

deploy-github:
executor: linux-x86_64-ubuntu-2204
steps:
- attach_workspace:
at: ~/dist
- checkout
- install-bazel-apt:
arch: amd64
- run:
name: "Publish Release on GitHub"
command: |
wget https://github.com/tcnksm/ghr/releases/download/v0.12.1/ghr_v0.12.1_linux_amd64.tar.gz
tar -xf ghr_v0.12.1_linux_amd64.tar.gz
ghr_v0.12.1_linux_amd64/ghr -t ${REPO_GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} \
wget https://github.com/tcnksm/ghr/releases/download/v0.16.2/ghr_v0.16.2_linux_amd64.tar.gz
tar -xf ghr_v0.16.2_linux_amd64.tar.gz
ghr_v0.16.2_linux_amd64/ghr -t ${REPO_GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} \
-r ${CIRCLE_PROJECT_REPONAME} -n "TypeDB Console $(cat VERSION)" -b "$(cat ./RELEASE_NOTES_LATEST.md)" \
-c ${CIRCLE_SHA1} -delete $(cat VERSION) ~/dist/
-c ${CIRCLE_SHA1} -delete $(cat VERSION)
sync-dependencies:
executor: linux-x86_64-ubuntu-2204
steps:
- checkout
- install-bazel-apt:
arch: amd64
- run:
export SYNC_DEPENDENCIES_TOKEN=$REPO_GITHUB_TOKEN
bazel run @vaticle_dependencies//tool/sync:dependencies -- --source ${CIRCLE_PROJECT_REPONAME}@$(cat VERSION)

release-cleanup:
executor: linux-x86_64-ubuntu-2204
Expand All @@ -249,23 +230,23 @@ workflows:
- deploy-artifact-snapshot-linux-x86_64:
filters:
branches:
only: [master]
only: [master, development]
- deploy-artifact-snapshot-linux-arm64:
filters:
branches:
only: [master]
only: [master, development]
- deploy-artifact-snapshot-mac-x86_64:
filters:
branches:
only: [master]
only: [master, development]
- deploy-artifact-snapshot-mac-arm64:
filters:
branches:
only: [master]
only: [master, development]
- deploy-artifact-snapshot-windows-x86_64:
filters:
branches:
only: [master]
only: [master, development]

release:
jobs:
Expand Down Expand Up @@ -299,9 +280,15 @@ workflows:
- deploy-artifact-release-mac-x86_64
- deploy-artifact-release-mac-arm64
- deploy-artifact-release-windows-x86_64
- release-cleanup:
- sync-dependencies:
filters:
branches:
only: [release]
requires:
- deploy-github
- release-cleanup:
filters:
branches:
only: [release]
requires:
- sync-dependencies
3 changes: 0 additions & 3 deletions .circleci/windows/deploy_release.bat
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,3 @@ SET DEPLOY_ARTIFACT_PASSWORD=%REPO_TYPEDB_PASSWORD%
SET /p VER=<VERSION
bazel --output_user_root=C:/b run --verbose_failures --define version=%VER% //:deploy-windows-x86_64-zip --compilation_mode=opt -- release
IF %errorlevel% NEQ 0 EXIT /b %errorlevel%

MD dist
COPY bazel-bin\typedb-console-windows-x86_64.zip dist\typedb-console-windows-x86_64.zip
14 changes: 11 additions & 3 deletions .factory/automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ config:
version-candidate: VERSION
dependencies:
dependencies: [build]
typedb-common: [build, release]
typedb-driver: [build, release]

build:
quality:
filter:
owner: vaticle
branch: master
branch: [master, development]
dependency-analysis:
image: vaticle-ubuntu-22.04
command: |
Expand Down Expand Up @@ -58,13 +57,22 @@ build:
deploy-runner-maven-snapshot:
filter:
owner: vaticle
branch: master
branch: [master, development]
image: vaticle-ubuntu-22.04
dependencies: [build]
command: |
export DEPLOY_MAVEN_USERNAME=$REPO_TYPEDB_USERNAME
export DEPLOY_MAVEN_PASSWORD=$REPO_TYPEDB_PASSWORD
bazel run --define version=$(git rev-parse HEAD) //tool/runner:deploy-maven -- snapshot
sync-dependencies:
image: vaticle-ubuntu-22.04
filter:
owner: vaticle
branch: [master, development]
dependencies: [test-assembly]
command: |
export SYNC_DEPENDENCIES_TOKEN=$REPO_GITHUB_TOKEN
bazel run @vaticle_dependencies//tool/sync:dependencies -- --source ${FACTORY_REPO}@${FACTORY_COMMIT}
release:
filter:
Expand Down
4 changes: 2 additions & 2 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ java_library(
"@vaticle_typeql//java/common:common",
"@vaticle_typeql//java/query",
"@vaticle_typeql//java/pattern",
"@vaticle_typedb_common//:common",
"@vaticle_typeql//common/java:common",

# External dependencies
"@maven//:com_google_code_findbugs_jsr305",
Expand Down Expand Up @@ -187,7 +187,6 @@ release_validate_deps(
name = "release-validate-deps",
refs = "@vaticle_typedb_console_workspace_refs//:refs.json",
tagged_deps = [
"@vaticle_typedb_common",
"@vaticle_typedb_driver",
"@vaticle_typeql",
],
Expand Down Expand Up @@ -231,5 +230,6 @@ filegroup(
"@vaticle_dependencies//tool/sonarcloud:code-analysis",
"@vaticle_dependencies//tool/release/notes:create",
"@vaticle_dependencies//tool/release/notes:validate",
"@vaticle_dependencies//tool/sync:dependencies",
],
)
78 changes: 73 additions & 5 deletions RELEASE_NOTES_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,87 @@
## Distribution

Download from TypeDB Package Repository: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-console+version:2.26.6-rc1

## New Features

## New Features
- **Allow unicode TypeQL variables**

We update to the latest TypeQL, which supports unicode variables. This means TypeDB Console can now use unicode variables, as well as labels and string attribute values.

For example, we can use Mandarin character sets:

```
test::schema::write> define 人 sub entity;
Concepts have been defined
test::schema::write*> commit
Transaction changes committed
> transaction test data write
test::data::write> insert $人 isa 人;
{ $人 iid 0x826e80017fffffffffffffff isa 人; }
answers: 1, total duration: 102 ms
test::data::write*> commit
Transaction changes committed
> transaction test data read
test::data::read> match $人 isa 人; get;
{ $人 iid 0x826e80018000000000000000 isa 人; }
answers: 1, total duration: 54 ms
```




## Bugs Fixed


## Code Refactors
- **Reconfigure CircleCI executors to use GLIBC 2.26**
- **Use typedb-common from typeql/common, only deploy to CloudSmith**

We update Bazel dependencies and target paths following the merging of typedb-common into [vaticle/typeql](https://github.com/vaticle/typeql/) (see https://github.com/vaticle/typeql/pull/313).

We compile and release TypeDB Console using an older version of Linux, which requires GLIBC 2.26 instead of GLIBC 2.27. This change switches the build platform to Amazon Linux 2 (via Docker), which is based on CentOS, instead of Ubuntu 18.04, which is based on Debian.
We also no longer upload build artifacts to the github releases page. Instead, the artifacts are available from our public cloudsmith repository, linked in the release notes.

Additionally, we upgrade the Windows Orb to 5.0.0, which also allowed using a larger executor to reduce CI time.

- **Bring in launch binary and console runner library from common**

We move the `binary` package and `console-runner` into this repository from typedb-common. `typedb-console-runner` is deployed to maven such that we can safely depend on it from other repos without creating Bazel dependency cycles.


## Other Improvements
- **Shorten diagnostic ID to 16 hex chars**
- **Explicitly install python tool dependencies**

Since the upgrade to rules-python v0.24 (https://github.com/vaticle/dependencies/pull/460), we are required to explicitly install python dependencies in the WORKSPACE file. The python tools happened to be unused, so these errors were not visible until the sync dependencies tool was restored.

- **Sync dependencies in CI**

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.

- **Only submit uncaught exceptions to diagnostics**

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

- **Make console runner use the same java installation as the calling process**
Makes TypeDB console runner use the same java installation as the calling process, so the system remain hermetic.

- **Fix CI file and disable Core diagnostics in test**

- **Migrate artifact hosting to cloudsmith**
Updates artifact credentials, and deployment & consumption rules to use cloudsmith (repo.typedb.com) instead of the self-hosted sonatype repository (repo.vaticle.com).

- **Remove typedb-console-runner's dependency on typedb-common**

We remove `typedb-console-runner`'s dependency on common in order to reduce deployment complexity and make the maven library self-contained.

- **Force hermitic JDK for builds**

- **Fix install-bazel-apt typo**


4 changes: 4 additions & 0 deletions RELEASE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
## Distribution

Download from TypeDB Package Repository: https://cloudsmith.io/~typedb/repos/public-release/packages/?q=name:^typedb-console+version:{version}

{ release notes }
7 changes: 3 additions & 4 deletions TypeDBConsole.java
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,12 @@ private static void configureAndVerifyJavaVersion() {
}
}

/**
* We initialise diagnostics in the default set-up which will only report uncaught exceptions.
*/
private static void configureDiagnostics(boolean diagnosticsDisabled) {
Sentry.init(options -> {
options.setDsn(DIAGNOSTICS_REPORTING_URI);
options.setEnableTracing(true);
options.setSendDefaultPii(false);
options.setRelease(releaseName());
if (!diagnosticsDisabled) options.setEnabled(true);
Expand Down Expand Up @@ -283,7 +285,6 @@ private void runREPLMode(CLIOptions options) {
}
} catch (TypeDBDriverException e) {
printer.error(e.getMessage());
Sentry.captureException(e);
} finally {
executorService.shutdownNow();
}
Expand Down Expand Up @@ -387,7 +388,6 @@ private boolean transactionREPL(TypeDBDriver driver, boolean isCloud, String dat
}
} catch (TypeDBDriverException e) {
printer.error(e.getMessage());
Sentry.captureException(e);
}
return false;
}
Expand Down Expand Up @@ -490,7 +490,6 @@ private boolean runInlineCommandMode(CLIOptions options, List<String> inlineComm
}
} catch (TypeDBDriverException e) {
printer.error(e.getMessage());
Sentry.captureException(e);
return false;
} finally {
executorService.shutdownNow();
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.26.5
2.26.6-rc1
Loading

0 comments on commit 32c1de6

Please sign in to comment.