diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/ISSUE_TEMPLATE/bug_report.md | 97 | ||||
-rw-r--r-- | .github/ISSUE_TEMPLATE/bug_report.yml | 78 | ||||
-rw-r--r-- | .github/workflows/build-test-docker.yml | 163 | ||||
-rw-r--r-- | .github/workflows/conflicts.yml | 3 |
4 files changed, 242 insertions, 99 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 895e8ad..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: triage -assignees: '' - ---- - -<!-- - -*** ATTENTION *** - -YOU MUST READ THIS TO HAVE YOUR ISSUE ADDRESSED - -PLEASE READ AND FILL OUT THIS TEMPLATE - -NEGLECTING TO PROVIDE INFORMATION REQUESTED HERE WILL RESULT IN -SIGNIFICANT DELAYS ADDRESSING YOUR ISSUE - -ALWAYS PROVIDE: -- FRR VERSION -- OPERATING SYSTEM VERSION -- KERNEL VERSION - -FAILURE TO PROVIDE THIS MAY RESULT IN YOUR ISSUE BEING IGNORED - -FOLLOW THESE GUIDELINES: - -- When reporting a crash, provide a backtrace -- When pasting configs, logs, shell output, backtraces, and other large chunks - of text, surround this text with triple backtics - - ``` - like this - ``` - -- Include the FRR version; if you built from Git, please provide the commit - hash -- Write your issue in English - ---> - ---------------- - -**Describe the bug** -<!-- -A clear and concise description of what the bug is. - -Put "x" in "[ ]" if you already tried following: ---> - -- [ ] Did you check if this is a duplicate issue? -- [ ] Did you test it on the latest FRRouting/frr master branch? - - -**To Reproduce** -<!-- -Describe the steps to reproduce the behavior. -Be as descriptive as possible. - -For example: - -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error ---> - -**Expected behavior** -<!-- -Write here a clear and concise description of what you expected to happen when -using the reproduction steps you provided above ---> - -**Screenshots** -<!-- -If applicable, add screenshots to help explain your problem. ---> - -**Versions** -<!-- -Include your operating system type and version here - -FAILURE TO PROVIDE THIS MAY RESULT IN YOUR ISSUE BEING IGNORED ---> -<!-- e.g. Fedora 24, Debian 10] --> - - OS Version: -<!-- [e.g. Linux 5.4, OpenBSD 6.6] --> - - Kernel: -<!-- e.g. 6.0, 7.4 --> - - FRR Version: - -**Additional context** -<!-- -Add any other context about the problem here. ---> diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..7319550 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,78 @@ +name: Bug report +description: Report a bug in the FRRouting software +labels: triage +body: + - type: markdown + attributes: + value: > + **This form is only for reporting a bug in the FRRouting software.** + If you need help troubleshooting your configuration, have a problem + building or installing the software, or want to ask a question or + discuss the project, learn how to [connect with the FRRouting + community](https://frrouting.org/community/). + + + **Do not include sensitive information in this report.** IP addresses + should be masked (example: 192.XXX.XXX.32/24). + - type: textarea + id: description + attributes: + label: Description + description: Provide a clear and concise description of the bug. + validations: + required: true + - type: textarea + id: version + attributes: + label: Version + description: > + Run the `show version` command in the VTY shell, and provide the output + here. (If possible, test the current development version of FRRouting + for this bug.) + render: text + validations: + required: true + - type: textarea + id: how-to-reproduce + attributes: + label: How to reproduce + description: > + Give a list of steps that someone else can follow to observe + the bug. Be as descriptive as possible, including any relevant + configuration files and commands used. Topology diagrams are + helpful when the bug involves more than one router. + validations: + required: true + - type: textarea + id: expected-behavior + attributes: + label: Expected behavior + description: > + What do you expect to happen when following the steps above? + validations: + required: true + - type: textarea + id: actual-behavior + attributes: + label: Actual behavior + description: > + What actually happens when following the steps above? Include + screenshots, log file snippets, and/or platform routing tables + as appropriate. If a crash occurs, provide a backtrace. + validations: + required: true + - type: textarea + id: additional-context + attributes: + label: Additional context + description: > + Include any other relevant information about this bug here. + - type: checkboxes + id: checklist + attributes: + label: Checklist + options: + - label: I have searched the open issues for this bug. + required: true + - label: I have not included sensitive information in this report. + required: true diff --git a/.github/workflows/build-test-docker.yml b/.github/workflows/build-test-docker.yml new file mode 100644 index 0000000..3f53f32 --- /dev/null +++ b/.github/workflows/build-test-docker.yml @@ -0,0 +1,163 @@ +name: build-test + +on: + pull_request: + push: + branches: + - 'master' + - 'stable/**' + +defaults: + run: + shell: bash + +jobs: + build-docker: + name: Build the ubuntu 22.04 docker image + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + - name: Build docker image + run: | + docker build -t frr-ubuntu22 -f docker/ubuntu-ci/Dockerfile . + docker save --output /tmp/frr-ubuntu22.tar frr-ubuntu22 + - name: Upload docker image artifact + uses: actions/upload-artifact@v4 + with: + name: ubuntu-image + path: /tmp/frr-ubuntu22.tar + - name: Clear any previous results + # So if all jobs are re-run then all tests will be re-run + run: | + rm -rf test-results* + mkdir -p test-results + touch test-results/cleared-results.txt + - name: Save cleared previous results + uses: actions/upload-artifact@v4 + with: + name: test-results + path: test-results + overwrite: true + - name: Cleanup + if: ${{ always() }} + run: rm -rf test-results* /tmp/frr-ubuntu22.tar + + test-docker: + name: Test ubuntu docker image + needs: build-docker + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + - name: Fetch docker image artifact + uses: actions/download-artifact@v4 + with: + name: ubuntu-image + path: /tmp + - name: Fetch previous results + if: ${{ github.run_attempt > 1 }} + uses: actions/download-artifact@v4 + with: + name: test-results + path: test-results + - name: Run topotests + run: | + uname -a + MODPKGVER=$(uname -r) + sudo apt-get update -y + # Github is running old kernels but installing newer packages :( + sudo apt-get install -y linux-modules-extra-azure linux-modules-${MODPKGVER} linux-modules-extra-${MODPKGVER} python3-xmltodict + sudo modprobe vrf || true + sudo modprobe mpls-iptunnel + sudo modprobe mpls-router + docker load --input /tmp/frr-ubuntu22.tar + + if ! grep CONFIG_IP_MROUTE_MULTIPLE_TABLES=y /boot/config*; then + ADD_DOCKER_ENV+="-e MROUTE_VRF_MISSING=1" + fi + echo "ADD_DOCKER_ENV: ${ADD_DOCKER_ENV}" + + if [ -f test-results/topotests.xml ]; then + ./tests/topotests/analyze.py -r test-results + ls -l test-results/topotests.xml + run_tests=$(./tests/topotests/analyze.py -r test-results | cut -f1 -d: | sort -u) + else + echo "No test results dir" + run_tests="" + fi + rm -rf test-results* /tmp/topotests + + echo RUN_TESTS: $run_tests + if docker run --init -i --privileged --name frr-ubuntu-cont ${ADD_DOCKER_ENV} -v /lib/modules:/lib/modules frr-ubuntu22 \ + bash -c 'cd ~/frr/tests/topotests ; sudo -E pytest -n$(($(nproc) * 5 / 2)) --dist=loadfile '$run_tests; then + echo "All tests passed." + exit 0 + fi + + # Grab the results from the container + if ! ./tests/topotests/analyze.py -Ar test-results -C frr-ubuntu-cont; then + if [ ! -d test-results ]; then + echo "ERROR: Basic failure in docker run, no test results directory available." >&2 + exit 1; + fi + if [ ! -f test-results/topotests.xml ]; then + # In this case we may be missing topotests.xml + echo "ERROR: No topotests.xml available perhaps docker run aborted?" >&2 + exit 1; + fi + echo "WARNING: analyyze.py returned error but grabbed results anyway." >&2 + fi + + # Save some information useful for debugging + cp /boot/config* test-results/ + sysctl -a > test-results/sysctl.out 2> /dev/null + + # Now get the failed tests (if any) from the archived results directory. + rerun_tests=$(./tests/topotests/analyze.py -r test-results | cut -f1 -d: | sort -u) + if [ -z "$rerun_tests" ]; then + echo "All tests passed during parallel run." + exit 0 + fi + + echo "ERROR: Some tests failed during parallel run, rerunning serially." >&2 + echo RERUN_TESTS: $rerun_tests >&2 + docker stop frr-ubuntu-cont + docker rm frr-ubuntu-cont + + mv test-results test-results-initial + if docker run --init -i --privileged --name frr-ubuntu-cont ${ADD_DOCKER_ENV} -v /lib/modules:/lib/modules frr-ubuntu22 \ + bash -c 'cd ~/frr/tests/topotests ; sudo -E pytest '$rerun_tests; then + echo "All rerun tests passed." + exit 0 + fi + echo "Some rerun tests still failed." + exit 1 + - name: Gather results + if: ${{ always() }} + run: | + if [ ! -d test-results ]; then + if ! ./tests/topotests/analyze.py -Ar test-results -C frr-ubuntu-cont; then + echo "ERROR: gathering results produced an error, perhaps due earlier run cancellation." >&2 + fi + fi + - name: Upload test results + if: ${{ always() }} + uses: actions/upload-artifact@v4 + with: + name: test-results + path: | + test-results + test-results-initial + overwrite: true + - name: Cleanup + if: ${{ always() }} + run: | + rm -rf test-results* /tmp/frr-ubuntu22.tar + docker stop frr-ubuntu-cont || true + docker rm frr-ubuntu-cont || true + diff --git a/.github/workflows/conflicts.yml b/.github/workflows/conflicts.yml index 100f557..4b4e99f 100644 --- a/.github/workflows/conflicts.yml +++ b/.github/workflows/conflicts.yml @@ -1,9 +1,8 @@ name: Add a conflict label if PR needs to rebase on: - push: pull_request_target: - types: [synchronize] + types: [opened, reopened, synchronize] jobs: conflicts: |