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

Provider scaleway with environment variable not working anymore since latest release 0.14.0 #4038

Closed
M0NsTeRRR opened this issue Nov 11, 2023 · 3 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@M0NsTeRRR
Copy link
Contributor

M0NsTeRRR commented Nov 11, 2023

What happened: i've upgraded external-dns from 0.13.6 to 0.14.0 and the application is not working anymore with same configuration.
Pod logs

panic: scaleway-sdk-go: cannot read config file /root/.config/scw/config.yaml: no such file or directory

goroutine 1 [running]:
github.com/scaleway/scaleway-sdk-go/scw.MustLoadConfig()
	github.com/scaleway/scaleway-sdk-go@v1.0.0-beta.20/scw/config.go:184 +0x34
sigs.k8s.io/external-dns/provider/scaleway.NewScalewayProvider({0xdb594f09bc5b240?, 0x11aa3b856dff2820?}, {{0xc000c1abc0, 0x3, 0x4}, {0x0, 0x0, 0x0}, 0x0, 0x0}, ...)
	sigs.k8s.io/external-dns/provider/scaleway/scaleway.go:68 +0xd4
main.main()
	sigs.k8s.io/external-dns/main.go:383 +0x30ae

How to reproduce it (as minimally and precisely as possible): Use the provider with example from the documentation

Anything else we need to know?:
I'm configuring scaleway provider through environment variable and this PR introduced a regression #4002

Environment:

  • External-DNS version (use external-dns --version): 0.14.0
  • DNS provider: scaleway
@M0NsTeRRR M0NsTeRRR added the kind/bug Categorizes issue or PR as related to a bug. label Nov 11, 2023
@M0NsTeRRR
Copy link
Contributor Author

M0NsTeRRR commented Nov 11, 2023

I've looked into scaleway SDK and it appears the config must be loaded otherwise it panics
https://github.com/scaleway/scaleway-sdk-go/blob/ca8abaedf009b7f0d4636acb5d23aa4c6891311a/scw/config.go#L181
Since config file is not mandatory as we can configure it with environment variable we should use LoadConfig instead of MustLoadConfig

huyduong2792 pushed a commit to huyduong2792/external-dns that referenced this issue Nov 30, 2023
@pievalentin
Copy link

I still have the issue with 0.14
The suggested config is not working. @M0NsTeRRR can you share your yml config?
it complains its missing the profile, if i load it it segfaults.
In the meantime i reverted to 0.13

@M0NsTeRRR
Copy link
Contributor Author

I still have the issue with 0.14 The suggested config is not working. @M0NsTeRRR can you share your yml config? it complains its missing the profile, if i load it it segfaults. In the meantime i reverted to 0.13

As the issue stated there is a bug in 0.14.0. I've provided a fix in #4039 and we are waiting for a new release that will embed this fixes. For now you have to stick like me in 0.13.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants