Skip to content

Commit a532c90

Browse files
committed
[release] Bumped to release 8.0.1
- Updated wolfi image build workflow to trigger on sdk release events
1 parent b77e9ce commit a532c90

4 files changed

Lines changed: 112 additions & 23 deletions

File tree

.github/workflows/pyatlan-wolfi-base.yaml

Lines changed: 68 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ on:
2626
description: 'Pyatlan version (leave empty to use version.txt ie: latest)'
2727
required: false
2828
type: string
29+
pyatlan_branch:
30+
description: 'Pyatlan git branch (overrides version - installs from git://github.com/atlanhq/atlan-python.git@branch)'
31+
required: false
32+
type: string
33+
release:
34+
types: [published]
2935

3036
permissions:
3137
contents: read
@@ -54,26 +60,54 @@ jobs:
5460
- name: Set build parameters
5561
id: set-params
5662
run: |
57-
# Set Python version (default to 3.13 if empty)
58-
if [ -z "${{ github.event.inputs.python_version }}" ]; then
63+
# Check if triggered by release or manual dispatch
64+
if [ "${{ github.event_name }}" = "release" ]; then
65+
# Release trigger: use latest Python and SDK version, release build type
66+
BUILD_TYPE="release"
5967
PYTHON_VERSION="3.13"
60-
else
61-
PYTHON_VERSION="${{ github.event.inputs.python_version }}"
62-
fi
63-
echo "PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_ENV
64-
65-
# Set Pyatlan version (default to version.txt if empty)
66-
if [ -z "${{ github.event.inputs.pyatlan_version }}" ]; then
6768
PYATLAN_VERSION=$(cat pyatlan/version.txt)
68-
echo "Using pyatlan version from version.txt: $PYATLAN_VERSION"
69+
PYATLAN_BRANCH=""
70+
INSTALL_FROM_GIT="false"
71+
echo "Release trigger detected - using latest versions"
6972
else
70-
PYATLAN_VERSION="${{ github.event.inputs.pyatlan_version }}"
71-
echo "Using specified pyatlan version: $PYATLAN_VERSION"
73+
# Manual dispatch: use provided inputs with defaults
74+
BUILD_TYPE="${{ github.event.inputs.build_type }}"
75+
76+
# Set Python version (default to 3.13 if empty)
77+
if [ -z "${{ github.event.inputs.python_version }}" ]; then
78+
PYTHON_VERSION="3.13"
79+
else
80+
PYTHON_VERSION="${{ github.event.inputs.python_version }}"
81+
fi
82+
83+
# Check if branch is provided (overrides version)
84+
if [ -n "${{ github.event.inputs.pyatlan_branch }}" ]; then
85+
PYATLAN_BRANCH="${{ github.event.inputs.pyatlan_branch }}"
86+
PYATLAN_VERSION="branch-${PYATLAN_BRANCH}"
87+
INSTALL_FROM_GIT="true"
88+
echo "Using pyatlan branch: $PYATLAN_BRANCH"
89+
else
90+
# Set Pyatlan version (default to version.txt if empty)
91+
if [ -z "${{ github.event.inputs.pyatlan_version }}" ]; then
92+
PYATLAN_VERSION=$(cat pyatlan/version.txt)
93+
echo "Using pyatlan version from version.txt: $PYATLAN_VERSION"
94+
else
95+
PYATLAN_VERSION="${{ github.event.inputs.pyatlan_version }}"
96+
echo "Using specified pyatlan version: $PYATLAN_VERSION"
97+
fi
98+
PYATLAN_BRANCH=""
99+
INSTALL_FROM_GIT="false"
100+
fi
72101
fi
102+
103+
echo "BUILD_TYPE=$BUILD_TYPE" >> $GITHUB_ENV
104+
echo "PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_ENV
73105
echo "PYATLAN_VERSION=$PYATLAN_VERSION" >> $GITHUB_ENV
106+
echo "PYATLAN_BRANCH=$PYATLAN_BRANCH" >> $GITHUB_ENV
107+
echo "INSTALL_FROM_GIT=$INSTALL_FROM_GIT" >> $GITHUB_ENV
74108
75109
# Set platforms based on build type
76-
if [ "${{ github.event.inputs.build_type }}" = "dev" ]; then
110+
if [ "$BUILD_TYPE" = "dev" ]; then
77111
PLATFORMS="linux/amd64"
78112
else
79113
PLATFORMS="linux/amd64,linux/arm64"
@@ -85,16 +119,23 @@ jobs:
85119
echo "COMMIT_HASH=$COMMIT_HASH" >> $GITHUB_ENV
86120
87121
echo "Build parameters:"
88-
echo " - Build Type: ${{ github.event.inputs.build_type }}"
122+
echo " - Trigger: ${{ github.event_name }}"
123+
echo " - Build Type: $BUILD_TYPE"
89124
echo " - Python Version: $PYTHON_VERSION"
90125
echo " - Pyatlan Version: $PYATLAN_VERSION"
126+
if [ "$INSTALL_FROM_GIT" = "true" ]; then
127+
echo " - Pyatlan Branch: $PYATLAN_BRANCH"
128+
echo " - Install Method: Git (development build)"
129+
else
130+
echo " - Install Method: PyPI (stable release)"
131+
fi
91132
echo " - Platforms: $PLATFORMS"
92133
echo " - Commit Hash: $COMMIT_HASH"
93134
94135
- name: Generate image tags
95136
id: generate-tags
96137
run: |
97-
BUILD_TYPE="${{ github.event.inputs.build_type }}"
138+
BUILD_TYPE="${{ env.BUILD_TYPE }}"
98139
PYTHON_VERSION="${{ env.PYTHON_VERSION }}"
99140
PYATLAN_VERSION="${{ env.PYATLAN_VERSION }}"
100141
COMMIT_HASH="${{ env.COMMIT_HASH }}"
@@ -112,7 +153,7 @@ jobs:
112153
echo "Generated image tag: ghcr.io/atlanhq/pyatlan-wolfi-base:$IMAGE_TAG"
113154
114155
- name: Wait for PyPI availability
115-
if: github.event.inputs.pyatlan_version != ''
156+
if: env.INSTALL_FROM_GIT == 'false' && (github.event.inputs.pyatlan_version != '' || github.event_name == 'release')
116157
uses: nick-fields/retry@v3
117158
with:
118159
max_attempts: 5
@@ -139,6 +180,8 @@ jobs:
139180
build-args: |
140181
PYTHON_VERSION=${{ env.PYTHON_VERSION }}
141182
PYATLAN_VERSION=${{ env.PYATLAN_VERSION }}
183+
PYATLAN_BRANCH=${{ env.PYATLAN_BRANCH }}
184+
INSTALL_FROM_GIT=${{ env.INSTALL_FROM_GIT }}
142185
cache-from: type=gha
143186
cache-to: type=gha,mode=max
144187

@@ -148,11 +191,18 @@ jobs:
148191
echo "" >> $GITHUB_STEP_SUMMARY
149192
echo "### Image Details:" >> $GITHUB_STEP_SUMMARY
150193
echo "- **Base Image:** Wolfi" >> $GITHUB_STEP_SUMMARY
151-
echo "- **Build Type:** ${{ github.event.inputs.build_type }}" >> $GITHUB_STEP_SUMMARY
194+
echo "- **Trigger:** ${{ github.event_name }}" >> $GITHUB_STEP_SUMMARY
195+
echo "- **Build Type:** ${{ env.BUILD_TYPE }}" >> $GITHUB_STEP_SUMMARY
152196
echo "- **Python Version:** ${{ env.PYTHON_VERSION }}" >> $GITHUB_STEP_SUMMARY
153197
echo "- **Pyatlan Version:** ${{ env.PYATLAN_VERSION }}" >> $GITHUB_STEP_SUMMARY
198+
if [ "${{ env.INSTALL_FROM_GIT }}" = "true" ]; then
199+
echo "- **Pyatlan Branch:** ${{ env.PYATLAN_BRANCH }}" >> $GITHUB_STEP_SUMMARY
200+
echo "- **Install Method:** Git (development build)" >> $GITHUB_STEP_SUMMARY
201+
else
202+
echo "- **Install Method:** PyPI (stable release)" >> $GITHUB_STEP_SUMMARY
203+
fi
154204
echo "- **Platforms:** ${{ env.PLATFORMS }}" >> $GITHUB_STEP_SUMMARY
155-
if [ "${{ github.event.inputs.build_type }}" = "dev" ]; then
205+
if [ "${{ env.BUILD_TYPE }}" = "dev" ]; then
156206
echo "- **Commit Hash:** ${{ env.COMMIT_HASH }}" >> $GITHUB_STEP_SUMMARY
157207
fi
158208
echo "" >> $GITHUB_STEP_SUMMARY

