Skip to content

feat(roadmap): the roadmap service posts each release cut, ship and start to mattermost's releases channel #1394

Closed as not planned

Description

@dan-petty

Refreshed plan (2026-10-17, unblocking review)

This section supersedes any text below that conflicts with it.

Decisions

Scope

Delivery

  1. One PR, M, after feat(k8s): mattermost team edition runs under argo cd from the mattermost operator, on a cloudnativepg database and a protected volume, at https://mattermost.<domain> through the tunnel #1391 merges: settings, Secret entry, notifier and posted-once state, the close job's cut report, egress policy and perimeter peer, tests, guide step and fragment. Its body says Fixes #1394.

Acceptance criteria (these replace the matching criteria below; every other criterion, including the masked hook URL, the 10 s timeout, the one WARNING per failure and the unchanged devops-default-perimeter, stands)

  • devops serve --service builds the notifier from settings and binds it into the release lane's job only (the CONST_SERVICE_LANE_RELEASE entry of SERVICE_JOBS). The model lane, devops roadmap run, close and reprioritize pass none, and their --plan and --dry-run output doesn't change.
  • After the round's writes, run_due_jobs hands the notifier the round's RELEASE_CUT, RELEASE_UNCUT and RELEASE_SHIPPED changes and each succeeded job's outcome, also when another job in the round failed: _execute_due_rows raises RoadmapRunError after its loop (run.py:910-915), and a start must not go unposted because metrics failed after reprioritize.
  • JobOutcome gains the version the close job cut and its release pull request's URL. _run_close_adapter fills them from its cut callback (planned.version, run.py:519-520) and the URL cut_release now returns. The cut post comes from this for the Service's own cut and from the poll's RELEASE_CUT for anyone else's, under one posted-once key (repository, cut, version). A test runs a round whose close job cuts a release and sees one cut post, beside the test whose store fake provides another actor's cut.
  • JobOutcome gains the started release's version, milestone number and item count. _run_reprioritize_adapter fills them from the applied plan's starting, numbers and size (the started release's size, since record is starting then), and leaves them empty when nothing starts; a dry run never calls it (run.py:962-963). numbers is read before the run's writes (reprioritize.py:2283), so when the same run creates the starting release's milestone (:1954-1968) the milestone number stays empty and the post gives the version and count without a milestone link.
  • The production client is get_shared_client(<key>, EgressLevel.PRIVATE), and no validate_url_egress call precedes the post.
  • The posted-once state is a file beside schedule.json in the repository's data directory, never process memory.
  • Tests pass an httpx2 MockTransport through the notifier's client seam. No test patches a devops-cli name (test(cli): tests double only process edges and mirror the source tree #1307), and none reaches the network.
  • replicas: 0 in k8s/devops/roadmap-service/deployment.yaml:12 and its assertion (tests/test_k8s_roadmap_service.py:49, expecting 0 at :61) are unchanged (D1).
  • Pending a person: checks (a)-(c) below, unchanged, once feat(k8s): mattermost team edition runs under argo cd from the mattermost operator, on a cloudnativepg database and a protected volume, at https://mattermost.<domain> through the tunnel #1391 is deployed and the Service runs again after the D2 identity item or a reinstatement.

Current references (checked at main 3dd7fa6; the body's lines have moved)

  • JobOutcome src/devops_cli/roadmap/run.py:115 (body :70-82); _run_close_adapter :483 (body :349-397), whose cut callback calls cut_release at :519-528; _run_reprioritize_adapter :546, which returns JobOutcome(changes=...) at :577.
  • cut_release moved to src/devops_cli/release/cut.py:1024 and still returns None (:1036); _execute_release_pr reads the pull request's URL at :1001 and drops it.
  • Release lane: RELEASE_LANE_ROWS src/devops_cli/roadmap/run.py:657, _current_actor :245-250, _fetch_filtered_changes :794-807, _execute_due_rows raising at :910-915, run_due_jobs :919 with its dry run at :962-963, service_job :1017, SERVICE_JOBS :1035-1042, wired by src/devops_cli/commands/serve.py:142-154.
  • Change kinds: src/devops_cli/roadmap/store.py:127-139; src/devops_cli/roadmap/github_store.py:465-467 (cut, naming its opener; uncut, naming no one), :2451 (shipped, naming no one) and the actor filter at :1518; src/devops_cli/roadmap/memory_store.py:391 (an attributed cut), :421, :434. RELEASE_STARTED is gone (fix(roadmap): a shipped release starts the next one without a person: the poll reports the ship, and close and reprioritize run before a capped intake batch #1360).
  • Start data: ReprioritizationPlan src/devops_cli/roadmap/reprioritize.py:918, with starting :943, size :956 and numbers :957; starting and size are set at :2112 and :2125, and numbers at :2283 (_reconcile).
  • ServiceConfig src/devops_cli/config/settings.py:633 (body :624-630); _warn_missing_secrets src/devops_cli/server/service.py:436-444 (body :343-351), called at :514.
  • Option tables: src/devops_cli/config/options.py:228 (SECRET_CONFIG_OPTIONS) and :246 (KEYRING_KEYS), src/devops_cli/config/env.py:109 (OPTION_TO_ENV_VAR). The devops/devops-cli row is src/devops_cli/k8s/cluster_secrets.py:223-248, restarting roadmap-service at :246.
  • Egress: src/devops_cli/http/egress.py:50-51 and :61-72; get_shared_client src/devops_cli/http/pool.py:54; precedent src/devops_cli/k8s/service_http.py:61-65.
  • Job counter name: src/devops_cli/config/constants.py:1060.
  • Network: k8s/devops/networkpolicy.yaml:10, :25-33 and :44-55 are unchanged. k8s/devops/roadmap-service/networkpolicy.yaml holds only roadmap-service-ingress today; it is listed at src/devops_cli/commands/k8s/stack_lifecycle.py:202 and k8s/devops/roadmap-service/kustomization.yaml:6. TARGET_NAMESPACES is tests/test_k8s_network_policies.py:34.
  • Rules: one-line output is AGENTS.md:187 (body :440); the body's AGENTS.md:232-233 no longer exist (the file has 220 lines). The suspension rules are AGENTS.md:147-151. The guide's section is k8s/README.md:361, with its suspension note at :363.

Dependencies and order


Problem

Checked on 2026-10-08: release/v0.2.29 at 910b823.

Acceptance criteria

  • Settings.
  • The Secret's entry.
    • devops/devops-cli gains DEVOPS_CLI_MATTERMOST_RELEASES_HOOK, from that option.
    • It is optional: if the keyring lacks it, the push skips it with a warning.
    • It restarts roadmap-service, as the row already does.
  • Events. Each event gets one post, which names the repository, the version and a link:
  • Only the Service posts.
    • The Service passes a notifier to service_job. After a round's jobs, run_due_jobs hands it the release changes the round read and each job's outcome. A CLI run passes none.
    • So devops roadmap run, close and reprioritize never post, and their --plan and --dry-run output doesn't change.
  • Posted once.
    • The Service records each posted (repository, event, version) in its state on the roadmap-service-home volume, beside the job schedule.
    • A restart, a repeated report from overlapping poll windows, or a second round posts nothing new.
  • A post never fails a job.
    • It is sent after the round's writes, through get_shared_client, with validate_url_egress(..., allow_private=True) as in src/devops_cli/k8s/service_http.py:62-66, and a 10 s timeout.
    • An error or a non-2xx reply logs one WARNING with the status. The log never shows the hook key: the URL is masked.
    • Each attempt is counted in devops_cli_service_notifications_total, with result="success" or result="error".
    • The round's own result and devops_cli_service_jobs_total don't change.
  • Path, for the Service's pods only.
    • k8s/devops/roadmap-service/networkpolicy.yaml gains a NetworkPolicy, roadmap-service-egress-mattermost, that selects app.kubernetes.io/name: roadmap-service and allows egress to namespace mattermost on TCP 8065, as a namespace-only peer with ports: (k8s/devops/networkpolicy.yaml:25-33). devops-default-perimeter is unchanged, so Jobs still can't reach Mattermost.
    • The mattermost perimeter admits only roadmap-service's pods on 8065: one peer with namespace devops and pod label app.kubernetes.io/name: roadmap-service.
    • The file is already listed in _MANIFESTS_BY_STACK and the devops kustomization. tests/test_k8s_network_policies.py asserts both rules, and that the new policy selects no pod of the CronJob.
  • Tests.
    • An httpx MockTransport is passed through the notifier's seam. No test patches a devops-cli name (test(cli): tests double only process edges and mirror the source tree #1307).
    • The store's fakes provide a cut, an uncut and a ship as changes. The start comes from a faked reprioritize outcome.
    • A second round with the same changes, and a restart over the same state file, post nothing.
    • No test reaches the network.
    • Each call phase stays under 1 s, as uv run pytest tests/test_roadmap_run.py tests/test_server_service.py tests/test_k8s_push_secrets.py tests/test_k8s_network_policies.py --durations=0 shows.
  • Guide. The "Roadmap service" steps in k8s/README.md gain a step for the hook: create it for releases with "Lock to this channel" ticked, store its key, and push.
  • A changelog.d/<n>.md fragment goes under ### Added. CHANGELOG.md and docs/ROADMAP.md are untouched, and uv run devops pr check-readiness passes.
  • uv run devops ci passes within its 5-minute budget.

Pending a person, after merge, after #1391 and once the Service runs a release with this item:

  • (a) Create the releases hook, locked to its channel. Run uv run devops config set mattermost.releases_hook, then uv run devops k8s push-secrets --only devops/devops-cli --context <context>. The Service's startup log has no notifications warning.
  • (b) The next cut, ship and start each post once in releases, and devops_cli_service_notifications_total{result="success"} rises by three.
  • (c) Run kubectl -n devops rollout restart deploy/roadmap-service right after a post. The post isn't repeated.

Key questions

Strategic alignment

Update 2026-10-08: refinement

#1360 landed, so the dependency is met. Folded from the audit comment: the notifier takes a factory client at EgressLevel.PRIVATE (http/client.py:142), the validate_url_egress pre-flight goes, and tests use an httpx2 MockTransport. Open for the owner: PRIVATE (proposed) or configured_level().

Activity

  1. added
    type/feature
    scope/k8s
    scope/release
    on Oct 8, 2026
  2. dan-petty-bot commented on Oct 8, 2026

    @dan-petty-bot
    Collaborator

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Priority: P2-Medium. It improves team visibility into release lifecycle events but does not block any core functionality; releases still cut, ship, and start without it.
    • Value: Medium. Team members gain timely awareness of release transitions, reducing the gap where a ship or start goes unnoticed, but the system remains fully operational without it.
    • Effort: Medium. Requires new settings, a notifier integration, handling of four distinct event types, network-policy egress changes, and wiring through JobOutcome and reprioritize.
  3. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    From the 2026-10-08 client-library audit (checked at release/v0.2.29, 05e9388).

    Client. Since #898, the notifier should take a factory client at EgressLevel.PRIVATE, through get_shared_client(<key>, EgressLevel.PRIVATE) or new_http_client(level=EgressLevel.PRIVATE). That checks the address at the connect and on every redirect, so the body's validate_url_egress(..., allow_private=True) pre-flight goes.

    Test fake. It should be an httpx2 MockTransport, not an httpx one: the factory builds httpx2 clients.

    No SDK. The decision stands. mattermostdriver's last release is 7.3.2 (2022-01-21), it is built on requests, and Mattermost publishes no official Python client. One JSON POST through the factory client is the conventional fix.

    Key question for the owner: EgressLevel.PRIVATE, or configured_level()?

    Found by the 2026-10-08 client-library audit.

  4. added
    status/blocked
    on Oct 11, 2026
  5. dan-petty commented on Oct 11, 2026

    @dan-petty
    OwnerAuthor

    Blocked by #1562: the roadmap Service's machine account is suspended, and the Service is held at 0 replicas. This item develops the Service or can only be checked on it, so it waits until the account is reinstated or the jobs act as a GitHub App.


    Generated by Claude Code

  6. dan-petty commented on Oct 23, 2026

    @dan-petty
    OwnerAuthor

    Not planned: #1952 deletes the release cut, ship and start states that this would post. File a new item if you want a post for each published GitHub Release.

  7. removed
    status/blocked
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope/k8sscope/releasetype/feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions