Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
jira integration #3590
jira integration #3590
Changes from all commits
ab5c92c
cf3de82
d236da4
e22d06b
bf991e0
6fb2bd1
c2ceba2
a0b94df
3705a64
25b2657
d65ca8b
a3975d9
74138ba
ed70001
eb64057
8874392
3aa5a4c
9604737
6d2ceba
f945810
3229180
27c8b44
aac35bd
81d66d9
ebe6269
cdc96e6
b15de33
bd5b579
ebf5923
25808bf
3e35db2
3166f69
495e21f
6e88b9d
a7917b3
48a904b
510ccb6
23628b3
ca08adb
dbda07a
b6df3c1
8bb43d0
e123003
0ac2ca5
43c8f10
3517487
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A new dependency is mandatory for the map[any]any cast, because
encoding/json
does not support that typeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not terribly excited to depend on a project that isn't very active (e.g. it doesn't have a go.mod). While I understand that it is stable and proven, I'll look for other options.
Can you also provide an example of something that breaks encoding/json?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alertmanager parses the nested map as
map[interface{}]interface{}
andencoding/json
does not support this kind of map. The library ensures that each nested map is casted tomap[string]interface{}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/json-iterator/go natively supports encoding of
map[interface{}]interface{}
, but I feel there would much less acceptance for a different JSON library.If you try to go with own code, I have prepare a test file for you:
https://github.com/jkroepke/homelab/blob/main/go/map_cast/main_test.go
I also figured out that
gopkg.in/yaml.v2
provides nested maps asmap[any]any
whilegopkg.in/yaml.v3
would usemap[string]any
, eben numbers are used as YAML key.Not 100% sure about this, but I guess, the issue could be also resolved, if
gopkg.in/yaml.v3
would used to read the config file.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
json-iterator is already an indirect dependency via prometheus/client_golang so I'd say that it's ok to use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no clue, why json-iterator works fine on the lined go test above, but while integrate it inside AM, tests in AM are failed with
I may give up here, since I don't know why it works on a synthetic environment, but not on AM.
For reference, here is my code (cf85bbe)