-
Notifications
You must be signed in to change notification settings - Fork 113
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
panic: assignment to entry in nil map #3448
Comments
Work-around: |
Confirmed if you |
@glpatcern can you confirm? |
Indeed weird that it was not picked up in the CI (and it didn't even fire doing tests). I'll have a look. |
OK, issue understood and fixed, PR on the way |
You mean both the bug and the reason that CI didn't catch it? |
The bug was due to a bad assumption in case of invalid config, about the CI I guess it does not test such invalid configs. |
Hm, I think we have two options:
I think the second one is less work? |
Hi @michielbdejong, sorry I was too fast on Saturday: in fact a configuration with no parameters is perfectly valid for a driver such as the So apart from doing "more or less work", the empty driver config is totally legitimate (and BTW that was the issue, not the empty mimetypes, which are fully optional on their own). Now concerning a validation test, here we'd need to test for a demo driver with empty config. I can look into that. |
You can try loading this config in a test, I think you will be able to reproduce the panic with that config file and with your patch not applied. |
This issue was closed when the PR was merged, but we still need to write the test for it. @glpatcern will you still write that test, or should I? |
Yes, that was the intention but today I got stuck with other things (and I anticipate tomorrow will be the same...), will push a PR with the test on Wednesday. |
@michielbdejong the draft PR was created in #3459, but it turns out I can't make the test fail: the reason is that the tests are very superficial and only validate the parsing, not the real initialization process - which is the one that led to the (fixed) panic. So as things stand, it would require quite some mocking (including a mocked gateway service) to be able to test more than just the config parsing. With that, my proposal is to close that PR (yet the changes in the docs are to be merged eventually) and even drop a misleading test for the |
Is there a GitHub issue for the integration tests in the CI? |
It was a good exercise nevertheless! The GitHub issue is not yet there, we have an internal one (@gmgigi96 is working on it), but it will come soon. |
This error messages seems to be happening on master since last week.
The text was updated successfully, but these errors were encountered: