Sasha Melentyev
c02003af3c
Refactor time durations ( #58484 )
...
This change uses `time.Second` in place of `1000 * time.Millisecond` and `time.Minute` in place of `60*time.Second`.
2022-11-22 15:09:15 +08:00
Jo
062d255124
Handle ioutil deprecations ( #53526 )
...
* replace ioutil.ReadFile -> os.ReadFile
* replace ioutil.ReadAll -> io.ReadAll
* replace ioutil.TempFile -> os.CreateTemp
* replace ioutil.NopCloser -> io.NopCloser
* replace ioutil.WriteFile -> os.WriteFile
* replace ioutil.TempDir -> os.MkdirTemp
* replace ioutil.Discard -> io.Discard
2022-08-10 15:37:51 +02:00
Arve Knudsen
c2cad26ca9
Chore: Disable default golangci-lint filter ( #29751 )
...
* Disable default golangci-lint filter
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Chore: Fix linter warnings
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-12-15 09:32:06 +01:00
Arve Knudsen
f326b79cc1
Security: Add gosec G304 auditing annotations ( #29578 )
...
* Security: Add gosec G304 auditing annotations
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com>
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com>
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com>
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com>
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com>
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com>
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com>
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com>
* Add gosec annotations
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com>
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com>
* Add gosec annotations
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com>
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com>
* add G304 auditing comment
Signed-off-by: bergquist <carl.bergquist@gmail.com>
* Add gosec annotations
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* space
Signed-off-by: bergquist <carl.bergquist@gmail.com>
* Add gosec annotations
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Co-authored-by: bergquist <carl.bergquist@gmail.com>
2020-12-03 22:13:06 +01:00
Arve Knudsen
3d3a7cbba8
Chore: Fix staticcheck issues ( #28860 )
...
* Chore: Fix issues reported by staticcheck
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Undo changes
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Chore: Fix issues reported by staticcheck
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Fix test
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-05 13:07:06 +01:00
Arve Knudsen
a5d9196a53
Chore/fix lint issues ( #27704 )
...
* Chore: Fix linting issues
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-09-22 16:22:19 +02:00
Arve Knudsen
5070f7a75b
Chore: Start harmonizing linting with plugin SDK ( #25854 )
...
* Chore: Harmonize linting with plugin SDK
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
* Chore: Fix linting issues
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-06-29 14:08:32 +02:00
Marcus Efraimsson
71ffd1d108
Alerting: Fix image rendering and uploading timeout preventing to send alert notifications ( #21536 )
...
* svc alerting - use a shorter ctx to upload the img
This will prevent timeout on img upload to cancel the notifications from being sent
* components img uploader - pass the ctx to aws lib
* make webdavuploader use the ctx
* make azureblobuploader use the ctx
* rename uploadImage() to renderAndUploadImage()
for better clarity about what this method work
* Use timeout + 2s for plugin renderer (same as service and phantomjs)
* Make sure that original EvalContext is updated after render and upload
* Verify notification sent even if render or image upload times out
* fix lint
* fixes after review
Co-authored-by: Edouard Hur <3418467+hekmon@users.noreply.github.com>
Fixes #21018
2020-01-17 12:07:16 +01:00
Arve Knudsen
35e0e078b7
pkg/util: Check errors ( #19832 )
...
* pkg/util: Check errors
* pkg/services: DRY up code
2019-10-23 10:40:12 +02:00
Carl Bergquist
a86b8c8a04
http: remove dualstack since its deprecated ( #16940 )
...
Deprecated: Fast Fallback is enabled by default. To
disable, set FallbackDelay to a negative value.
https://golang.org/src/net/dial.go
2019-05-08 10:37:48 +02:00
Oleg Gaidarenko
54c1bf0cc9
Chore: a bit of spring cleaning ( #16710 )
...
* Chore: use early return technic everywhere
And enable "indent-error-flow" revive rule
* Chore: remove if-return rule from revive config
* Chore: improve error messages
And enable "error-strings" revive rule
* Chore: enable "error-naming" revive rule
* Chore: make linter happy
* Chore: do not duplicate gofmt execution
* Chore: make linter happy
* Chore: address the pull review comments
2019-04-23 11:24:47 +03:00
Jakob van Santen
92d417f6b4
Handle query string in storage public_url ( #9351 ) ( #12555 )
2018-07-17 11:10:12 -07:00
Mario Trangoni
b02a860e66
pkg/components: fix ineffassign issues
2018-04-23 20:03:57 +02:00
Carl Bergquist
e9e8ffc769
Merge pull request #9367 from bobrik/dualstack
...
Enable dualstack in every net.Dialer, fixes #9364
2017-09-28 11:15:49 +02:00
Ivan Babrou
9a4ae30227
Enable dualstack in every net.Dialer, fixes #9364
...
Default transport enables it:
* https://github.com/golang/go/blob/d2826d3e06/src/net/http/transport.go#L42-L46
```
DialContext: (&net.Dialer{
Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second,
DualStack: true,
}).DialContext,
```
See also: https://github.com/golang/go/issues/15324
2017-09-27 22:29:48 -07:00
bergquist
c7698a09ed
pass context to image uploaders
2017-09-15 16:11:02 +02:00
berghauz
48cf58e739
Indenting fix
2017-05-17 03:58:18 +03:00
berghauz
c713bd9a9a
Proxy support added, fixes #7922
...
Well, i'm really want to see it working in 4.3.0
2017-05-17 02:50:56 +03:00
Daniel Lee
6538e86793
webdav: add tests + path.join for public url param
...
Fixes #7914 . Fixes #7921
2017-04-25 17:22:18 +02:00
fir4
6d9e8bd147
webdav: allow specification of a different public_url than upload url
2017-04-25 17:22:18 +02:00
bergquist
05952688c5
tech: avoid using http.DefaultClient
2017-02-24 17:22:12 +01:00
bergquist
b4b7156f42
fix(webdav): adds missing auth headers
...
closes #6779
2016-12-02 16:20:15 +01:00
bergquist
d1a7a23c84
test(imageupload): add more specific tests
...
torkels commit will fix this unit test :)
2016-09-07 10:05:01 +02:00
bergquist
99e99922b4
feat(alerting): add support for uploading images to webdav.
...
closes #5770
2016-08-11 16:48:54 +02:00