Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ resolver = "2"

[workspace.package]
authors = ["Apache Sedona <[email protected]>"]
description = "A benchmark for assessing geospatial SQL analytics query performance across database systems"
edition = "2021"
homepage = "https://github.com/apache/sedona-spatialbench/"
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/apache/sedona-spatialbench/"
version = "1.1.1"
version = "0.1.0"

[workspace.dependencies]
geo = "0.31.0"
Expand Down
175 changes: 119 additions & 56 deletions dev/release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,46 @@

## Verifying a release candidate

Release candidates are verified using the script `verify-release-candidate.sh <version> <rc_num>`.
For example, to verify SpatialBench 0.1.0 RC1, run:
### Testing locally (before creating a release candidate)

Before creating a release candidate, you should test your local checkout:

```shell
# git clone https://github.com/apache/sedona-spatialbench.git && cd sedona-spatialbench
# or
# cd existing/sedona-spatialbench && git fetch upstream && git switch main && git pull upstream main
dev/release/verify-release-candidate.sh
```

This will run all verification tests on your local checkout without requiring any release artifacts.

### Testing a local tarball

To create a local tarball for testing:

```shell
VERSION="0.1.0" && git archive HEAD --prefix=apache-sedona-spatialbench-${VERSION}/ | gzip > apache-sedona-spatialbench-${VERSION}-src.tar.gz
dev/release/verify-release-candidate.sh apache-sedona-spatialbench-${VERSION}-src.tar.gz
```

### Verifying an official release candidate

Once a release candidate has been uploaded to Apache dist, verify it using:

```shell
dev/release/verify-release-candidate.sh 0.1.0 1
```

Release verification requires a recent Rust toolchain. This toolchain can be installed
by following instructions from <https://rustup.rs/>.
This will download the release candidate from `https://dist.apache.org/repos/dist/dev/sedona/` and verify it.

