Skip to content

refactor(docker): container workflow and docs#1027

Merged
accius merged 14 commits into
accius:Stagingfrom
lbatalha:container-workflow-refactor
May 31, 2026
Merged

refactor(docker): container workflow and docs#1027
accius merged 14 commits into
accius:Stagingfrom
lbatalha:container-workflow-refactor

Conversation

@lbatalha
Copy link
Copy Markdown
Collaborator

@lbatalha lbatalha commented May 28, 2026

What does this PR do?

  • Refactor docker workflows to be able to run on forks, and additionally trigger on push for any branch and in PRs to Staging/Master (this allows easy testing of workflow changes, as well as letting people pull container images with future PRs/changes for ease of testing/deployment
  • Add docker workflows for iturhfprop and dxspider-proxy microservices
  • Refactor docker documentation to have a more centralized location in docs/ as well as add references to the new container images that will be available with the new workflows (so it is no longer necessary for people to clone the repo to build these microservices)
  • BONUS 🌟: workflows as they are would break June 2nd 2026 due to github deprecating Node 20 in the action runners - all the actions we are using have versions which still use Node 20, so a separate PR should be created to update the non-docker workflows preemptively. I have submitted fix(actions): update github actions to node24-based versions #1028 with the remaining fixes.

Type of change

  • Bug fix
  • New feature
  • Performance improvement
  • Refactor / code cleanup
  • Documentation
  • Translation
  • Map layer plugin

How to test

  1. Check that workflows are being triggered as expected
  2. check the packages page for the repo @ https://github.com/accius/openhamclock/packages) for correct artifact creation
  3. Review the documentation changes, I did my best to have a unified way of documenting docker stuff, but also dont want to completely reorganize the overall repo structure.

accius and others added 11 commits May 6, 2026 23:38
Release v26.3.1 — Staging → main
Hotfix: guard PropagationPanel against empty/invalid timeZone (RangeError on first load)
…g_line787

[Hotfix main] bug fix spelling of console.debug
Release v26.3.2 — pre-Hamvention drop (MeshCom + VOACAP hotfix)
whatsnew(26.3.2): correct MeshCom contributor attribution
Cuts Staging into main for the v26.3.3 release.
…ction

The socket idle timeout (60s) was the shortest of all failure timers, so
any 60s gap between spots — normal on quiet bands overnight — tore down a
healthy connection. Keepalive (120s) was too slow to prevent it and the
180s activity watchdog (the graceful node-failover) never got to run.

- socket timeout 60s -> 300s, as a last-resort TCP backstop; the 180s
  activity watchdog now owns failover as designed
- keepalive 120s -> 60s so the connection stays warm
- destroy the socket in the 'timeout' handler — Node does not auto-close
  on timeout, leaving a zombie socket that kept feeding data and
  spuriously reset the failover counter after [RECONNECT]
- mark authenticated on first spot; the DXSpider prompt has no trailing
  newline so prompt-based detection never matched, and sh/dx output lines
  ("...de Helmut<DF4IY>") false-matched the prompt regex

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…uth detection"

This reverts commit e95faf6. The proxy fix was cherry-picked to main
prematurely. It will be validated on Staging first and reach main on the
normal release schedule. The fix remains intact on Staging (e7826d9).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lbatalha lbatalha requested a review from accius May 28, 2026 15:50
Signed-off-by: Laura Batalha <5883822+lbatalha@users.noreply.github.com>
@lbatalha lbatalha changed the title Container workflow refactor refactor(docker): container workflow refactor May 28, 2026
@lbatalha lbatalha changed the title refactor(docker): container workflow refactor refactor(docker): container workflow and docs May 28, 2026
@lbatalha
Copy link
Copy Markdown
Collaborator Author

The workflows are failing due to installation not allowed to Write organization package - I think that when using $GITHUB_TOKEN for authorizing the actions you need to manually add the write permissions for each workflow in https://github.com/accius/openhamclock/settings/actions or so?
Since they all have new names, they probably need checking.

Copy link
Copy Markdown
Owner

@accius accius left a comment

Choose a reason for hiding this comment

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

Thanks for the writeup, and good catch on the Node 20 thing. I would've completely missed that until something blew up in June.

Went down a bit of a rabbit hole on these failing checks and I don't actually think it's the Actions settings. Pulled the logs and all three new workflows die at the same spot:

denied: installation not allowed to Write organization package

Which sounds like a perms issue but the existing OHC docker push has been happily shipping from Staging for ages under those same settings, so something else is going on. I'm pretty sure it's that this PR is from a fork, and GitHub hard-caps GITHUB_TOKEN to read-only on pull_request events from forks no matter what you put in permissions:. It's a security thing on their end. Basically prevents a random fork from opening a PR that smuggles secrets out via a malicious Dockerfile. Annoying, but I get why they do it.

Long story short, flipping repo or package settings won't unblock fork PRs. The fix has to live in the workflow itself.

What I'd do is let fork PRs still build (so the Dockerfile gets validated) but skip the push and attestation steps. Something like:

- name: Build and push Docker image
  id: push
  uses: docker/build-push-action@v7
  with:
    push: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
    # rest stays the same

And the attestation step needs the same guard (it wants id-token: write which fork PRs also can't have):

- name: Generate artifact attestation
  if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
  uses: actions/attest-build-provenance@v4
  # ...

That gets you basically everything you were going for. Same-repo branches, same-repo PRs, pushes, and releases all still publish images, and fork PRs just quietly build-only instead of red-X'ing the whole PR. If an external contributor really wants a test image they can still push from their own fork, it just lands at ghcr.io/<their-user>/openhamclock, which is honestly probably what you want anyway.

Once that's in I think the checks should clear and we can get this merged. And yeah, I'll spin up a separate issue for the Node 20 upgrade so we don't lose track of it before the deadline.

@lbatalha
Copy link
Copy Markdown
Collaborator Author

lbatalha commented May 28, 2026

I suppose that works. Doesnt seem like its something that can be worked around while using GITHUB_TOKEN. Seems like most projects that configure it this way just setup a github app which you can use to run workflows instead.

@accius accius merged commit 66ca226 into accius:Staging May 31, 2026
8 checks passed
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.

2 participants