This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore some errors during manifest loading
When loading manifests, we attempt to walk the base file tree twice. Once while looking for directories with Helm charts in them, and then to load all the .yaml/.yml files. The former keeps track of those directories to exclude them while doing the latter since we do not want to load yamels from directories with Helm charts in them. While walking those file trees any error aborted the whole loading process and as a consequence, the API calls `ListServices` and `ListImages` would return an error. Suddenly disappearing files such as Git's gc lock file would trigger an error. Since the Git repo is cloned before manifests are loaded, there was a race sometimes between having that lock file being enumerated but then disappear while trying to retrieve information about it. This PR ignores all errors while enumerating the Helm chart directories since permissions are unlikely to change, and disappearing files do not modify the list of excluded directories. When walking the yamels afterwards, only errors for files or directories that we actually care about will be reported. That means any error for files that do not have a yamel extension will be just ignored.
- Loading branch information
Showing
2 changed files
with
44 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters