Skip to content

merge patches from 2.10.2 - #17

Open
paulopamplona wants to merge 7 commits into
SUNET:mainfrom
Uninett:stable/2.10.x
Open

paulopamplona wants to merge 7 commits into
SUNET:mainfrom
Uninett:stable/2.10.x

Conversation

@paulopamplona

Copy link
Copy Markdown
Collaborator

Scope and purpose

Fixes #. Dependent on #.

Add a description of what this PR does and why it is needed. If a linked ticket(s) fully
cover it, you can omit this.

This pull request

  • adds/changes/removes a dependency
  • changes the database
  • changes the API

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to Argus can be found in the
Development docs.

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation, including updates to the user manual if feature flow or UI is considerably changed
  • Linted/formatted the code with ruff and djLint, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See our how-to
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done
  • If this results in changes in the UI: Added screenshots of the before and after
  • If this results in changes to the database model: Updated the ER diagram

lunkwill42 and others added 7 commits October 2, 2026 08:20
* Diff test names against the PR's actual base

The test name check runs on `pull_request_target`, where the bare
`actions/checkout` lands on the default branch rather than the branch
the pull request targets. Taking the merge base from `HEAD` therefore
compares against `main` no matter what the pull request is based on,
and every commit another base branch carries that `main` lacks gets
attributed to the pull request.

Almost every Argus pull request targets `main`, so the wrong baseline
happens to be the right one and this rarely shows. It misfires on
anything based on a branch such as `alpha/2.0.x`. The identical bug in
NAV was live rather than latent, because bugfixes there routinely
target a version branch, and the check reported pre-existing tests as
new on every one of them.

Take the merge base from the pull request's own base branch instead.
The checkout is deliberately left alone, so `check_test_names.py`
keeps coming from the default branch and the job keeps working even
when a base branch predates the script.

* Document why this job must not check out PR code

`pull_request_target` gives this job a write token and access to
secrets even for pull requests from forks. That is safe only for as
long as nothing from the pull request is checked out or executed here,
which is an invariant the file states nowhere.

Adding a `ref:` to the checkout looks like an obvious correctness fix
to anyone reading the step in isolation, and would silently turn this
into a workflow that runs fork-authored code with our credentials.
Say so where someone would make the change.
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 7.0.1 to 7.0.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@043fb46...cf430e0)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [EnricoMi/publish-unit-test-result-action](https://github.com/enricomi/publish-unit-test-result-action) from 2.24.0 to 2.25.0.
- [Release notes](https://github.com/enricomi/publish-unit-test-result-action/releases)
- [Commits](EnricoMi/publish-unit-test-result-action@d0a4676...7622c5b)

---
updated-dependencies:
- dependency-name: EnricoMi/publish-unit-test-result-action
  dependency-version: 2.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Changelog](https://github.com/actions/create-github-app-token/blob/main/CHANGELOG.md)
- [Commits](actions/create-github-app-token@bcd2ba4...64ab729)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-version: 3.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
The "4 is the magic eMudhra number" release
@github-actions

Copy link
Copy Markdown

Warning

2 of 11 new test names are missing convention keywords (given/when/then/it_should)

File Test name
tests/incident/management_commands/test_create_source.py test_create_source_will_create_source_with_set_base_url
tests/incident/management_commands/test_create_source.py test_create_source_will_create_source_with_base_url_empty_string_if_not_set
Why am I seeing this?

Test names should follow a loose given/when/then pattern with keywords like given, when, then, or it_should. This is a suggestion, not a blocker. The check runs on new test methods added in this PR.

Examples:

  • test_when_no_incidents_then_returns_empty_list
  • test_it_should_create_incident_with_set_description
  • test_given_expired_token_when_refreshing_then_raises_error

@sonarqubecloud

Copy link
Copy Markdown

@jonashagstrom jonashagstrom left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants