Skip to content
Success

Changes

Summary

  1. fix:  fix sync owners script (#3913) (commit: 83af5c6) (details)
Commit 83af5c646e55883da2d03f65c623fd9223ff9e21 by noreply
fix:  fix sync owners script (#3913)

This pull request introduces a bug fix and an error handling improvement
to the Prow OWNERS parser and updater scripts. The main changes ensure
that missing `OWNERS_ALIASES` files are handled gracefully and that the
updater compares the correct data structures when determining changes.

Error handling improvements:

* The `RepoOwnersParser` class's `OwnersAliases` method now catches
"file not found" (404) errors when loading `OWNERS_ALIASES`, returning
an empty aliases object instead of throwing an error. This prevents
failures when the aliases file is missing.

Bug fixes in updater logic:

* In the `RepoUpdater` class, the comparison logic for root owners and
aliases now correctly uses the current repository's data
(`curRepoProwOwners`) instead of the merged data
(`mergedRepoProwOwners`) to determine if updates are needed, ensuring
accurate detection of changes.
(commit: 83af5c6)
The file was modifiedscripts/pingcap/community/prow-owners-parser.ts (diff)
The file was modifiedscripts/pingcap/community/prow-owners-updater.ts (diff)