GcsFileSystem should validate directories and file names for \n chars
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 4.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 196
Description
Newlines are not valid characters in GCS object names ([https://cloud.google.com/storage/docs/naming](https://cloud.google.com/storage/docs/naming)), but we don't currently validate for this. This leads to confusing errors if users accidentally include a trailing newline char on a string being passed into an IO.
The particular place where this came up was with FileIO using AvroIO.sink, where the directory passed to to() had a trailing newline, but it looks like this will be a problem generally with FileIO **** GCS.
Imported from Jira [BEAM-7932](https://issues.apache.org/jira/browse/BEAM-7932). Original Jira may contain additional context.
Reported by: millsd@google.com.
Contributor guide
Assessment
This issue has not been assessed yet.