Skip to content

Commit aba8073

Browse files
committed
Fix pyproject.toml: Add missing [dependency-groups] section
1 parent 0840e4a commit aba8073

3 files changed

Lines changed: 31 additions & 11 deletions

File tree

.github/workflows/pyatlan-chainguard.yaml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,31 @@ jobs:
113113
PLATFORMS="linux/amd64,linux/arm64"
114114
fi
115115
echo "PLATFORMS=$PLATFORMS" >> $GITHUB_ENV
116-
117-
# Generate commit hash for dev builds
116+
117+
# Generate commit hash for dev builds (for image tagging only)
118118
COMMIT_HASH=$(git rev-parse --short HEAD)
119119
echo "COMMIT_HASH=$COMMIT_HASH" >> $GITHUB_ENV
120-
120+
121+
# Set PYATLAN_COMMIT_SHA only if pyatlan_branch input is provided
122+
# Otherwise, leave empty to let Dockerfile use version tag
123+
if [ -n "${{ github.event.inputs.pyatlan_branch }}" ]; then
124+
echo "PYATLAN_COMMIT_SHA=${{ github.event.inputs.pyatlan_branch }}" >> $GITHUB_ENV
125+
else
126+
echo "PYATLAN_COMMIT_SHA=" >> $GITHUB_ENV
127+
fi
128+
121129
echo "Build parameters:"
122130
echo " - Trigger: ${{ github.event_name }}"
123131
echo " - Build Type: $BUILD_TYPE"
124132
echo " - Python Version: $PYTHON_VERSION"
125-
echo " - Pyatlan Version: $PYATLAN_VERSION (from git tag v${PYATLAN_VERSION})"
133+
if [ -n "${{ github.event.inputs.pyatlan_branch }}" ]; then
134+
echo " - Pyatlan Source: git commit/branch ${{ github.event.inputs.pyatlan_branch }}"
135+
else
136+
echo " - Pyatlan Source: git tag v${PYATLAN_VERSION}"
137+
fi
126138
echo " - Build Method: Multi-stage build from GitHub source"
127139
echo " - Platforms: $PLATFORMS"
128-
echo " - Commit Hash: $COMMIT_HASH"
140+
echo " - Image Tag Suffix: $COMMIT_HASH"
129141
130142
- name: Generate image tags
131143
id: generate-tags
@@ -159,7 +171,7 @@ jobs:
159171
build-args: |
160172
PYTHON_VERSION=${{ env.PYTHON_VERSION }}
161173
PYATLAN_VERSION=${{ env.PYATLAN_VERSION }}
162-
PYATLAN_COMMIT_SHA=${{ env.COMMIT_HASH }}
174+
PYATLAN_COMMIT_SHA=${{ env.PYATLAN_COMMIT_SHA }}
163175
cache-from: type=gha
164176
cache-to: type=gha,mode=max
165177

@@ -173,11 +185,15 @@ jobs:
173185
echo "- **Build Type:** ${{ env.BUILD_TYPE }}" >> $GITHUB_STEP_SUMMARY
174186
echo "- **Build Method:** Multi-stage from GitHub source (no PyPI)" >> $GITHUB_STEP_SUMMARY
175187
echo "- **Python Version:** ${{ env.PYTHON_VERSION }}" >> $GITHUB_STEP_SUMMARY
176-
echo "- **Pyatlan Version:** ${{ env.PYATLAN_VERSION }} (git tag v${{ env.PYATLAN_VERSION }})" >> $GITHUB_STEP_SUMMARY
188+
if [ -n "${{ env.PYATLAN_COMMIT_SHA }}" ]; then
189+
echo "- **Pyatlan Source:** Git commit/branch ${{ env.PYATLAN_COMMIT_SHA }}" >> $GITHUB_STEP_SUMMARY
190+
else
191+
echo "- **Pyatlan Source:** Git tag v${{ env.PYATLAN_VERSION }}" >> $GITHUB_STEP_SUMMARY
192+
fi
177193
echo "- **Dependencies:** Hardened from Chainguard APK + minimal pip" >> $GITHUB_STEP_SUMMARY
178194
echo "- **Platforms:** ${{ env.PLATFORMS }}" >> $GITHUB_STEP_SUMMARY
179195
if [ "${{ env.BUILD_TYPE }}" = "dev" ]; then
180-
echo "- **Commit Hash:** ${{ env.COMMIT_HASH }}" >> $GITHUB_STEP_SUMMARY
196+
echo "- **Image Tag Suffix:** ${{ env.COMMIT_HASH }}" >> $GITHUB_STEP_SUMMARY
181197
fi
182198
echo "" >> $GITHUB_STEP_SUMMARY
183199
echo "### Available Tag:" >> $GITHUB_STEP_SUMMARY

Dockerfile.chainguard

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,13 @@ RUN cd /tmp/build/atlan-python && \
3434
echo "Version: $(cat pyatlan/version.txt)" && \
3535
# Build wheel in builder stage (smaller than copying full source)
3636
python3 -m build --wheel --outdir /tmp/wheels . && \
37-
# Remove everything except the wheel
37+
# Preserve version.txt before removing source
38+
cp pyatlan/version.txt /tmp/version.txt && \
39+
# Remove everything except the wheel and version.txt
3840
cd /tmp && \
3941
rm -rf /tmp/build/atlan-python && \
40-
echo "Built wheel: $(ls -lh /tmp/wheels/*.whl)"
42+
echo "Built wheel: $(ls -lh /tmp/wheels/*.whl)" && \
43+
echo "Preserved version: $(cat /tmp/version.txt)"
4144

4245
# ============================================
4346
# Stage 2: Final - Runtime image
@@ -49,7 +52,7 @@ ARG PYTHON_VERSION=3.11
4952
ARG PYATLAN_COMMIT_SHA=""
5053

5154
# Copy version.txt from builder and set PYATLAN_VERSION if not provided
52-
COPY --from=builder /tmp/build/atlan-python/pyatlan/version.txt /tmp/version.txt
55+
COPY --from=builder /tmp/version.txt /tmp/version.txt
5356
ARG PYATLAN_VERSION
5457
RUN if [ -z "$PYATLAN_VERSION" ]; then \
5558
PYATLAN_VERSION=$(cat /tmp/version.txt | tr -d '\n\r'); \

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Repository = "https://github.com/atlanhq/atlan-python"
4646
Documentation = "https://github.com/atlanhq/atlan-python"
4747
Issues = "https://github.com/atlanhq/atlan-python/issues"
4848

49+
[dependency-groups]
4950
dev = [
5051
"mypy~=1.18.0",
5152
"ruff~=0.14.5",

0 commit comments

Comments
 (0)