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

make chlog-new fails on branches containing . with "Error: non-yaml extension" #237

Closed
damemi opened this issue Jan 30, 2023 · 0 comments · Fixed by #238
Closed

make chlog-new fails on branches containing . with "Error: non-yaml extension" #237

damemi opened this issue Jan 30, 2023 · 0 comments · Fixed by #238
Labels
bug Something isn't working

Comments

@damemi
Copy link

damemi commented Jan 30, 2023

Component(s)

No response

What happened?

Description

Running make chlog-new fails with the following error:

$ make chlog-new
no Go files in /go/src/github.com/open-telemetry/opentelemetry-collector-contrib
mkdir -p /go/src/github.com/open-telemetry/opentelemetry-collector-contrib/.tools
cd /go/src/github.com/open-telemetry/opentelemetry-collector-contrib/internal/tools && go build -o /go/src/github.com/open-telemetry/opentelemetry-collector-contrib/.tools/chloggen -trimpath go.opentelemetry.io/build-tools/chloggen
/go/src/github.com/open-telemetry/opentelemetry-collector-contrib/.tools/chloggen new --filename gcp-v0.35.0
Error: non-yaml extension: .0
Usage:
  chloggen new [flags]

Flags:
  -f, --filename string   name of the file to add
  -h, --help              help for new

Global Flags:
      --chloggen-directory string   directory containing unreleased change log entries (default: .chloggen)

Error: non-yaml extension: .0
make: *** [Makefile:237: chlog-new] Error 1

It seems that branch names that contain dots break the filename parser. When I remove the dots the file is correctly generated as (in this example) gcp-v0350.yaml

Steps to Reproduce

Run make chlog-new from a branch with dots in the name.

Expected Result

The file is generated with .yaml appended regardless of the branch name.

Actual Result

The above error occurs. Note that updating this line in the makefile to add .yaml manually does work, ie a file named gcp-v0.35.0.yaml will be generated. So it seems like it's maybe just an issue in the changelog tool's filename parsing.

Collector version

main

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@damemi damemi added the bug Something isn't working label Jan 30, 2023
@djaglowski djaglowski transferred this issue from open-telemetry/opentelemetry-collector-contrib Jan 30, 2023
@MrAlias MrAlias mentioned this issue Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant