Skip to content

Commit 227c8b6

Browse files
patch: CI - bump mongo single kernel workflow - wait for poetry to find the newly released lib version (#236)
<!-- Provide a general summary of your changes in the Title above --> <!-- markdownlint-disable MD041 --> ## 🏷️ Type of changes <!--- What types of changes does your code introduce? --> <!--- Put an `x` in all the boxes that apply: --> - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [x] Tooling and CI - [ ] Dependencies upgrade or change - [ ] Chores / refactoring ## 📝 Description <!-- Describe your changes in detail including: - the purpose and feature scope of this PR (what) - the motivation behind this change (why) - the impacted components (often matches conventional commit scope) - explanation/algorithm if required (how) --> Even if the we cant fetch the library from PYPI, poetry does not seem up-to-date inmmediately We try polling poetry until it finds it: interval: 1 minute timeout: 30 minutes Test using workflow dispatch of a version that does not exist: <img width="777" height="257" alt="image" src="https://github.com/user-attachments/assets/183bc630-c347-4aa6-8948-8eee31d56f07" /> Test using workflow dispatch of a version that exists: <img width="545" height="777" alt="image" src="https://github.com/user-attachments/assets/4c5d8cc8-38ac-4cdc-b802-f8bfc2e98ff8" /> ## ✅ Checklist <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] My code follows the code style of this project. - [ ] I have added or updated any relevant documentation. - [ ] I have read the [**CONTRIBUTING**](../blob/8/edge/CONTRIBUTING.md) document. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed.
1 parent f8b0fcf commit 227c8b6

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/bump_dependent_charms.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,22 @@ jobs:
103103
run: |
104104
poetry remove "${DEP_NAME}"
105105
VERSION_NUMBER="${VERSION#v}"
106-
poetry add "${DEP_NAME}"=="${VERSION_NUMBER}" --group main
107-
poetry add "${DEP_NAME}"=="${VERSION_NUMBER}" --group integration
106+
107+
for i in {1..30}; do
108+
echo "Attempt $i: adding ${DEP_NAME}==${VERSION_NUMBER}"
109+
110+
if poetry add "${DEP_NAME}==${VERSION_NUMBER}" --group main && \
111+
poetry add "${DEP_NAME}==${VERSION_NUMBER}" --group integration; then
112+
echo "Dependency added successfully"
113+
exit 0
114+
fi
115+
116+
echo "Not resolvable yet, sleeping..."
117+
sleep 60
118+
done
119+
120+
echo "Poetry could not resolve ${DEP_NAME}==${VERSION_NUMBER}"
121+
exit 1
108122
109123
- name: Poetry update
110124
run: poetry update "${DEP_NAME}"

0 commit comments

Comments
 (0)