[ 
https://issues.apache.org/jira/browse/BEAM-12145?focusedWorklogId=580376&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-580376
 ]

ASF GitHub Bot logged work on BEAM-12145:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Apr/21 22:22
            Start Date: 09/Apr/21 22:22
    Worklog Time Spent: 10m 
      Work Description: kennknowles commented on a change in pull request 
#14500:
URL: https://github.com/apache/beam/pull/14500#discussion_r610931713



##########
File path: 
runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/SdkComponents.java
##########
@@ -191,6 +193,10 @@ private String getApplicationName(AppliedPTransform<?, ?, 
?> appliedPTransform)
     if (name.isEmpty()) {
       name = "unnamed-ptransform";
     }
+    // Normalize, trim, and uniqify.
+    int maxNameLength = 100;
+    name = Normalizer.normalize(name, Form.NFC).replaceAll("[^A-Za-z0-9-_]", 
"-");

Review comment:
       Let's document the required regex in the pipeline proto. Is there 
validation logic like there is in Python? That would be a good place to check 
it, too.




-- 
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.

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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 580376)
    Time Spent: 1h 10m  (was: 1h)

> Normalize transform IDs generated by SDKs
> -----------------------------------------
>
>                 Key: BEAM-12145
>                 URL: https://issues.apache.org/jira/browse/BEAM-12145
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-core
>            Reporter: Chamikara Madhusanka Jayalath
>            Assignee: Chamikara Madhusanka Jayalath
>            Priority: P2
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Transform IDs generated by the SDK may be used by runners to identify 
> pipeline steps hence its preferable to keep them normalized, size limited, 
> and unique.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to