GH Actions: Create daily integration branch
mkoeppe opened this issue · 110 comments
We create a GH Actions workflow, run daily (intended for running on sagetrac-mirror) as a cron job (
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule).
It can also be triggered manually via workflow_dispatch.
Example run at
https://github.com/mkoeppe/sage/runs/5060070979
-
Merge mergeable Trac tickets from the current milestone, ordered by priority/deps, using
git releasemgr merge-all --milestone=current -
Run using tox/docker on a stable platform (
ubuntu-focal-recommended). (The new package factorrecommendedis likestandard, but with texlive etc. added, as needed fordoc-pdf). We setSAGE_DOCTEST_RANDOM_SEED=0to reduce random failures.
Only testsuite failures that do not already fail in the baseline are considered failures. -
Docker images are pushed to
ghcr.io, see https://github.com/mkoeppe?tab=packages&q=recommended
Related issues and PRs:
- sagemath/sage-patchbot#148
- sagemath/sage-patchbot#64
- sagemath/git-trac-command#53
- sagemath/git-trac-command#54
- sagemath/git-trac-command#55
- sagemath/git-trac-command#56
- sagemath/git-trac-command#57
- sagemath/sage-patchbot#150
- sagemath/sage-patchbot#153
- sagemath/git-trac-command#59
- sagemath/git-trac-command#60
- sagemath/git-trac-command#61
- sagemath/git-trac-command#62
- sagemath/git-trac-command#58
Refinements:
-
Provide it with Trac credentials so it can set tickets back to
needs_workon merge failures (using sagemath/git-trac-command#57)--> Trac account requested
-
Run
git log --first-parenton files with merge conflict -
Provide it with GitHub credentials so it can push a branch
$RELEASE_TAG+integration-$DATE, if it passes build + doctests + doc-pdf. -
Perhaps
git bisect --first-parentfor passing; set first failing ticket back toneeds_work -
Another workflow for integration testing of all tickets in the current milestone with
--patchbot-status=Spkgand--status=needs_review positive_reviewwith the full portability CI.
Depends on #33233
Depends on #31529
Depends on #33103
Depends on #33277
Component: distribution
Author: Matthias Koeppe
Branch/Commit: u/mkoeppe/gh_actions__create_daily_integration_branch @ 37c76a6
Issue created by migration from https://trac.sagemath.org/ticket/33222
Volker, would you be willing to share your existing scripts that probably already implement something like step 2 above? It does not have to be pretty.
Scripts are part of https://github.com/sagemath/git-trac-command:
$ git releasemgr merge-all -h
usage: git-releasemgr merge-all [-h] [--limit LIMIT]
optional arguments:
-h, --help show this help message and exit
--limit LIMIT Merge this many tickets
Thanks for the pointer
Description changed:
---
+++
@@ -6,6 +6,8 @@
2. Pick mergeable Trac tickets from the current milestone, order by priority/deps
3. Merge one by one and push to branch "$RELEASE_TAG+integration-$DATE", if it passes doctests + doc-pdf.
- - Report failures as comment / status change on the Trac ticket.
+ - Report failures as comment / status change on the Trac ticket. Link to the GH Actions run: `$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID` (from https://docs.github.com/en/actions/learn-github-actions/environment-variables)
-
+Related PRs:
+- https://github.com/sagemath/git-trac-command/pull/53
+- https://github.com/sagemath/git-trac-command/pull/54Description changed:
---
+++
@@ -11,3 +11,7 @@
Related PRs:
- https://github.com/sagemath/git-trac-command/pull/53
- https://github.com/sagemath/git-trac-command/pull/54
+- https://github.com/sagemath/git-trac-command/pull/55
+- https://github.com/sagemath/git-trac-command/pull/56
+- https://github.com/sagemath/git-trac-command/pull/57
+Description changed:
---
+++
@@ -3,7 +3,7 @@
1. Start from current release tag, use the corresponding Docker image on gchr.io from a stable platform such as `ubuntu-focal-standard`
-2. Pick mergeable Trac tickets from the current milestone, order by priority/deps
+2. Merge mergeable Trac tickets from the current milestone, ordered by priority/deps, using `git releasemgr merge-all --milestone=MILESTONE`
3. Merge one by one and push to branch "$RELEASE_TAG+integration-$DATE", if it passes doctests + doc-pdf.
- Report failures as comment / status change on the Trac ticket. Link to the GH Actions run: `$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID` (from https://docs.github.com/en/actions/learn-github-actions/environment-variables)Description changed:
---
+++
@@ -14,4 +14,5 @@
- https://github.com/sagemath/git-trac-command/pull/55
- https://github.com/sagemath/git-trac-command/pull/56
- https://github.com/sagemath/git-trac-command/pull/57
+- https://github.com/sagemath/sage-patchbot/pull/150
Description changed:
---
+++
@@ -8,7 +8,9 @@
3. Merge one by one and push to branch "$RELEASE_TAG+integration-$DATE", if it passes doctests + doc-pdf.
- Report failures as comment / status change on the Trac ticket. Link to the GH Actions run: `$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID` (from https://docs.github.com/en/actions/learn-github-actions/environment-variables)
-Related PRs:
+Related issues and PRs:
+- https://github.com/sagemath/sage-patchbot/issues/148
+- https://github.com/sagemath/sage-patchbot/issues/64
- https://github.com/sagemath/git-trac-command/pull/53
- https://github.com/sagemath/git-trac-command/pull/54
- https://github.com/sagemath/git-trac-command/pull/55Description changed:
---
+++
@@ -17,4 +17,5 @@
- https://github.com/sagemath/git-trac-command/pull/56
- https://github.com/sagemath/git-trac-command/pull/57
- https://github.com/sagemath/sage-patchbot/pull/150
+- https://github.com/sagemath/git-trac-command/pull/58
Description changed:
---
+++
@@ -18,4 +18,5 @@
- https://github.com/sagemath/git-trac-command/pull/57
- https://github.com/sagemath/sage-patchbot/pull/150
- https://github.com/sagemath/git-trac-command/pull/58
+- https://github.com/sagemath/sage-patchbot/pull/153
Commit: e803539
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
e803539 | .github/workflows/integration.yml: New |
Description changed:
---
+++
@@ -1,12 +1,14 @@
-We create a GH Actions workflow, run daily on `sagetrac-mirror` (
-https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule):
+We create a GH Actions workflow, run daily (intended for running on `sagetrac-mirror`) as a cron job (
+https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule).
-1. Start from current release tag, use the corresponding Docker image on gchr.io from a stable platform such as `ubuntu-focal-standard`
+It can also be triggered manually via `workflow_dispatch`.
-2. Merge mergeable Trac tickets from the current milestone, ordered by priority/deps, using `git releasemgr merge-all --milestone=MILESTONE`
+Example run at
+https://github.com/mkoeppe/sage/runs/4940850295
-3. Merge one by one and push to branch "$RELEASE_TAG+integration-$DATE", if it passes doctests + doc-pdf.
- - Report failures as comment / status change on the Trac ticket. Link to the GH Actions run: `$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID` (from https://docs.github.com/en/actions/learn-github-actions/environment-variables)
+1. Merge mergeable Trac tickets from the current milestone, ordered by priority/deps, using `git releasemgr merge-all --milestone=current`
+
+2. Run using tox/docker on a stable platform (`ubuntu-focal-standard`)
Related issues and PRs:
- https://github.com/sagemath/sage-patchbot/issues/148
@@ -20,3 +22,15 @@
- https://github.com/sagemath/git-trac-command/pull/58
- https://github.com/sagemath/sage-patchbot/pull/153
+Refinements:
+- Provide it with Trac credentials so it can set tickets back to `needs_work` on merge failures (using https://github.com/sagemath/git-trac-command/pull/57)
+
+- Link to the GH Actions run: `$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID` (from https://docs.github.com/en/actions/learn-github-actions/environment-variables)
+
+- Provide it with [GitHub](../wiki/GitHub) credentials so it can push a branch `$RELEASE_TAG+integration-$DATE`, if it passes build + doctests + doc-pdf.
+
+- Perhaps `git bisect --first-parent` for passing; set first failing ticket back to `needs_review`
+
+- Warmstart from a Docker image on gchr.io (#30933)
+
+Author: Matthias Koeppe
Description changed:
---
+++
@@ -29,7 +29,7 @@
- Provide it with [GitHub](../wiki/GitHub) credentials so it can push a branch `$RELEASE_TAG+integration-$DATE`, if it passes build + doctests + doc-pdf.
-- Perhaps `git bisect --first-parent` for passing; set first failing ticket back to `needs_review`
+- Perhaps `git bisect --first-parent` for passing; set first failing ticket back to `needs_work`
- Warmstart from a Docker image on gchr.io (#30933)
Description changed:
---
+++
@@ -8,7 +8,7 @@
1. Merge mergeable Trac tickets from the current milestone, ordered by priority/deps, using `git releasemgr merge-all --milestone=current`
-2. Run using tox/docker on a stable platform (`ubuntu-focal-standard`)
+2. Run using tox/docker on a stable platform (`ubuntu-focal-standard`). We set `SAGE_DOCTEST_RANDOM_SEED=0` to reduce random failures.
Related issues and PRs:
- https://github.com/sagemath/sage-patchbot/issues/148Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
7db353e | .github/workflows/integration.yml: New |
6d30ef9 | src/sage/tests/cmdline.py: Add diagnostics to a test that often fails |
73450a8 | src/bin/sage-runtests: New option --baseline-stats-path |
3551e19 | src/sage/doctest/control.py: Load base line stats |
09ce9e0 | src/sage/doctest/reporting.py: No error status for failures already seen in baseline |
3eecc40 | Merge #33233 |
edecb85 | .github/workflows/integration.yml: Check out from current repo, use sagetrac-mirror remote for develop and tags |
c452317 | .github/workflows/integration.yml: Check out from current repo, use sagetrac-mirror remote for develop and tags |
Branch pushed to git repo; I updated commit sha1. New commits:
1903e03 | .github/workflows/integration.yml: First build baseline, then test integration head |
45af154 | .github/workflows/integration.yml: Make git available in the container |
e4c3890 | .github/workflows/integration.yml: Add .git |
7513533 | .github/workflows/integration.yml: Actually build baseline |
Branch pushed to git repo; I updated commit sha1. New commits:
96771be | .github/workflows/integration.yml: Run 'git reset --hard' in the container so that non-ADDed files are not shown as deleted |
9ddbcd1 | .github/workflows/integration.yml: Do not fail when baseline ptest has failures |
5d35b97 | WIP |
9dceb34 | fix M4 bugs |
65d67d1 | build/pkgs/texlive/distros: Add *.txt |
b09d0c7 | Merge #31529 |
ec1f7c1 | .github/workflows/integration.yml: Install texlive |
Branch pushed to git repo; I updated commit sha1. New commits:
b1c705b | build/pkgs/texlive/distros/debian.txt: Add more |
a2a014c | Merge #31529 |
21afe51 | .github/workflows/tox*.yml, tox.ini: Pass ddocker.pkg.github.com credentials via DOCKER_CONFIG_FILE |
0f2a49a | Merge #30933 |
87b93f7 | .github/workflows/integration.yml: Publish Docker images |
d17b995 | .github/workflows/integration.yml: Put git-trac-command outside of Sage tree |
f7c4f2b | .github/workflows/integration.yml, tox.ini: Use new packages factor 'recommended' |
bd0a101 | .github/workflows/integration.yml: Also push images for stages 'configured' and 'with-targets-optional' |
f4fca0e | .github/workflows/integration.yml: Fixup package name |
1c4a7ea | .github/workflows/integration.yml: Include action URL in Trac comments via git releasemgr --trac-context |
Description changed:
---
+++
@@ -8,7 +8,9 @@
1. Merge mergeable Trac tickets from the current milestone, ordered by priority/deps, using `git releasemgr merge-all --milestone=current`
-2. Run using tox/docker on a stable platform (`ubuntu-focal-standard`). We set `SAGE_DOCTEST_RANDOM_SEED=0` to reduce random failures.
+2. Run using tox/docker on a stable platform (`ubuntu-focal-recommended`). (The new package factor `recommended` is like `standard`, but with texlive etc. added, as needed for `doc-pdf`). We set `SAGE_DOCTEST_RANDOM_SEED=0` to reduce random failures.
+
+3. Docker images are pushed to `gchr.io`
Related issues and PRs:
- https://github.com/sagemath/sage-patchbot/issues/148Description changed:
---
+++
@@ -10,7 +10,7 @@
2. Run using tox/docker on a stable platform (`ubuntu-focal-recommended`). (The new package factor `recommended` is like `standard`, but with texlive etc. added, as needed for `doc-pdf`). We set `SAGE_DOCTEST_RANDOM_SEED=0` to reduce random failures.
-3. Docker images are pushed to `gchr.io`
+3. Docker images are pushed to `ghcr.io`
Related issues and PRs:
- https://github.com/sagemath/sage-patchbot/issues/148Description changed:
---
+++
@@ -10,7 +10,8 @@
2. Run using tox/docker on a stable platform (`ubuntu-focal-recommended`). (The new package factor `recommended` is like `standard`, but with texlive etc. added, as needed for `doc-pdf`). We set `SAGE_DOCTEST_RANDOM_SEED=0` to reduce random failures.
-3. Docker images are pushed to `ghcr.io`
+3. Docker images are pushed to `ghcr.io`, see https://github.com/mkoeppe?tab=packages&q=recommended
+
Related issues and PRs:
- https://github.com/sagemath/sage-patchbot/issues/148Description changed:
---
+++
@@ -24,6 +24,8 @@
- https://github.com/sagemath/sage-patchbot/pull/150
- https://github.com/sagemath/git-trac-command/pull/58
- https://github.com/sagemath/sage-patchbot/pull/153
+- https://github.com/sagemath/git-trac-command/pull/59
+- https://github.com/sagemath/git-trac-command/pull/60
Refinements:
- Provide it with Trac credentials so it can set tickets back to `needs_work` on merge failures (using https://github.com/sagemath/git-trac-command/pull/57)Branch pushed to git repo; I updated commit sha1. New commits:
3ae35d6 | .github/workflows/integration.yml: Create integration branch |
Description changed:
---
+++
@@ -36,6 +36,6 @@
- Perhaps `git bisect --first-parent` for passing; set first failing ticket back to `needs_work`
-- Warmstart from a Docker image on gchr.io (#30933)
+- Warmstart from a Docker image on ghcr.io (#30933)
Branch pushed to git repo; I updated commit sha1. New commits:
ca95c24 | .github/workflows/integration.yml: First run a job 'baseline_build', use cache |
https://github.com/mkoeppe/sage/runs/4993397402?check_suite_focus=true
#5 importing cache manifest from docker.pkg.github.com/mkoeppe/sage/sage-docker-ubuntu-focal-recommended-with-targets
#5 sha256:c3f8749b6884f89e52d82a7beb83dd3938671c5e8c91d13592abcfa40146f0ad
#5 ERROR: unexpected status code [manifests latest]: 401 Unauthorized
This may be the same as docker/buildx#780
Branch pushed to git repo; I updated commit sha1. New commits:
26d9b8d | .github/workflows/integration.yml: Switch from docker.pkg.github.com to ghcr.io |
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
6285cd9 | .gitpod.Dockerfile: Save space by removing apt lists |
7e74607 | .gitpod.Dockerfile: Remove built Sage documentation |
f71c8b6 | docker/.gitpod.Dockerfile: Clean more |
f953228 | Merge tag '9.5.rc0' into t/33103/gitpod_integration_using_docker_images_from_portability_testing_workflow |
2d0902a | src/doc/en/developer/workspace.rst: Fix markup |
078f247 | .github/workflows/tox*.yml: Transform GITHUB_REF_NAME to a valid docker tag |
b095b47 | Merge #33103 |
036df6d | tox.ini: Use --cache-from if DOCKER_PUSH_REPOSITORY is given |
de2a455 | .github/workflows/integration.yml: Pass BUILDKIT_INLINE_CACHE=1 as a build-arg |
898acf5 | .github/workflows/integration.yml: Reactivate full baseline build |
Description changed:
---
+++
@@ -30,6 +30,8 @@
Refinements:
- Provide it with Trac credentials so it can set tickets back to `needs_work` on merge failures (using https://github.com/sagemath/git-trac-command/pull/57)
+ - Trac account requested
+
- Link to the GH Actions run: `$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID` (from https://docs.github.com/en/actions/learn-github-actions/environment-variables)
- Provide it with [GitHub](../wiki/GitHub) credentials so it can push a branch `$RELEASE_TAG+integration-$DATE`, if it passes build + doctests + doc-pdf.Description changed:
---
+++
@@ -30,7 +30,7 @@
Refinements:
- Provide it with Trac credentials so it can set tickets back to `needs_work` on merge failures (using https://github.com/sagemath/git-trac-command/pull/57)
- - Trac account requested
+ --> Trac account requested
- Link to the GH Actions run: `$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID` (from https://docs.github.com/en/actions/learn-github-actions/environment-variables)
@@ -38,6 +38,6 @@
- Perhaps `git bisect --first-parent` for passing; set first failing ticket back to `needs_work`
-- Warmstart from a Docker image on ghcr.io (#30933)
+- Use several `--cache-from`, including current `develop`
Branch pushed to git repo; I updated commit sha1. New commits:
a545c4e | .github/workflows/integration.yml: Fixup |
Branch pushed to git repo; I updated commit sha1. New commits:
72eff23 | Merge tag '9.5' into t/33222/gh_actions__create_daily_integration_branch |
Description changed:
---
+++
@@ -22,10 +22,12 @@
- https://github.com/sagemath/git-trac-command/pull/56
- https://github.com/sagemath/git-trac-command/pull/57
- https://github.com/sagemath/sage-patchbot/pull/150
-- https://github.com/sagemath/git-trac-command/pull/58
- https://github.com/sagemath/sage-patchbot/pull/153
- https://github.com/sagemath/git-trac-command/pull/59
- https://github.com/sagemath/git-trac-command/pull/60
+- https://github.com/sagemath/git-trac-command/pull/61
+- https://github.com/sagemath/git-trac-command/pull/62
+- https://github.com/sagemath/git-trac-command/pull/58
Refinements:
- Provide it with Trac credentials so it can set tickets back to `needs_work` on merge failures (using https://github.com/sagemath/git-trac-command/pull/57)Description changed:
---
+++
@@ -40,6 +40,4 @@
- Perhaps `git bisect --first-parent` for passing; set first failing ticket back to `needs_work`
-- Use several `--cache-from`, including current `develop`
-Description changed:
---
+++
@@ -4,11 +4,12 @@
It can also be triggered manually via `workflow_dispatch`.
Example run at
-https://github.com/mkoeppe/sage/runs/4940850295
+https://github.com/mkoeppe/sage/runs/4999004937
1. Merge mergeable Trac tickets from the current milestone, ordered by priority/deps, using `git releasemgr merge-all --milestone=current`
2. Run using tox/docker on a stable platform (`ubuntu-focal-recommended`). (The new package factor `recommended` is like `standard`, but with texlive etc. added, as needed for `doc-pdf`). We set `SAGE_DOCTEST_RANDOM_SEED=0` to reduce random failures.
+Only testsuite failures that do not already fail in the baseline are considered failures.
3. Docker images are pushed to `ghcr.io`, see https://github.com/mkoeppe?tab=packages&q=recommended
@@ -34,7 +35,7 @@
--> Trac account requested
-- Link to the GH Actions run: `$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID` (from https://docs.github.com/en/actions/learn-github-actions/environment-variables)
+- Run `git log --first-parent` on files with merge conflict
- Provide it with [GitHub](../wiki/GitHub) credentials so it can push a branch `$RELEASE_TAG+integration-$DATE`, if it passes build + doctests + doc-pdf.
Branch pushed to git repo; I updated commit sha1. New commits:
ff8a8d6 | build/pkgs/ffmpeg/distros/fedora.txt: Remove ffmpeg - it is not in the standard repo |
With ptestlong it exceeds the 6 hours, so I'll have to split out another job
Description changed:
---
+++
@@ -41,4 +41,5 @@
- Perhaps `git bisect --first-parent` for passing; set first failing ticket back to `needs_work`
+- Another workflow for integration testing of all tickets in the current milestone with `--patchbot-status=Spkg` and `--status=needs_review positive_review` with the full portability CI.
Branch pushed to git repo; I updated commit sha1. New commits:
5117e92 | .github/workflows/integration.yml: Separate job baseline_test |
Branch pushed to git repo; I updated commit sha1. New commits:
6952de4 | build/pkgs/texlive/spkg-configure.m4: Check for pdflatex, latexmk, dvipng |
b85356f | build/pkgs/texlive/spkg-configure.m4: Check for tgtermes.sty |
62fbc45 | build/pkgs/sagemath_doc_pdf/dependencies: Add texlive |
e63b9f2 | Merge tag '9.5' into t/31529/packages/texlive/add_spkg_configure_m4_and_system_package_information__remove_install_script |
8b2490e | build/pkgs/texlive/spkg-configure.m4: ALso check for fncychap.sty |
7b97dd4 | update list of gentoo packages |
016ff89 | Merge #31529 |
855314d | src/doc/bootstrap: Get recommended spkg from build/pkgs/_recommended/dependencies |
0097d0e | Merge #33277 |
5de1724 | tox.ini (recommended): Use build/pkgs/_recommended/dependencies |
Description changed:
---
+++
@@ -4,7 +4,7 @@
It can also be triggered manually via `workflow_dispatch`.
Example run at
-https://github.com/mkoeppe/sage/runs/4999004937
+https://github.com/mkoeppe/sage/runs/5060070979
1. Merge mergeable Trac tickets from the current milestone, ordered by priority/deps, using `git releasemgr merge-all --milestone=current`
Uff that's quite complicated. Why do you first need to create a new baseline image for the integration tests and not reuse the docker image build during the latest push to the develop branch?
Instead of manually handling the docker pull (using cli commands) I would propose to use the container tag for the workflow (or job). Makes things easier and I assume github also takes care of the permission handling.
Also the integration job is currently timing out, and if I read the logs correctly then it is actually not merging the tickets for the new milestone (but tries to merge tickets for the already finished milestone 9.5): No tickets for milestone sage-9.5 are ready to be merged.
Finally a general remark: please use the new reusable actions instead of copy&pasting stuff around, like the "free space" or "login to ghcr" parts (which shouldn't be necessary in the final integration job because that's only reading, right?).
Replying to @tobiasdiez:
Finally a general remark: please use the new reusable actions instead of copy&pasting stuff around
Refactoring will not happen in this ticket
Replying to @tobiasdiez:
Why do you first need to create a new baseline image for the integration tests and not reuse the docker image build during the latest push to the develop branch?
I need an image with more packages, which is not built by the CI. This is to run make doc-pdf, an essential step that currently no CI is testing.
Instead of manually handling the docker pull (using cli commands) I would propose to use the
containertag for the workflow (or job).
I am deliberately setting this up as an image build, not just a container run, because I want to create a Docker image that can be pulled for local inspection.
Replying to @tobiasdiez:
Also the
integrationjob is currently timing out
Yes, there's still something going wrong with the caching, so it's rebuilding something that it should have taken from the previous job
Replying to @tobiasdiez:
"login to ghcr" parts [...] shouldn't be necessary in the final
integrationjob because that's only reading, right?
Actually one does need to login even just for reading packages.
(And the last step does push something - the image with the included repository.)
Replying to @mkoeppe:
Replying to @tobiasdiez:
Finally a general remark: please use the new reusable actions instead of copy&pasting stuff around
Refactoring will not happen in this ticket
I didn't meant you should refactor the existing workflows. But if you want to reuse some steps in the newly created workflow than they should be extracted to a new action (instead of copy&paste them). Refactoring the other workflows to use this new action can be done later.
(You wouldn't also let python code pass that copy&pastes some methods around, right?)
Replying to @mkoeppe:
Replying to @tobiasdiez:
Why do you first need to create a new baseline image for the integration tests and not reuse the docker image build during the latest push to the develop branch?
I need an image with more packages, which is not built by the CI. This is to run
make doc-pdf, an essential step that currently no CI is testing.
If it's so important, why not add it as a new target to the existing CI?
Replying to @mkoeppe:
I am deliberately setting this up as an image build, not just a container run, because I want to create a Docker image that can be pulled for local inspection.
Can you expand on why this should be helpful, i.e. where are the advantages over just checking out the branch in your local git (and maybe running it in the baseline-integration docker image if you like). Also you can just execute the github workflow locally using act if you like.
Also, are you aware that there are special actions for the login and publish, which make the whole process way easier (and we don't need to maintain them)? https://docs.github.com/en/actions/publishing-packages/publishing-docker-images#publishing-images-to-github-packages
Replying to @tobiasdiez:
Replying to @mkoeppe:
This is to run
make doc-pdf, an essential step that currently no CI is testing.If it's so important, why not add it as a new target to the existing CI?
Yes, changing the existing CI to build the -recommended instead of -standard workflow may be something that we want to do at some point in the future. But this will need #33062 (split the workflow, with caching of Docker layers). That's exactly what the changes to tox.ini here on the ticket are implementing!
Can't change everything at the same time.
Replying to @tobiasdiez:
Replying to @mkoeppe:
I am deliberately setting this up as an image build, not just a container run, because I want to create a Docker image that can be pulled for local inspection.
Can you expand on why this should be helpful, i.e. where are the advantages over just checking out the branch in your local git (and maybe running it in the baseline-integration docker image if you like).
The build & test can take long. If it is prebuilt on GH Actions and I can download it for inspection, that's a benefit.
Also you can just execute the github workflow locally using
actif you like.
I don't like
Replying to @tobiasdiez:
Also, are you aware that there are special actions for the login and publish
Yes, but they don't help much. The login action could replace these 5 lines:
TOKEN="${{ secrets.DOCKER_PKG_GITHUB_TOKEN }}"
if [ -z "$TOKEN" ]; then
TOKEN="${{ secrets.GITHUB_TOKEN }}"
fi
if echo "$TOKEN" | docker login ghcr.io -u ${{ github.actor }} --password-stdin; then
And the other one is not useful
Replying to @mkoeppe:
Replying to @tobiasdiez:
Replying to @mkoeppe:
This is to run
make doc-pdf, an essential step that currently no CI is testing.If it's so important, why not add it as a new target to the existing CI?
Yes, changing the existing CI to build the
-recommendedinstead of-standardworkflow may be something that we want to do at some point in the future. But this will need #33062 (split the workflow, with caching of Docker layers). That's exactly what the changes to tox.ini here on the ticket are implementing!Can't change everything at the same time.
Okay, makes sense. Thanks for the explanation.
Replying to @mkoeppe:
Replying to @tobiasdiez:
Replying to @mkoeppe:
I am deliberately setting this up as an image build, not just a container run, because I want to create a Docker image that can be pulled for local inspection.
Can you expand on why this should be helpful, i.e. where are the advantages over just checking out the branch in your local git (and maybe running it in the baseline-integration docker image if you like).
The build & test can take long. If it is prebuilt on GH Actions and I can download it for inspection, that's a benefit.
But the push happens before the final "Build & test integration head", so it neither contains the test results nor the build, or I'm missing something?
Yes, that's true as it is in the current branch - but that final step can be extended to also build; just not done yet
Replying to @mkoeppe:
Replying to @tobiasdiez:
Also, are you aware that there are special actions for the login and publish
Yes, but they don't help much. The login action could replace these 5 lines:
TOKEN="${{ secrets.DOCKER_PKG_GITHUB_TOKEN }}" if [ -z "$TOKEN" ]; then TOKEN="${{ secrets.GITHUB_TOKEN }}" fi if echo "$TOKEN" | docker login ghcr.io -u ${{ github.actor }} --password-stdin; then
Yes, the docker/login-action is not doing much more: https://github.com/docker/login-action/blob/17f28ab24d0d2832d5ff23a1409bbfc373ebcb96/src/docker.ts#L30-L50 Except a bit of proper error handling and logging you out again. Anyway, why not reuse something official so that you don't have to worry about it?
Because of the lines that follow if.
I guess it's getting late here for me, but your messages get more and more cryptic. There are a lot of ifs here...
Sorry, I meant the last if but it also applies to the first if ;)