Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix generation of notice file in CSV format #16388

Merged
merged 1 commit into from
Feb 18, 2020

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Feb 18, 2020

Fix generation of notice file in CSV format, and make ./dev-tools/generate_notice.py executable, so it can be directly executed and correct python interpreter will be taken from the shebang.

This script was failing with this error when used to generate the output in CSV format.

Get the licenses available from ['./vendor']
WARNING: No version information found for: github.com/prometheus/client_model
WARNING: No version information found for: github.com/Azure/azure-storage-blob-go
WARNING: No version information found for: github.com/Azure/azure-pipeline-go
WARNING: No version information found for: github.com/godror/godror/odpi
WARNING: No version information found for: github.com/go-ini/ini
Traceback (most recent call last):
  File "dev-tools/generate_notice.py", line 417, in <module>
    dependencies = create_notice(notice, args.beat, args.copyright, vendor_dirs, args.csvfile, overrides=overrides)
  File "dev-tools/generate_notice.py", line 227, in create_notice
    write_csv_file(csvwriter, dependencies)
  File "dev-tools/generate_notice.py", line 204, in write_csv_file
    csvwriter.writerow(["name", "url", "version", "revision", "license"])
TypeError: a bytes-like object is required, not 'str'

It could be reproduced with python3 ./dev-tools/generate_notice.py . --csv foo.csv.

@jsoriano jsoriano self-assigned this Feb 18, 2020
@jsoriano jsoriano added needs_backport PR is waiting to be backported to other branches. v7.7.0 labels Feb 18, 2020
Copy link
Contributor

@mikemadden42 mikemadden42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jsoriano jsoriano merged commit 02ada23 into elastic:master Feb 18, 2020
@jsoriano jsoriano deleted the generate-notice-csv-python3 branch February 18, 2020 19:25
jsoriano added a commit to jsoriano/beats that referenced this pull request Feb 18, 2020
@jsoriano jsoriano removed the needs_backport PR is waiting to be backported to other branches. label Feb 18, 2020
jsoriano added a commit that referenced this pull request Feb 19, 2020
kvch pushed a commit to kvch/beats that referenced this pull request Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants