Skip to content

Conversation

@jonasbardino
Copy link
Contributor

@jonasbardino jonasbardino commented Nov 2, 2025

Rework refresh_vgrid_map in order to init all vgrid entries in VGRIDS early and to never skip init of the individual fields in those vgrid dicts, even if the source file for the corresponding field (like owners or members) is older than the map timestamp of the current vgrid map file. That should address a potential race when vgrids are modified during long-running refresh calls and any other causes for those fields missing in the existing map.
Extend the same idea to cover the RESOURCES and USERS update in the same function to make sure all parts of the vgrid map get properly initialized in such corner cases.

Remove an unused leftover variable in check_vgrid_access while at it.

These issues were discovered during unit test implementation in PR #372 and appears to be the source of the spurious CI failures about missing vgrid map __owners__ in that PR e.g. seen in
https://github.com/ucphhpc/migrid-sync/actions/runs/19012212737/job/54294834829?pr=372
Similarly the extension to also cover RESOURCES and USERS appears to address the spurious CI failures about the RESOURCES part of the vgrid map sometimes incorrectly left empty e.g. in
https://github.com/ucphhpc/migrid-sync/actions/runs/19012954138/job/54296573680?pr=372#step:6:126

Especially the former may also be involved in issue #121 where similar mechanics could explain the intermittent loss of owner access.

@jonasbardino jonasbardino self-assigned this Nov 2, 2025
@jonasbardino jonasbardino added the bug Something isn't working label Nov 2, 2025
jonasbardino added a commit that referenced this pull request Nov 2, 2025
speculated in that PR description. We would prefer to avoid mixing them up in
this test-only PR but unfortunately I'm completely unable to trigger similar
failures locally. So if it solves the problems I'll merge PR #380 and rebase
this one on it before merge to keep them apart.
@jonasbardino jonasbardino marked this pull request as ready for review November 2, 2025 13:38
jonasbardino added a commit that referenced this pull request Nov 2, 2025
…may in

fact have fixed the spurious `OWNERS` errors in CI unit tests.
Extend the vgridaccess fix from PR #380 to apply similar fixes in the the
`RESOURCES` and `USER` update loop of refresh_vgrid_map.
…IDS` early

and to never skip init of the individual fields in those vgrid dicts, even if
the source file for the corresponding field (like `owners` or `members`) is
older than the map timestamp of the current vgrid map file. That should address
a potential race when vgrids are modified during long-running refresh calls and
any other causes for those fields missing in the existing map.

Remove an unused leftover variable in check_vgrid_access.
…vgrid_map`

as recently introduced for the `VGRIDS` update there. It appears to also solve
the last remaining spurious test errors in CI for PR #372.
@jonasbardino jonasbardino force-pushed the fix/corner-case-missing-init-of-vgrid-map-vgrid-fields branch from 0ff96bd to e0da484 Compare November 12, 2025 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants