You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Feature. Invalid folders shouldn't be a fatal error, they should just be ignored.
Describe the solution you'd like
Invalid folders are ignored, and the program can continue.
Describe alternatives you've considered
I could have nagged the folder owner to change the folder's title.
Additional context
This diff allowed me to backup a valid folder (despite the invalid folder existing).
diff --git a/internal/service/folders.go b/internal/service/folders.go
index b8421cf..3f63435 100644
--- a/internal/service/folders.go
+++ b/internal/service/folders.go
@@ -206,7 +206,7 @@ func (s *DashNGoImpl) ListFolders(filter filters.Filter) []*types.FolderDetails
for ndx, val := range folderListing {
valid := s.checkFolderName(val.Title)
if !valid {
- log.Fatalf("Folder has an invalid character and is not supported. Path separators are not allowed. folderName: %s", val.Title)
+ log.Printf("Folder has an invalid character and is not supported. Path separators are not allowed. folderName: %s", val.Title)
}
filterValue := val.Title
var nestedVal string
The text was updated successfully, but these errors were encountered:
Hmm, this has other implications. The last version added support for nested folders which has become a standard feature available in grafana now. So Ignoring the folder also affects all potential dashboards within that folder. It also impacts the dashboards.
The issue with the 'warning', is that there's folks that run GDG in a crontab or as kubenetes job, in which case nobody is really actively reading the logs as it's just expected to work. When an operation is potentially dropping an entire folder and all its content from being backed up. I think the fatal error is correct.
We could potentially introduce a configuration option to allow this but I definitely don't think it should be the default behavior. The special chars that are checked for intentionally because they have an impact on other features of GDG besides just the folder names.
Is your feature request related to a problem? Please describe.
Feature. Invalid folders shouldn't be a fatal error, they should just be ignored.
Describe the solution you'd like
Invalid folders are ignored, and the program can continue.
Describe alternatives you've considered
I could have nagged the folder owner to change the folder's title.
Additional context
This diff allowed me to backup a valid folder (despite the invalid folder existing).
The text was updated successfully, but these errors were encountered: