Skip to content

Commit 021ace7

Browse files
authored
Merge branch 'master' into fix/readonlyadmin-cascade-delete
2 parents 89a8f9b + 83ac9fc commit 021ace7

4 files changed

Lines changed: 38 additions & 13 deletions

File tree

.github/actions/bot-ci-failure/analyze_failure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
# Strict markers that unequivocally indicate a failing test or assertion.
1010
STRICT_TEST_FAILURE_MARKERS = (
1111
"FAIL:",
12-
"FAILED (",
1312
"AssertionError",
1413
)
1514

@@ -35,6 +34,7 @@
3534
"Network is unreachable",
3635
"Temporary failure in name resolution",
3736
"selenium.common.exceptions.InvalidSessionIdException",
37+
"selenium.common.exceptions.WebDriverException",
3838
"Posting coverage data to https://coveralls.io",
3939
"OperationalError: database is locked",
4040
"ERROR: Could not install packages due to an OSError",

.github/actions/bot-ci-failure/test_analyze_failure.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,20 @@ def test_transient_marker_containing_error_keyword(self):
338338
self.assertTrue(transient_only)
339339
self.assertFalse(tests_failed)
340340

341+
def test_transient_ignores_unittest_failed_summary(self):
342+
"""Ensure unittest's 'FAILED (errors=1)' summary does not override transient crashes."""
343+
content = (
344+
"===== JOB 5 =====\n"
345+
"Traceback (most recent call last):\n"
346+
"selenium.common.exceptions.WebDriverException: Message: Reached error page: about:neterror\n"
347+
"----------------------------------------------------------------------\n"
348+
"Ran 367 tests in 311.148s\n\n"
349+
"FAILED (errors=1)\n"
350+
)
351+
text, tests_failed, transient_only = process_error_logs(content)
352+
self.assertFalse(tests_failed)
353+
self.assertTrue(transient_only)
354+
341355

342356
class TestNormalizeForDedup(unittest.TestCase):
343357
"""Tests for _normalize_for_dedup."""

docs/developer/reusable-github-utils.rst

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -491,10 +491,15 @@ to secrets, and is the one that generates and posts the changelog comment.
491491
To enable the changelog bot in any OpenWISP repository, create the
492492
following two workflow files.
493493

494-
**1. Trigger** (``.github/workflows/bot-changelog-trigger.yml``)
494+
To enable the changelog bot in any OpenWISP repository, create the
495+
following two workflow files under ``.github/workflows/``.
496+
497+
The trigger workflow runs when a PR review is submitted. If the PR is
498+
approved by a maintainer and its title starts with ``[feature]``,
499+
``[fix]``, or ``[change]``, it stores the PR number as workflow metadata.
495500

496-
This workflow fires on PR approval, checks if the PR is noteworthy, and
497-
uploads the PR number as an artifact for the runner to pick up.
501+
**1. Changelog Bot Trigger**
502+
(``.github/workflows/bot-changelog-trigger.yml``)
498503

499504
.. code-block:: yaml
500505
@@ -504,6 +509,8 @@ uploads the PR number as an artifact for the runner to pick up.
504509
pull_request_review:
505510
types: [submitted]
506511
512+
permissions: {}
513+
507514
jobs:
508515
check:
509516
if: |
@@ -530,15 +537,16 @@ uploads the PR number as an artifact for the runner to pick up.
530537
531538
- name: Upload PR metadata
532539
if: steps.check.outputs.has_noteworthy == 'true'
533-
uses: actions/upload-artifact@v4
540+
uses: actions/upload-artifact@v7
534541
with:
535542
name: changelog-metadata
536543
path: pr_number
537544
538-
**2. Runner** (``.github/workflows/bot-changelog-runner.yml``)
545+
The runner workflow is triggered after the trigger workflow completes. It
546+
retrieves the PR metadata and calls the reusable changelog workflow.
539547

540-
This workflow triggers after the trigger completes, downloads the
541-
artifact, and calls the reusable workflow with full secret access.
548+
**2. Changelog Bot Runner**
549+
(``.github/workflows/bot-changelog-runner.yml``)
542550

543551
.. code-block:: yaml
544552
@@ -552,20 +560,19 @@ artifact, and calls the reusable workflow with full secret access.
552560
553561
permissions:
554562
actions: read
555-
contents: read
556-
pull-requests: write
557-
issues: write
558563
559564
jobs:
560565
fetch-metadata:
561566
runs-on: ubuntu-latest
562567
if: github.event.workflow_run.conclusion == 'success'
568+
permissions:
569+
actions: read
563570
outputs:
564571
pr_number: ${{ steps.metadata.outputs.pr_number }}
565572
steps:
566573
- name: Download PR metadata
567574
id: download
568-
uses: actions/download-artifact@v4
575+
uses: actions/download-artifact@v8
569576
with:
570577
name: changelog-metadata
571578
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -586,6 +593,10 @@ artifact, and calls the reusable workflow with full secret access.
586593
changelog:
587594
needs: fetch-metadata
588595
if: needs.fetch-metadata.outputs.pr_number != ''
596+
permissions:
597+
contents: read
598+
pull-requests: write
599+
issues: write
589600
uses: openwisp/openwisp-utils/.github/workflows/reusable-bot-changelog.yml@master
590601
with:
591602
pr_number: ${{ needs.fetch-metadata.outputs.pr_number }}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
zip_safe=False,
3939
install_requires=[
4040
"django-model-utils>=4.5,<5.1",
41-
"django-minify-compress-staticfiles~=1.1.0",
41+
"django-minify-compress-staticfiles~=1.1.1",
4242
"django-admin-autocomplete-filter~=0.7.1",
4343
"swapper~=1.4.0",
4444
# allow wider range here to avoid interfering with other modules

0 commit comments

Comments
 (0)