Skip to content

Put a blank line before the first check that --migrate writes - #6

Merged
tronyx merged 2 commits into
masterfrom
develop
Nov 11, 2026
Merged

tronyx merged 2 commits into
masterfrom
develop

Conversation

@tronyx

@tronyx tronyx commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Pull Request

By submitting this pull request, I confirm that:
(Tick each box that applies, e.g. [x].)

  • I've read the contributing guide and this whole template.
  • This pull request is against develop, and makes one change. (The release: develop into master.)
  • I've documented my change in docstrings, and updated the README if needed.
  • I've added a line about my change under Unreleased in CHANGELOG.md. (Moved under this release's heading.)
  • I've tested my change and added or updated tests for it.
  • python -m ruff check ., python -m ruff format --check . and python -m mypy pass.
  • My change works on Python 3.10 and doesn't add a required package.
  • My change never shows the Organizr API key or a password, and never sends them to Healthchecks.
  • For a new application: I tested its [[check]] table with --dry-run against a real copy, and named the version below. (No new application.)
  • I'm willing to help maintain this change if problems come up later.
  • I'm giving this submission freely and claim no ownership of it.

🎯 What does this pull request do?

Merges develop into master with one fix for --migrate. The file that --migrate writes had no blank line before its first [[check]] table. That table came right after the last line of [hosts], or of an [auth.<name>] table when the Bash script used basic auth. The file loaded and worked the same, but it was harder to read. Now every table in the file follows a blank line.

🛠️ How does it do it?

  • render_migration joined the header lines and the check tables in two separate joins, so no separator came between them. It now joins them as one list.
  • A new test, test_migrated_tables_follow_a_blank_line, migrates two scripts: one whose checks come after an [auth.nagios] table, and one whose checks come right after [hosts]. It fails if any table header follows a line that is not blank. It failed on the first [[check]] in both cases before the fix.
  • __version__ is 2026-11-11, and the changelog entry is under this pull request.

Verified: on develop (82b6875), every job of the Tests workflow passed (run 43092587417): 143 tests on Python 3.10 and 3.14 on Linux and 3.14 on macOS, and ruff, ruff format, mypy and shellcheck are clean. A migration of a real Bash script with six checks now has the blank line.

📝 Documentation changes

None. The README does not describe the layout of the migrated file. The changelog has a Fixed entry under this pull request.


Note

Pull requests that don't follow this template will be closed. This project is maintained by one volunteer (me!) in my spare time, so thanks for your patience with replies.

🤖 Generated with Claude Code

tronyx and others added 2 commits November 11, 2026 14:59
render_migration joined the header lines and the check tables
separately, so the first [[check]] came right after the last
[hosts] or [auth.<name>] line. Join them in one list, so every
table follows a blank line. A test covers checks after the hosts
and after an auth table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Also sets --version to the release date, 2026-11-11.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tronyx tronyx self-assigned this Nov 11, 2026
@tronyx tronyx added bug Something isn't working enhancement New feature or request labels Nov 11, 2026
@tronyx
tronyx merged commit 3a26f0a into master Nov 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant