Skip to content

Commit a1c58d9

Browse files
committed
Introduce uv
1 parent 8e4bd49 commit a1c58d9

File tree

3 files changed

+3446
-13
lines changed

3 files changed

+3446
-13
lines changed

README.md

Lines changed: 56 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@ A command-line tool for automating Redis OSS releases across multiple package re
44

55
## Installation
66

7-
### From Source
7+
### Using uv
88

99
```bash
1010
git clone https://github.com/redis/redis-oss-release-automation.git
1111
cd redis-oss-release-automation
12-
pip install -e .
12+
uv sync
1313
```
1414

15+
After `uv sync`, you can run the tool in two ways:
16+
- **With `uv run`**: `uv run redis-release <command>`
17+
- **Activate virtual environment**: `. .venv/bin/activate` then `redis-release <command>`
18+
1519
## Prerequisites
1620

1721
1. **GitHub Token**: Personal access token with workflow permissions
@@ -24,20 +28,38 @@ pip install -e .
2428
export GITHUB_TOKEN="ghp_xxxxxxxxxxxx"
2529
export AWS_ACCESS_KEY_ID="your-access-key-id"
2630
export AWS_SECRET_ACCESS_KEY="your-secret-access-key"
27-
export AWS_SESSION_TOKEN="your-session-token"
31+
export AWS_SESSION_TOKEN="your-session-token"
2832
export REDIS_RELEASE_STATE_BUCKET="redis-release-state"
2933
```
3034

35+
### AWS SSO Login
36+
37+
In AWS, you can also use `aws sso login` prior to running the tool to authenticate.
38+
3139
## Usage
3240

3341
### Basic Release
3442

43+
By default, `config.yaml` is used. You can specify a different config file with `--config`:
44+
3545
```bash
36-
# Start a new release
46+
# Start a new release (uses config.yaml by default)
3747
redis-release release 8.2.0
3848

39-
# Force rebuild packages
40-
redis-release release 8.2.0 --force-rebuild
49+
# Use custom config file
50+
redis-release release 8.2.0 --config custom-config.yaml
51+
52+
# Force rebuild all packages (WARNING: This will delete all existing state!)
53+
redis-release release 8.2.0 --force-rebuild all
54+
55+
# Force rebuild specific package
56+
redis-release release 8.2.0 --force-rebuild package-name
57+
58+
# Release only specific packages (can be used multiple times)
59+
redis-release release 8.2.0 --only-packages package1 --only-packages package2
60+
61+
# Force release type (changes release-type even for existing state)
62+
redis-release release 8.2.0 --force-release-type rc
4163
```
4264

4365
### Check Status
@@ -47,9 +69,34 @@ redis-release release 8.2.0 --force-rebuild
4769
redis-release status 8.2.0
4870
```
4971

50-
### Advanced Options
72+
## Troubleshooting
73+
74+
### Dangling Release Locks
75+
76+
If you encounter a dangling lock file, you can delete it from the S3 bucket:
5177

5278
```bash
53-
# Dry run mode (simulate without changes)
54-
redis-release release 8.2.0 --dry-run
79+
aws s3 rm s3://redis-release-state/release-locks/TAG.lock
5580
```
81+
82+
Replace `TAG` with the release tag (e.g., `8.2.0`).
83+
84+
## Diagrams
85+
86+
Generate release workflow diagrams using:
87+
88+
```bash
89+
# Generate full release diagram
90+
redis-release release-print
91+
92+
# Generate diagram with custom name (list available with --help)
93+
redis-release release-print --name NAME
94+
```
95+
96+
**Note**: Graphviz is required to generate diagrams.
97+
98+
## Configuration
99+
100+
The tool uses a YAML configuration file to define release packages and their settings. By default, `config.yaml` is used.
101+
102+
See `config.yaml` for an example configuration file.

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["hatchling"]
2+
requires = ["hatchling>=1.13"]
33
build-backend = "hatchling.build"
44

55
[project]
@@ -15,11 +15,11 @@ classifiers = [
1515
"Development Status :: 3 - Alpha",
1616
"Intended Audience :: Developers",
1717
"License :: OSI Approved :: MIT License",
18-
"Programming Language :: Python :: 3",
19-
"Programming Language :: Python :: 3.8",
18+
"Programming Language :: Python :: 3 :: Only",
2019
"Programming Language :: Python :: 3.9",
2120
"Programming Language :: Python :: 3.10",
2221
"Programming Language :: Python :: 3.11",
22+
"Programming Language :: Python :: 3.12",
2323
]
2424
dependencies = [
2525
"typer[all]>=0.9.0",
@@ -28,7 +28,8 @@ dependencies = [
2828
"boto3>=1.26.0",
2929
"rich>=13.0.0",
3030
"pydantic>=2.0.0",
31-
"py_trees>=2.2,<3.0"
31+
"py_trees>=2.2,<3.0",
32+
"pyyaml>=6.0.3",
3233
]
3334

3435
[project.optional-dependencies]

0 commit comments

Comments
 (0)