Skip to content

fix: use neutral service-info defaults - #160

Merged
uniqueg merged 1 commit into
devfrom
fix/neutral-service-info
Oct 21, 2026
Merged

uniqueg merged 1 commit into
devfrom
fix/neutral-service-info

Conversation

@uniqueg

@uniqueg uniqueg commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Since #144, deployments that keep the default service info present themselves as ELIXIR On-Cloud's registry, with its contact address. This PR replaces those defaults with neutral placeholders.

  • config.yaml: id: org.example.cloud-registry, organization "Example Organization" at https://example.org (RFC 2606 example domains), and no contactUrl. name ("Cloud Registry") and the generic description stay.
  • Startup warning (warn_placeholder_service_info() in cloud_registry/app.py): logged while id is the placeholder, or while the organization's name or URL is. It names the fields to set. Docker Compose keeps the placeholders, so the warning is expected there; nothing else changes.
  • Docs: configuration page, chart README and the values.yaml example. The example's organization URL no longer equals the placeholder, so copying it doesn't trigger the warning. In the 0.3.0 release notes, the entry from docs: present app generally, use ELIXIR On-Cloud #144 is replaced, and the upgrade step names the previous id to keep.

Closes #148

Light lane: the PR changes default values and docs and adds a trivial startup warning with tests, so the reviewer subagents are skipped (I reviewed the diff myself), per the user's rule.

Verification

  • coverage run --source=cloud_registry -m pytest -p no:warnings (with Helm): 759 passed; coverage 100%
  • ruff check ., ruff format --check ., mypy: pass; mkdocs build --strict: pass
  • CI: all checks pass (incl. codecov patch/project, Docker Compose smoke test, Read the Docs)
  • git grep finds no ELIXIR On-Cloud identity (cloud.elixir-on, elixir-on.cloud/, cloud-service@) in cloud_registry/, config.dev.yaml or deployment/
  • Tests: the warning appears with the placeholders (and with partial overrides, naming the remaining fields) and doesn't appear with deployment values; the base config has the placeholders and no contactUrl.

Declined review findings

  • Sourcery: keep the 0.3.0 notes' old defaults "historically accurate". Declined: 0.3.0 is unreleased, and these are its draft notes; the ELIXIR On-Cloud defaults only ever existed on dev.

Open questions

None.

🤖 Generated with Claude Code

The default service info named ELIXIR On-Cloud, so deployments that kept
it presented themselves as its registry, with its contact address. Use
placeholders with reserved example domains (RFC 2606) instead: id
org.example.cloud-registry, organization Example Organization at
https://example.org, and no contactUrl. The app logs a warning on
startup while id or organization are the placeholders, naming the
fields to set.

Update the configuration page, the chart README and values example, and
the 0.3.0 release notes (new defaults, previous id to keep).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

The PR neutralizes the default service identity and adds a startup warning for deployments that retain placeholder service information, with corresponding Helm/configuration documentation and comprehensive tests.

Sequence diagram for placeholder service-info startup warning

sequenceDiagram
    participant App
    participant Config as get_config()
    participant Logger
    App->>Config: get_config()
    Config-->>App: service_info.service
    App->>App: warn_placeholder_service_info()
    alt placeholder id or organization value
        App->>Logger: warning(fields to set)
    else deployment values configured
        App-->>App: no warning
    end
Loading

Flow diagram for neutral service-info configuration

flowchart TD
    Defaults["Neutral defaults: org.example.cloud-registry and Example Organization"] --> Configure["Deployment sets service_info.service fields"]
    Configure --> Check{"Placeholder id or organization name/URL?"}
    Check -->|Yes| Warning["Log startup warning"]
    Check -->|No| Start["Start with deployment service identity"]
Loading

File-Level Changes

Change Details Files
Replace real organization defaults with neutral RFC 2606 placeholders and document deployment overrides.
  • Set neutral id and organization values and remove the default contact address.
  • Update configuration, Helm, and release documentation, including the migration identifier and non-triggering chart example.
  • Add tests verifying placeholder defaults and absence of legacy identity.
cloud_registry/config.yaml
deployment/README.md
deployment/values.yaml
docs/configuration.md
docs/releases/0.3.0.md
tests/test_config.py
Warn at application startup when placeholder service information remains configured.
  • Detect placeholder id and organization name or URL within the app context.
  • Log one warning listing the fields that still need deployment-specific values.
  • Invoke the check during app creation alongside existing startup checks.
  • Cover default, partial override, and fully customized service-info behavior.
cloud_registry/app.py
tests/test_app.py

Assessment against linked issues

Issue Objective Addressed Explanation
#148 Replace the app’s ELIXIR On-Cloud service-info defaults with neutral RFC 2606 example placeholders, preserving the generic name and description and removing the default contact URL. ✅
#148 Warn at startup when the placeholder ID or organization values remain, identify the fields that need setting, and test both placeholder and deployment configurations. ✅
#148 Update deployment guidance and 0.3.0 release notes to explain the required service-info settings, new defaults, and the upgrade step for retaining the previous ID. ✅

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (b985128) to head (ab53f3d).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #160   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          770       785   +15     
=========================================
+ Hits           770       785   +15     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uniqueg
uniqueg marked this pull request as ready for review October 21, 2026 21:36

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="docs/releases/0.3.0.md" line_range="134-141" />
<code_context>
-  `ELIXIR_CLOUD`), `organization.url` is `https://elixir-on.cloud/` and
-  `contactUrl` is `mailto:[email protected]`, with a new
-  `description`. Deployments set their own (`service_info.service`).
+- The default service info describes the app, not a deployment, with
+  placeholders using reserved example domains (RFC 2606): `id` is
+  `org.example.cloud-registry` (was `ELIXIR_CLOUD_SERVICE_REGISTRY_1`),
+  `organization` is `Example Organization` at `https://example.org`, there
+  is no `contactUrl`, `name` is `Cloud Registry` (was `ELIXIR_CLOUD`), with a
+  new `description`. Deployments set their own (`service_info.service`); the
+  app logs a warning on startup while `id` or `organization` are the
+  placeholders.
 - `custom.endpoints.service.api_path` is now a path prefix in front of the
   API base path (e.g., of a reverse proxy), not the API base path itself.
</code_context>
<issue_to_address>
**0.3.0 release notes misstate defaults**

When a reader consults the 0.3.0 release notes to configure or upgrade that release, the entry presents the placeholders and absence of `contactUrl` as the defaults of the 0.3.0 release, whose attached chart and config instead used the ELIXIR On-Cloud identity and contact address. Readers installing that release get inaccurate upgrade guidance.

Keep the 0.3.0 defaults historically accurate and document this change separately, or clearly label the updated defaults as applying to a later version.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: docs/releases/0.3.0.md:141


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread docs/releases/0.3.0.md Resolved
@uniqueg
uniqueg merged commit e259e77 into dev Oct 21, 2026
12 checks passed
@uniqueg
uniqueg deleted the fix/neutral-service-info branch October 21, 2026 21:40
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.

fix: use neutral service-info defaults

1 participant