🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

[Feature][jira] Add JIRA_SKIP_UNPARSEABLE_ISSUES to continue collection when an issue page can't be parsed #8949

Closed

Description

@Murad-Suleymanov

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Use case

When DevLake collects Jira issues (jira:collectIssues), each page body is parsed with
json.Unmarshal. If a page that returned a successful (2xx) status has a body that
cannot be parsed as JSON — e.g. a truncated/partial response (connection dropped, or a
proxy buffered only part of the body), or in rare misconfigured-proxy cases an HTML body
served with a 200 status — the ResponseParser returns an error and the entire
collectIssues subtask fails
, aborting the whole Jira collection.

Note: this is distinct from HTTP error statuses (e.g. 502/503/504), which are already
handled by the collector's retry logic. This request only concerns parse failures on
otherwise-successful responses
.

On large Jira instances a single bad page (often on deep pagination with
expand=changelog) can kill an entire sync even though thousands of other pages are fine.

Description

A configurable flag JIRA_SKIP_UNPARSEABLE_ISSUES:

  • default false → current behaviour (surface the error, fail the subtask).
  • true → log a warning and skip the unparseable page, letting the rest of the
    collection finish.

This keeps collection resilient on big/flaky Jira instances without hiding the problem
(the warning is still logged).

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added
    type/feature-request
    on Jun 23, 2026
  2. vbhanuchander-lang commented on Aug 1, 2026

    @vbhanuchander-lang
    Contributor

    I'd like to help move this along if it's still open. @Murad-Suleymanov, are you still planning to submit a PR for this? If so I'll stay out of the way.

    If not, I'm happy to pick it up. The scope looks contained: both the V2 (api/2/search) and V3 (api/3/search/jql) response parsers in plugins/jira/tasks/issue_collector.go return an error on json.Unmarshal failure, so the flag would sit there and fall back to logging a warning and skipping the page instead. JIRA_JQL_AUTO_FULL_REFRESH in the same plugin already establishes the taskCtx.GetConfigReader().GetBool(...) pattern, so it would follow that, default to false, and cover only parse failures on otherwise-successful (2xx) responses — HTTP error statuses would keep their existing retry behaviour, as you noted.

    Happy to adjust the approach if maintainers would rather see this handled generically in the collector helper rather than in the Jira plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/feature-request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions