kberezin-nshl commented on code in PR #32178:
URL: https://github.com/apache/beam/pull/32178#discussion_r1728869765


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java:
##########
@@ -574,11 +574,12 @@ public class BigQueryIO {
   static final JsonFactory JSON_FACTORY = Transport.getJsonFactory();
 
   /**
-   * Project IDs must contain 6-63 lowercase letters, digits, or dashes. IDs 
must start with a
-   * letter and may not end with a dash. This regex isn't exact - this allows 
for patterns that
-   * would be rejected by the service, but this is sufficient for basic 
parsing of table references.
+   * Formally, project IDs must contain 6-63 lowercase letters, digits, or 
dashes, must start with a
+   * letter and may not end with a dash. This regex is used for basic parsing 
of table references
+   * rather than validation purpose, e.g. it allows looser restriction for 
testing on mock
+   * resources. It may allow for patterns that would be rejected by the service
    */
-  private static final String PROJECT_ID_REGEXP = 
"[a-z][-a-z0-9:.]{4,61}[a-z0-9]";
+  private static final String PROJECT_ID_REGEXP = "[a-z][-a-z0-9:.]{0,62}";

Review Comment:
   Well, previously project ID couldn't have less than 5 symbols either 😄 I 
think that's the point of the change, enforcing somebody else's rules shouldn't 
be a concern of 3rd party library, which Apache Beam is.
   
   Having said that, I made the requested change because I think "at least 2 
chars long" is a reasonable restriction.
   
   We _really_ hope this change will make it into 2.59.0!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to