Skip to content

GcsFileSystem should validate directories and file names for \n chars #19766

@damccorm

Description

@damccorm

Newlines are not valid characters in GCS object names (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. Original Jira may contain additional context.
Reported by: millsd@google.com.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions