Skip to content

Commit

Permalink
Stabilise order of eduGAIN ingress errors
Browse files Browse the repository at this point in the history
See ukf/ukf-meta#202.
  • Loading branch information
iay committed Nov 29, 2019
1 parent 57c8417 commit 40e2162
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 6 deletions.
21 changes: 21 additions & 0 deletions mdx/int_edugain/verbs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
-->
<import resource="classpath:uk/org/iay/incommon/mda/beans.xml"/>

<!--
Import ukf channel beans, for uk_assemble.
-->
<import resource="classpath:uk/beans.xml"/>

<!--
Import UK federation ingress policy for eduGAIN.
-->
Expand Down Expand Up @@ -179,8 +184,24 @@
<ref bean="int_edugain_productionEntities"/>
<ref bean="removeUKEntities"/>

<!--
Sort the remaining entities by entity ID, so that any errors
are reported in a stable order, even if some registrars
have unstable output.
Ideally this should be handled by an explicit ordering stage.
Lacking one, we use the fact that we can use the ordering
strategy ability of the EntitiesDescriptor assembler to
order entities, and then disassemble again. Ordering is based
on the ItemID populated into the item metadata.
-->
<ref bean="populateItemIds"/>
<ref bean="uk_assemble"/>
<ref bean="disassemble"/>

<ref bean="standardImportActions"/>
<ref bean="edugainPolicy"/>

<ref bean="warningAndErrorAnnouncer"/>
<ref bean="errorTerminator"/>
</list>
Expand Down
20 changes: 14 additions & 6 deletions mdx/uk/verbs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,15 @@
<ref bean="uk_registeredEntities"/>

<!--
The next four stages ensure that any errors are reported
The next five stages ensure that any errors are reported
in entity ID order, even on systems where the native order
(which tends to reflect the file enumeration ordering)
is arbitrary. Ideally this should be handled by an optional
ordering strategy on the announcing filter.
is arbitrary. Ideally this should be handled by an explicit
ordering stage.
The actual reordering is performed by the uk_assemble/disassemble
stages; the subsequent "populate" stages restore the item
metadata discarded by the uk_assemble stage.
-->
<ref bean="uk_assemble"/>
<ref bean="disassemble"/>
Expand Down Expand Up @@ -178,11 +182,15 @@
<ref bean="uk_registeredEntities"/>

<!--
The next four stages ensure that any errors are reported
The next five stages ensure that any errors are reported
in entity ID order, even on systems where the native order
(which tends to reflect the file enumeration ordering)
is arbitrary. Ideally this should be handled by an optional
ordering strategy on the announcing filter.
is arbitrary. Ideally this should be handled by an explicit
ordering stage.
The actual reordering is performed by the uk_assemble/disassemble
stages; the subsequent "populate" stages restore the item
metadata discarded by the uk_assemble stage.
-->
<ref bean="uk_assemble"/>
<ref bean="disassemble"/>
Expand Down

0 comments on commit 40e2162

Please sign in to comment.