Skip to content

BUG: email links hard-code the nonprod instance; document that the prod environment name has meaning #222

Closed

Description

@ephico2real2

Defect

The email channel builds its portal links with the instance name hard-coded as nonprod:

  • cmapi/src/cmapi/core/channels.py:44: f"{self.portal_url}/#nonprod/approvals?request=...&link=..."
  • cmapi/src/cmapi/core/channels.py:77: f"Follow it: {self.portal_url}/#nonprod/requests?request=..."

An approval or decision email sent by any other instance (the owner's plan has two instances, nonprod and prod; see #215) links to the nonprod view.

Fix

Build the link from the running instance's name (the configuration that answers instance in the API), not a literal. Test: an EmailChannel for instance prod produces #prod/approvals... and #prod/requests...; the test fails on today's code.

Also record (not a defect)

The owner (2026-11-14): instance names and the environments each serves are the owner's choice; cmapi must not care what they are called. One environment name has meaning in code today: prod (no expiry: core/config.py:108, core/render/manifests.py:90, plugins/expiration/rules.py:87; prod-only Kyverno policies: core/validate/__init__.py:84). Write that rule in docs/02 and in the instance configuration's comments, and research whether "which environments are production" should be a configuration value (for example production: [prod]) instead of the literal name. Recommend; do not change behaviour without recording it.

Activity

  1. added
    bug
    status:open
    sev:low
    Backlog
    on Nov 14, 2026
  2. added 3 commits that reference this issue on Nov 14, 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

    Backlogbugsev:lowstatus:open

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions