diff --git a/src/lightning_app/storage/drive.py b/src/lightning_app/storage/drive.py index f72ad38b6e..d413e93bb9 100644 --- a/src/lightning_app/storage/drive.py +++ b/src/lightning_app/storage/drive.py @@ -260,6 +260,9 @@ class Drive: def _collect_component_names(self) -> List[str]: sep = "/" if self.fs.exists(self.drive_root): + # Invalidate cache before running ls in case new directories have been added + # TODO: Re-evaluate this - may lead to performance issues + self.fs.invalidate_cache() return [str(p.split(sep)[-1]) for p in self.fs.ls(self.drive_root)] return []