Skip to content

Add new Jira search endpoint with new api_type option and auto detect#4542

Merged
sysadmind merged 5 commits intoprometheus:mainfrom
cjedro:use-new-jira-search-endpoint
Sep 17, 2025
Merged

Add new Jira search endpoint with new api_type option and auto detect#4542
sysadmind merged 5 commits intoprometheus:mainfrom
cjedro:use-new-jira-search-endpoint

Conversation

@cjedro
Copy link
Contributor

@cjedro cjedro commented Sep 5, 2025

closes #4513

i followed #4513 (comment)

maybe api_type = datacenter should not override host *.atlassian.net but lets discuss

also, as in the comment, only overriding the search api version for now

Copy link
Member

@jkroepke jkroepke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @cjedro thanks for your PR.

I wrote some comments, maybe we can avoid having 2 structs and the different API endpoints is just sufficient.

No idea, why Expand was a list before, because in API docs, the mentioned as string as well. However we do not use Expand anyways.

@cjedro
Copy link
Contributor Author

cjedro commented Sep 6, 2025

@jkroepke thanks so much for the review, I will work on your recommendations later today or tomorrow

@jkroepke
Copy link
Member

jkroepke commented Sep 6, 2025

Consider to add the default value to

DefaultJiraConfig = JiraConfig{

Consider to add a validation for the values here

func (c *JiraConfig) UnmarshalYAML(unmarshal func(any) error) error {

similar to here:

if c.ParseMode != "" &&
c.ParseMode != "Markdown" &&
c.ParseMode != "MarkdownV2" &&
c.ParseMode != "HTML" {
return errors.New("unknown parse_mode on telegram_config, must be Markdown, MarkdownV2, HTML or empty string")

@cjedro cjedro force-pushed the use-new-jira-search-endpoint branch from 52c097b to 67a0d97 Compare September 7, 2025 11:44
@cjedro cjedro requested a review from jkroepke September 7, 2025 12:31
Copy link

@chrko chrko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The requested/recommended DefaultConfig part is missing (#4542 (comment))

Consider to add the default value to

DefaultJiraConfig = JiraConfig{

@cjedro cjedro force-pushed the use-new-jira-search-endpoint branch from b6b05d3 to b12c67e Compare September 11, 2025 11:42
@cjedro
Copy link
Contributor Author

cjedro commented Sep 11, 2025

@jkroepke, @chrko i added the things discussed here.
Besides this i talked to @jkroepke and he recommended to leave out the global jira api type so i removed it, if we want to keep it i'm happy to re-add for sure

is someone aware why the tests are failing? i found this in the logs
time=2025-09-11T11:46:46.762Z level=ERROR source=main.go:559 msg="Listen error" err="listen tcp 127.0.0.1:39549: bind: address already in use"

Copy link
Member

@jkroepke jkroepke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jkroepke
Copy link
Member

jkroepke commented Sep 15, 2025

Hey @sysadmind could you do a second look?

  • And no idea about circle ci. Seems like a flasky test.

Signed-off-by: christianjedro <cj@cloudeteer.de>
Signed-off-by: christianjedro <cj@cloudeteer.de>
…and remove test + implementation for empty string

Signed-off-by: christianjedro <cj@cloudeteer.de>
@cjedro cjedro force-pushed the use-new-jira-search-endpoint branch from b12c67e to 64ddf67 Compare September 15, 2025 19:12
Signed-off-by: christianjedro <cj@cloudeteer.de>
@cjedro cjedro force-pushed the use-new-jira-search-endpoint branch from 64ddf67 to 1f6f3f2 Compare September 15, 2025 19:14
Signed-off-by: christianjedro <cj@cloudeteer.de>
@cjedro
Copy link
Contributor Author

cjedro commented Sep 15, 2025

Hey @sysadmind could you do a second look?

  • And no idea about circle ci. Seems like a flasky test.

it worked now..

Copy link
Contributor

@sysadmind sysadmind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests are flaky with circleci. You can just run them again. I have a PR open to add the mail tests back to github actions so that we can fully move.

@sysadmind sysadmind merged commit cfd70e5 into prometheus:main Sep 17, 2025
11 checks passed
gotjosh pushed a commit that referenced this pull request Sep 22, 2025
…#4542)

* Add new Jira search endpoint with new api_type option and auto detect

Signed-off-by: christianjedro <cj@cloudeteer.de>

* adding recommendations, update doku, add comments

Signed-off-by: christianjedro <cj@cloudeteer.de>

* remove global api type (recommended by @jkroepke), add default value and remove test + implementation for empty string

Signed-off-by: christianjedro <cj@cloudeteer.de>

* dco

Signed-off-by: christianjedro <cj@cloudeteer.de>

* add better explanation

Signed-off-by: christianjedro <cj@cloudeteer.de>

---------

Signed-off-by: christianjedro <cj@cloudeteer.de>
@dinwath
Copy link

dinwath commented Oct 6, 2025

Hi, is there any planned date to release this feature? we would like to integrate jira with our alerting workflow but we're currently struck due to Atlassian change of API in Jira Cloud

@cjedro
Copy link
Contributor Author

cjedro commented Oct 16, 2025

@dinwath at least the Release is getting prepared: #4586

@cjedro cjedro deleted the use-new-jira-search-endpoint branch October 16, 2025 09:20
@jkroepke
Copy link
Member

Should be part of https://github.com/prometheus/alertmanager/releases/tag/v0.29.0-rc.1

holger-waschke pushed a commit to holger-waschke/alertmanager that referenced this pull request Nov 1, 2025
…prometheus#4542)

* Add new Jira search endpoint with new api_type option and auto detect

Signed-off-by: christianjedro <cj@cloudeteer.de>

* adding recommendations, update doku, add comments

Signed-off-by: christianjedro <cj@cloudeteer.de>

* remove global api type (recommended by @jkroepke), add default value and remove test + implementation for empty string

Signed-off-by: christianjedro <cj@cloudeteer.de>

* dco

Signed-off-by: christianjedro <cj@cloudeteer.de>

* add better explanation

Signed-off-by: christianjedro <cj@cloudeteer.de>

---------

Signed-off-by: christianjedro <cj@cloudeteer.de>
Signed-off-by: Holger Waschke <holger.waschke@dvag.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Jira Integration deprecated Endpoints

5 participants