Skip to content

Fix PolicySet --prereqs import to create missing resource types before PolicySet import#578

Merged
vscheuber merged 2 commits into
mainfrom
copilot/fix-importing-policyset-prerequisites
Apr 21, 2026
Merged

Fix PolicySet --prereqs import to create missing resource types before PolicySet import#578
vscheuber merged 2 commits into
mainfrom
copilot/fix-importing-policyset-prerequisites

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 21, 2026

authz set import --prereqs could fail with “Resource Type ... does not exist” because PolicySet prerequisite handling attempted a direct resource-type update path that assumes prior existence. This prevented importing a PolicySet + ResourceType bundle in one operation.

  • Prerequisite import behavior

    • Updated PolicySet prerequisite handling in PolicySetOps to use the resource-type import flow (importResourceType) rather than a direct API putResourceType call.
    • This aligns PolicySet prereq import with create-or-update semantics for resource types, so missing resource types are created before PolicySet creation/update.
  • Scope

    • Change is intentionally narrow: only the PolicySet prerequisite import path was adjusted.
    • No changes to export format or PolicySet dependency import semantics.
  • Illustrative diff

    // before
    await putResourceType({
      resourceTypeUuid,
      resourceTypeData: exportData.resourcetype[resourceTypeUuid],
      state,
    });
    
    // after
    await importResourceType({
      resourceTypeUuid,
      importData: exportData,
      state,
    });

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • openam-frodo-dev.classic.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/frodo-lib/frodo-lib/node_modules/jest-worker/build/processChild.js (dns block)
  • openam-frodo-dev.forgeblocks.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/frodo-lib/frodo-lib/node_modules/jest-worker/build/processChild.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI linked an issue Apr 21, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix importing PolicySet with prerequisites failure Fix PolicySet --prereqs import to create missing resource types before PolicySet import Apr 21, 2026
Copilot AI requested a review from vscheuber April 21, 2026 19:26
@vscheuber vscheuber marked this pull request as ready for review April 21, 2026 20:29
@vscheuber vscheuber merged commit 3bd590c into main Apr 21, 2026
7 checks passed
vscheuber added a commit to vscheuber/frodo-lib that referenced this pull request Apr 25, 2026
…ore PolicySet import (rockcarver#578)

* Initial plan

* fix(policyset): import resource type prereqs via resource type import flow

Agent-Logs-Url: https://github.com/rockcarver/frodo-lib/sessions/17ba7543-91b6-40c9-bb2a-543ec5255d01

Co-authored-by: vscheuber <28791378+vscheuber@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: vscheuber <28791378+vscheuber@users.noreply.github.com>
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.

Importing PolicySet with prerequisites fails

2 participants