Skip to content

Handle missing parent org web settings without crashing import/apply#658

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-eclipse-cfm-organization-settings
Draft

Handle missing parent org web settings without crashing import/apply#658
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-eclipse-cfm-organization-settings

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 12, 2026

Import/apply for some orgs (notably eclipse-cfm) fails when several web-only org settings are absent in GitHub UI and retrieval reaches has_discussions. The current flow can raise on dependent settings when their parent setting was not retrieved.

  • Web settings retrieval hardening

    • Updated WebClient._retrieve_settings to guard parent-dependent settings lookup.
    • When a dependent setting declares parent:
      • if parent retrieval failed but was requested, skip the dependent setting (warn, continue),
      • if parent was not requested, set dependent value to None,
      • if parent exists and is False, keep existing behavior (None + continue).
  • Targeted regression coverage

    • Added focused async tests for discussions settings retrieval:
      • parent retrieval failure no longer triggers crash path,
      • omitted parent key yields {"discussion_source_repository": None} for dependent setting.

Example of the new parent guard behavior:

parent = setting_def.get("parent")
if parent is not None:
    if parent not in settings:
        if parent not in included_keys:
            settings[setting] = None
            continue
        _logger.warning(
            "failed to retrieve parent setting '%s', skipping dependent setting '%s'",
            parent, setting
        )
        continue

Copilot AI and others added 2 commits May 12, 2026 12:36
Copilot AI changed the title [WIP] Fix errors retrieving organization settings for eclipse-cfm Handle missing parent org web settings without crashing import/apply May 12, 2026
Copilot AI requested a review from mbarbero May 12, 2026 12:42
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.

Fails to retrieve several organization settings for eclipse-cfm during import and apply

2 participants