Dockerfile.wolfi

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,41 @@ FROM cgr.dev/chainguard/wolfi-base
33
# Build arguments for configurable versions
44
ARG PYTHON_VERSION=3.11
55
ARG PYATLAN_VERSION=latest
6+
ARG PYATLAN_BRANCH=""
7+
ARG INSTALL_FROM_GIT=false
68

79
WORKDIR /app
810

9-
# Install Python
10-
RUN apk add python-${PYTHON_VERSION} && \
11+
# Install Python and git (needed for git-based installations)
12+
RUN apk add python-${PYTHON_VERSION} git && \
1113
chown -R nonroot:nonroot /app/
1214

1315
# Install uv
1416
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
1517

16-
# Install pyatlan from PyPI using uv pip install (as root for --system)
18+
# Install pyatlan - either from PyPI or git branch
1719
RUN --mount=type=cache,target=/root/.cache/uv \
18-
if [ "$PYATLAN_VERSION" = "latest" ]; then \
20+
if [ "$INSTALL_FROM_GIT" = "true" ]; then \
21+
echo "Installing pyatlan from git branch: $PYATLAN_BRANCH"; \
22+
uv pip install --system "git+https://github.com/atlanhq/atlan-python.git@$PYATLAN_BRANCH"; \
23+
elif [ "$PYATLAN_VERSION" = "latest" ]; then \
24+
echo "Installing latest pyatlan from PyPI"; \
1925
uv pip install --system pyatlan; \
2026
else \
27+
echo "Installing pyatlan==$PYATLAN_VERSION from PyPI"; \
2128
uv pip install --system pyatlan==$PYATLAN_VERSION; \
2229
fi
2330

31+
# Add build information as labels
32+
RUN if [ "$INSTALL_FROM_GIT" = "true" ]; then \
33+
echo "LABEL pyatlan.source=git" >> /tmp/labels && \
34+
echo "LABEL pyatlan.branch=$PYATLAN_BRANCH" >> /tmp/labels; \
35+
else \
36+
echo "LABEL pyatlan.source=pypi" >> /tmp/labels && \
37+
echo "LABEL pyatlan.version=$PYATLAN_VERSION" >> /tmp/labels; \
38+
fi && \
39+
echo "LABEL python.version=$PYTHON_VERSION" >> /tmp/labels
40+
2441
USER nonroot
2542

2643
# Set environment variables

HISTORY.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
## 8.0.1 (August 25, 2025)
2+
3+
### New Features
4+
5+
- Added `get_client_async()` for initializing `AsyncAtlanClient` when using packages.
6+
- Added optional parameter `set_pkg_headers()` to set package headers on the client (defaults to `False`).
7+
8+
### Bug Fixes
9+
10+
- Fixed `httpcore.LocalProtocolError` exception in `get_client()` that occurred when `ATLAN_API_KEY` environment variable was not configured (commonly encountered during package impersonation with empty `API` key strings).
11+
12+
### QOL Improvements
13+
14+
- Added `pyatlan-wolfi-base` Docker image workflow with enhanced capabilities:
15+
- **Automatic release builds**: Workflow now triggers automatically on GitHub releases using latest Python (3.13) and SDK versions
16+
- **Git branch support**: Added ability to install SDK from any git branch for development/testing purposes via `pyatlan_branch` parameter
17+
- **Smart installation logic**: Automatically chooses between PyPI (stable) or git (development) installation methods
18+
- **Enhanced tagging**: Branch builds tagged as `branch-{branchname}-{python}-{commit}` for easy identification
19+
- **Build metadata**: Images include labels tracking installation source, version/branch, and Python version
20+
- **Conditional PyPI checks**: Skips PyPI availability checks when installing from git branches
21+
- **Improved logging**: Shows installation method, branch info, and trigger source in build outputs
22+
123
## 8.0.0 (August 20, 2025)
224

325
### New Features

pyatlan/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.0.0
1+
8.0.1

0 commit comments

Comments
 (0)