Skip to content

Commit 32d2cd1

Browse files
committed
release_1
1 parent b7fadf5 commit 32d2cd1

File tree

9 files changed

+1139
-0
lines changed

9 files changed

+1139
-0
lines changed

.github/workflows/rc.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Release Candidate
19+
20+
on:
21+
push:
22+
tags:
23+
- 'v*-rc*'
24+
25+
jobs:
26+
build-source-tarball:
27+
runs-on: ubuntu-latest
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
33+
- name: Extract version from tag
34+
id: extract_version
35+
run: |
36+
TAG_NAME=${GITHUB_REF#refs/tags/}
37+
echo "tag_name=${TAG_NAME}" >> $GITHUB_OUTPUT
38+
VERSION=$(echo ${TAG_NAME} | sed 's/^v//' | sed 's/-rc.*$//')
39+
RC=$(echo ${TAG_NAME} | sed 's/.*-rc//')
40+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
41+
echo "rc=${RC}" >> $GITHUB_OUTPUT
42+
echo "release_id=apache-iceberg-cpp-${VERSION}-rc${RC}" >> $GITHUB_OUTPUT
43+
44+
- name: Install dependencies
45+
run: |
46+
sudo apt-get update
47+
sudo apt-get install -y cmake build-essential
48+
49+
- name: Create source tarball
50+
run: |
51+
# Create archive with git
52+
git archive --format=tar.gz --output="${{ steps.extract_version.outputs.release_id }}.tar.gz" --prefix="${{ steps.extract_version.outputs.release_id }}/" HEAD
53+
54+
# Generate SHA512 checksum
55+
sha512sum "${{ steps.extract_version.outputs.release_id }}.tar.gz" > "${{ steps.extract_version.outputs.release_id }}.tar.gz.sha512"
56+
57+
# Verify the tarball can be extracted and built
58+
tar -xzf "${{ steps.extract_version.outputs.release_id }}.tar.gz"
59+
cd "${{ steps.extract_version.outputs.release_id }}"
60+
61+
# Basic build test
62+
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
63+
cmake --build build --parallel $(nproc)
64+
65+
- name: Run license check
66+
run: |
67+
# Extract the tarball if not already extracted
68+
if [ ! -d "${{ steps.extract_version.outputs.release_id }}" ]; then
69+
tar -xzf "${{ steps.extract_version.outputs.release_id }}.tar.gz"
70+
fi
71+
72+
cd "${{ steps.extract_version.outputs.release_id }}"
73+
dev/release/run_rat.sh .
74+
75+
- name: Create GitHub Release
76+
uses: softprops/action-gh-release@v1
77+
with:
78+
tag_name: ${{ steps.extract_version.outputs.tag_name }}
79+
name: Apache Iceberg C++ ${{ steps.extract_version.outputs.version }} RC${{ steps.extract_version.outputs.rc }}
80+
prerelease: true
81+
draft: false
82+
files: |
83+
${{ steps.extract_version.outputs.release_id }}.tar.gz
84+
${{ steps.extract_version.outputs.release_id }}.tar.gz.sha512
85+
env:
86+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87+
88+
- name: Upload artifacts
89+
uses: actions/upload-artifact@v4
90+
with:
91+
name: release-candidate-${{ steps.extract_version.outputs.version }}-rc${{ steps.extract_version.outputs.rc }}
92+
path: |
93+
${{ steps.extract_version.outputs.release_id }}.tar.gz
94+
${{ steps.extract_version.outputs.release_id }}.tar.gz.sha512
95+
retention-days: 30

dev/release/README.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<!---
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
Unless required by applicable law or agreed to in writing,
11+
software distributed under the License is distributed on an
12+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
13+
KIND, either express or implied. See the License for the
14+
specific language governing permissions and limitations
15+
under the License.
16+
-->
17+
18+
# Release
19+
20+
## Overview
21+
22+
1. Test the revision to be released
23+
2. Prepare RC and vote (detailed later)
24+
3. Publish (detailed later)
25+
26+
### Prepare RC and vote
27+
28+
Run `dev/release/release_rc.sh` on a working copy of
29+
`[email protected]:apache/iceberg-cpp` not from your fork:
30+
31+
```console
32+
$ git clone [email protected]:apache/iceberg-cpp.git
33+
$ dev/release/release_rc.sh ${VERSION} ${RC}
34+
(Send a vote email to [email protected].
35+
You can use a draft shown by release_rc.sh for the email.)
36+
```
37+
38+
Here is an example to release RC1:
39+
40+
```console
41+
$ GH_TOKEN=${YOUR_GITHUB_TOKEN} dev/release/release_rc.sh 0.1.0 1
42+
```
43+
44+
The arguments of `release_rc.sh` are the version and the RC number. If RC1 has a problem, we'll increment the RC number such as RC2, RC3 and so on.
45+
46+
Requirements to run `release_rc.sh`:
47+
48+
* You must be an Apache Iceberg committer or PMC member
49+
* You must prepare your PGP key for signing
50+
51+
If you don't have a PGP key, https://infra.apache.org/release-signing.html#generate
52+
may be helpful.
53+
54+
Your PGP key must be registered to the following:
55+
56+
* https://downloads.apache.org/iceberg/KEYS
57+
58+
See the header comment of them for how to add a PGP key.
59+
60+
Apache Iceberg committers can update them by Subversion client with their ASF account.
61+
e.g.:
62+
63+
```console
64+
$ svn co https://dist.apache.org/repos/dist/release/iceberg
65+
$ cd iceberg
66+
$ editor KEYS
67+
$ svn ci KEYS
68+
```
69+
70+
### Publish
71+
72+
We need to do the following to publish a new release:
73+
74+
* Publish to apache.org
75+
76+
Run `dev/release/release.sh` to publish to apache.org:
77+
78+
```console
79+
$ GH_TOKEN=${YOUR_GITHUB_TOKEN} dev/release/release.sh ${VERSION} ${RC}
80+
```
81+
82+
Add the release to ASF's report database via [Apache Committee Report Helper](https://reporter.apache.org/addrelease.html?iceberg)
83+
84+
### Verify
85+
86+
We have a script for verifying a RC.
87+
88+
You must install the following to run the script:
89+
90+
* `curl`
91+
* `gpg`
92+
* `shasum` or `sha512sum`
93+
* `tar`
94+
* `cmake` (3.25 or higher)
95+
* C++23 compliant compiler (GCC 13+ or Clang 16+)
96+
97+
To verify a RC, run the following:
98+
99+
```console
100+
$ dev/release/verify_rc.sh ${VERSION} ${RC}
101+
```
102+
103+
If the verification is successful, the message `RC looks good!` is shown.

dev/release/check_rat_report.py

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/usr/bin/env python3
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
import fnmatch
21+
import re
22+
import sys
23+
import xml.etree.ElementTree as ET
24+
25+
if len(sys.argv) != 3:
26+
sys.stderr.write("Usage: %s exclude_globs.lst rat_report.xml\n" %
27+
sys.argv[0])
28+
sys.exit(1)
29+
30+
exclude_globs_filename = sys.argv[1]
31+
xml_filename = sys.argv[2]
32+
33+
globs = [line.strip() for line in open(exclude_globs_filename, "r")]
34+
35+
tree = ET.parse(xml_filename)
36+
root = tree.getroot()
37+
resources = root.findall('resource')
38+
39+
all_ok = True
40+
for r in resources:
41+
approvals = r.findall('license-approval')
42+
if not approvals or approvals[0].attrib['name'] == 'true':
43+
continue
44+
clean_name = re.sub('^[^/]+/', '', r.attrib['name'])
45+
excluded = False
46+
for g in globs:
47+
if fnmatch.fnmatch(clean_name, g):
48+
excluded = True
49+
break
50+
if not excluded:
51+
sys.stdout.write("NOT APPROVED: %s (%s): %s\n" % (
52+
clean_name, r.attrib['name'], approvals[0].attrib['name']))
53+
all_ok = False
54+
55+
if not all_ok:
56+
sys.exit(1)
57+
58+
print('OK')
59+
sys.exit(0)

dev/release/rat_exclude_files.txt

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
.gitignore
19+
LICENSE
20+
NOTICE
21+
CLAUDE.md
22+
README.md
23+
CONTRIBUTING.md
24+
CHANGELOG.md
25+
build/
26+
dist/
27+
.github/
28+
.git/
29+
cmake_modules/
30+
.cmake/
31+
.clang-format
32+
.clang-tidy
33+
.pre-commit-config.yaml
34+
CMakeUserPresets.json
35+
test/resources/
36+
cmake-format.py
37+
*.avro
38+
*.json
39+
*.parquet

dev/release/release.sh

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
set -eu
21+
22+
for cmd in git gh svn; do
23+
if ! command -v ${cmd} &> /dev/null; then
24+
echo "This script requires '${cmd}' but it's not installed. Aborting."
25+
exit 1
26+
fi
27+
done
28+
29+
if [ "$#" -ne 2 ]; then
30+
echo "Usage: $0 <version> <rc>"
31+
echo " e.g.: $0 0.1.0 1"
32+
exit 1
33+
fi
34+
35+
version=$1
36+
rc=$2
37+
38+
git_origin_url="$(git remote get-url origin)"
39+
repository="${git_origin_url#*github.com?}"
40+
repository="${repository%.git}"
41+
if [ "${git_origin_url}" != "[email protected]:apache/iceberg-cpp.git" ]; then
42+
echo "This script must be ran with a working copy of apache/iceberg-cpp."
43+
echo "The origin's URL: ${git_origin_url}"
44+
exit 1
45+
fi
46+
47+
tag="v${version}"
48+
rc_tag="${tag}-rc${rc}"
49+
echo "Tagging for release: ${tag}"
50+
git tag "${tag}" "${rc_tag}^{}" -m "Release ${tag}"
51+
git push origin "${tag}"
52+
53+
release_id="apache-iceberg-cpp-${version}"
54+
dist_url="https://dist.apache.org/repos/dist/release/iceberg"
55+
dist_dev_url="https://dist.apache.org/repos/dist/dev/iceberg"
56+
57+
svn \
58+
mv "${dist_dev_url}/${release_id}-rc${rc}/" \
59+
"${dist_url}/${release_id}" \
60+
-m "Apache Iceberg C++ ${version}"
61+
62+
svn co "${dist_url}/${release_id}"
63+
pushd "${release_id}"
64+
gh release create "${tag}" \
65+
--title "Apache Iceberg C++ ${version}" \
66+
--generate-notes \
67+
--verify-tag \
68+
${release_id}.tar.gz \
69+
${release_id}.tar.gz.asc \
70+
${release_id}.tar.gz.sha512
71+
popd
72+
73+
rm -rf "${release_id}"
74+
75+
echo "Keep only the latest versions"
76+
old_releases=$(
77+
svn ls "${dist_url}" |
78+
grep -E '^apache-iceberg-cpp-' |
79+
sort --version-sort --reverse |
80+
tail -n +2
81+
)
82+
for old_release_version in ${old_releases}; do
83+
echo "Remove old release ${old_release_version}"
84+
svn \
85+
delete \
86+
-m "Remove old Apache Iceberg C++ release: ${old_release_version}" \
87+
"https://dist.apache.org/repos/dist/release/iceberg/${old_release_version}"
88+
done
89+
90+
echo "Success! The release is available here:"
91+
echo " https://dist.apache.org/repos/dist/release/iceberg/${release_id}"
92+
echo
93+
echo "Add this release to ASF's report database:"
94+
echo " https://reporter.apache.org/addrelease.html?iceberg"

0 commit comments

Comments
 (0)