Release verification requires:
- A recent Rust toolchain (can be installed from <https://rustup.rs/>)
- Java (for Apache RAT license checking)
- Python (for RAT report filtering)

The verification script will:
1. Run Apache RAT to check all files have proper license headers
2. Build and test all Rust crates in the workspace

When verifying via Docker or on a smaller machine it may be necessary to limit the
number of parallel jobs to avoid running out of memory:
Expand All @@ -53,72 +81,71 @@ git branch -b branch-0.1.0
git push upstream -u branch-0.1.0:branch-0.1.0
```

Before creating a tag, download the tarball from the latest packaging run and
check it locally:

```shell
dev/release/verify-release-candidate.sh path/to/tarball.tar.gz
```

When the state of the `branch-x.x.x` branch is clean and checks are complete,
the release candidate tag can be created:

```shell
git tag -a sedona-spatialbench-0.1.0-rc1 -m "Tag Apache SpatialBench 0.1.0-rc1"
git tag -a sedona-spatialbench-0.1.0-rc1 -m "Tag Apache Sedona SpatialBench 0.1.0-rc1"
git push upstream sedona-spatialbench-0.1.0-rc1
```

This will trigger another packaging CI run that, if successful, will create a
pre-release at <https://github.com/apache/sedona-spatialbench/releases> with the release
artifacts uploaded from the CI run.

After the release has been created with the appropriate artifacts, the assets
need to be signed with signatures uploaded as release assets. Please create
dev/release/.env from dev/release/.env.example and set the GPG_KEY_ID variable.
The GPG_KEY_ID in dev/release/.env must have its public component listed in the
[Apache Sedona KEYS file](https://dist.apache.org/repos/dist/dev/sedona/KEYS).
### Signing Commands

```shell
# sign-assets.sh <version> <rc_number>
dev/release/sign-assets.sh 0.1.0 1
```
Now the assets need to be signed with signatures.

After the assets are signed, they can be committed and uploaded to the
dev/sedona directory of the Apache distribution SVN. A helper script
is provided:
**GPG Signing:**

```shell
# upload-candidate.sh <version> <rc_number>
APACHE_USERNAME=your_apache_username dev/release/upload-candidate.sh 0.1.0 1
# Sign a file (creates .asc file automatically)
gpg -ab apache-sedona-spatialbench-${SEDONA_VERSION}-src.tar.gz

# Verify a signature
gpg --verify apache-sedona-spatialbench-${SEDONA_VERSION}-src.tar.gz.asc apache-sedona-spatialbench-${SEDONA_VERSION}-src.tar.gz
```

## Vote
**SHA512 Checksum:**

An email must now be sent to `[email protected]` calling on developers to follow
the release verification instructions and vote appropriately on the source release.
```shell
# Generate SHA512 checksum
shasum -a 512 apache-sedona-spatialbench-${SEDONA_VERSION}-src.tar.gz > apache-sedona-spatialbench-${SEDONA_VERSION}-src.tar.gz.sha512

## Publish
# Verify a checksum
shasum -a 512 --check apache-sedona-spatialbench-${SEDONA_VERSION}-src.tar.gz.sha512
```

### Upload/tag source release
**Upload to Apache SVN:**

After a successful release vote, the tarball needs to be uploaded to the official
Apache release repository. A helper script is provided:
After the assets are signed, they can be committed and uploaded to the
dev/sedona directory of the Apache distribution SVN:

```shell
# upload-release.sh <version> <rc_number>
APACHE_USERNAME=your_apache_username dev/release/upload-release.sh 0.1.0 1
# Set version and RC number variables
SEDONA_VERSION="0.1.0"
RC_NUMBER="1"

# Create the directory in SVN
svn mkdir -m "Adding folder" https://dist.apache.org/repos/dist/dev/sedona/sedona-spatialbench-${SEDONA_VERSION}-rc${RC_NUMBER}

# Checkout the directory
svn co https://dist.apache.org/repos/dist/dev/sedona/sedona-spatialbench-${SEDONA_VERSION}-rc${RC_NUMBER} tmp

# Copy files to the checked out directory
cp apache-sedona-spatialbench-${SEDONA_VERSION}-src.tar.gz tmp/
cp apache-sedona-spatialbench-${SEDONA_VERSION}-src.tar.gz.asc tmp/
cp apache-sedona-spatialbench-${SEDONA_VERSION}-src.tar.gz.sha512 tmp/

# Add and commit the files
cd tmp
svn add apache-sedona-spatialbench-${SEDONA_VERSION}-src.tar.gz*
svn ci -m "Apache SpatialBench ${SEDONA_VERSION} RC${RC_NUMBER}"
cd ..
rm -rf tmp
```

An official GitHub tag must also be created:

```shell
git tag -a sedona-spatialbench-0.1.0 -m "SpatialBench 0.1.0" sedona-spatialbench-0.1.0-rc1
git push upstream sedona-spatialbench-0.1.0
```
## Vote

The prerelease located at <https://github.com/apache/sedona-spatialbench/releases/tag/sedona-spatialbench-0.1.0-rc1>
can now be edited to point to the official release tag and the GitHub release published
from the UI.
An email must now be sent to `[email protected]` calling on developers to follow
the release verification instructions and vote appropriately on the source release.

## Bump versions

Expand All @@ -130,13 +157,49 @@ are currently all derived from `Cargo.toml`, which can be updated to:
version = "0.2.0"
```

Development versions and the changelog are derived from the presence of a development
tag on the main branch signifying where development of that version "started". After
the version bump PR merges, that commit should be tagged with the appropriate
development tag:
## Publishing to crates.io

```shell
git tag -a sedona-spatialbench-0.2.0.dev -m "tag dev 0.2.0"
git push upstream sedona-spatialbench-0.2.0.dev
```
After a successful Apache release, the Rust crates can be published to [crates.io](https://crates.io).

### Prerequisites

1. **crates.io account**: Create an account at <https://crates.io> if you don't have one
2. **API token**: Generate an API token from <https://crates.io/me>
3. **Login to cargo**: Authenticate cargo with your API token:
```shell
cargo login <your-api-token>
```
4. **Verify ownership**: Ensure you have owner permissions for the crates on crates.io. If this is the first publish, you'll automatically become an owner.

### Pre-publish checks

Before publishing, verify that:

1. All tests pass:
```shell
cargo test --workspace
```

2. The workspace builds successfully:
```shell
cargo build --workspace --release
```

3. Check for any issues with `dry run`:
```shell
cargo publish --dry-run
```

### Publishing order

The crates will be published in dependency order. The correct order is:

1. `spatialbench` (no workspace dependencies)
2. `spatialbench-arrow` (depends on `spatialbench`)
3. `spatialbench-cli` (depends on both `spatialbench` and `spatialbench-arrow`)

To publish, run this command:

```shell
cargo publish
```
21 changes: 18 additions & 3 deletions dev/release/rat_exclude_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,22 @@ Cargo.lock
site/**
docs-overrides/**
raster/output/**
spatialbench/data/sf-v1/*.tbl.gz
spatialbench/data/sf-v1/*.parquet
spatialbench/data/**
dev/release/rat_exclude_files.txt

.gitignore
.gitkeep
filtered_rat.txt
rat.txt
docs/requirements.txt
docs/javascripts/katex.js
docs/stylesheets/extra.css
target/**
ARCHITECTURE.md
Cargo.toml
README.md
spatialbench-config.yml
docs/queries.md
spatialbench-cli/CONFIGURATION.md
spatialbench-cli/Cargo.toml
spatialbench-cli/README.md
spatialbench-cli/pyproject.toml
17 changes: 10 additions & 7 deletions dev/release/run-rat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,21 @@
# under the License.

RAT_VERSION=0.13
RELEASE_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd)
RAT_JAR="${RELEASE_DIR}/apache-rat-${RAT_VERSION}.jar"

# download apache rat
if [ ! -f apache-rat-${RAT_VERSION}.jar ]; then
curl -s https://repo1.maven.org/maven2/org/apache/rat/apache-rat/${RAT_VERSION}/apache-rat-${RAT_VERSION}.jar > apache-rat-${RAT_VERSION}.jar
if [ ! -f "${RAT_JAR}" ]; then
curl -s https://repo1.maven.org/maven2/org/apache/rat/apache-rat/${RAT_VERSION}/apache-rat-${RAT_VERSION}.jar > "${RAT_JAR}"
fi

RAT="java -jar apache-rat-${RAT_VERSION}.jar -x "

RELEASE_DIR=$(cd "$(dirname "$BASH_SOURCE")"; pwd)
RAT="java -jar ${RAT_JAR} -x "

# generate the rat report
$RAT $1 > rat.txt
python $RELEASE_DIR/check-rat-report.py $RELEASE_DIR/rat_exclude_files.txt rat.txt > filtered_rat.txt
# Run RAT from inside the target directory so it produces relative paths
cd "$1"
$RAT . > rat.txt
python3 $RELEASE_DIR/check-rat-report.py $RELEASE_DIR/rat_exclude_files.txt rat.txt > filtered_rat.txt
cat filtered_rat.txt
UNAPPROVED=`cat filtered_rat.txt | grep "NOT APPROVED" | wc -l`

Expand All @@ -41,3 +43,4 @@ else
exit 1
fi


Loading