kaisun2000 opened a new issue #12274:
URL: https://github.com/apache/druid/issues/12274


   Please provide a detailed title (e.g. "Broker crashes when using TopN query 
with Bound filter" instead of just "Broker crashes").
   
   ### Affected Version
   
   master and 0.22.1
   
   ### Description
   Building from source with `mvn clean install -DskipTests -Pdist 
-Dmaven.javadoc.skip=true` with current pyyaml version 6.0, it would fail with 
following:
   
   ```
   [INFO] --- exec-maven-plugin:1.6.0:exec (generate-binary-license) @ 
distribution ---
   === Generating the contents of LICENSE.BINARY file ===
   
   Traceback (most recent call last):
     File 
"/Users/kai.sun/falcon_druid/druid_source/druid/distribution/bin/generate-binary-license.py",
 line 181, in <module>
       generate_license(apache_license_v2, license_yaml)
     File 
"/Users/kai.sun/falcon_druid/druid_source/druid/distribution/bin/generate-binary-license.py",
 line 140, in generate_license
       licenses_list = list(yaml.load_all(registry_file))
   TypeError: load_all() missing 1 required positional argument: 'Loader'
   [ERROR] Command execution failed.
   org.apache.commons.exec.ExecuteException: Process exited with an error: 1 
(Exit value: 1)
       at org.apache.commons.exec.DefaultExecutor.executeInternal 
(DefaultExecutor.java:404)
   ```
   
   The following code change would fix them.
   ```
   diff --git a/distribution/bin/generate-binary-license.py 
b/distribution/bin/generate-binary-license.py
   index e69bc7025e..e08fe04710 100755
   --- a/distribution/bin/generate-binary-license.py
   +++ b/distribution/bin/generate-binary-license.py
   @@ -137,7 +137,7 @@ def generate_license(apache_license_v2, license_yaml):
        # Print Apache license first.
        print_outfile(apache_license_v2)
        with open(license_yaml, encoding='utf-8') as registry_file:
   -        licenses_list = list(yaml.load_all(registry_file))
   +        licenses_list = list(yaml.load_all(registry_file, 
Loader=yaml.FullLoader))
    
        # Group licenses by license_name, license_category, and then module.
        licenses_map = {}
   diff --git a/distribution/bin/generate-binary-notice.py 
b/distribution/bin/generate-binary-notice.py
   index a7778812b9..5ab1d7cf85 100755
   --- a/distribution/bin/generate-binary-notice.py
   +++ b/distribution/bin/generate-binary-notice.py
   @@ -57,7 +57,7 @@ def generate_notice(source_notice, dependences_yaml):
        # Print Apache license first.
        print_outfile(source_notice)
        with open(dependences_yaml, encoding='utf-8') as registry_file:
   -        dependencies = list(yaml.load_all(registry_file))
   +        dependencies = list(yaml.load_all(registry_file, 
Loader=yaml.FullLoader))
    
        # Group dependencies by module
        modules_map = defaultdict(list)
   ```
   


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to