Skip to content

Run profile partition is stored but never used by connectors #353

@JayVDZ

Description

@JayVDZ

Problem

The run profile Partition field exists in the model and UI but is not actually consumed by any connector during import/export operations. This was discovered when integration tests (which create run profiles without specifying a partition) worked perfectly for LDAP connectors that support partitions.

Current Behaviour

  • The LDAP connector (and likely all connectors) ignores the run profile's partition entirely
  • Instead, imports iterate over _connectedSystem.Partitions.Where(p => p.Selected) — using the connected system's selected partitions
  • The API and application layer do not validate that a partition is specified for connectors that support partitions
  • The UI shows a partition selector and marks it as required, but the selected value has no effect at runtime

Required Changes

  1. API validation: The API should enforce a partition selection when creating run profiles for connectors that support partitions
  2. Connector behaviour: Connectors that support partitions should use the run profile's partition to determine what partition to perform connected system operations against, rather than using the current _connectedSystem.Partitions.Where(p => p.Selected) approach
  3. Integration tests: All integration test scenarios that create run profiles will need updating to specify a partition (e.g. Scenario 2, Scenario 8, and any others using New-JIMRunProfile for partition-supporting connectors)

Affected Files

  • src/JIM.Application/Servers/ConnectedSystemServer.csIsRunProfileValid() needs partition validation
  • src/JIM.Connectors/LDAP/LdapConnectorImport.cs — uses _connectedSystem.Partitions.Where(p => p.Selected) instead of runProfile.Partition
  • src/JIM.Models/Interfaces/IConnectorImportUsingCalls.cs — run profile is already passed to ImportAsync()
  • src/JIM.Web/Controllers/Api/ — API endpoint validation
  • test/integration/Setup-Scenario2.ps1 — run profile creation
  • test/integration/Setup-Scenario8.ps1 — run profile creation

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions