HyP3 API Internal Server Error if you specify the same granule twice for a burst job

Open
#2,015 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api, backend

Research direction

Start at the API endpoint that validates burst job submissions and trace how duplicate granules are handled; the issue does not name a file or test. Check whether other job types fail the same way, identify the cause of the 500 response, and add or update tests for duplicate granules. Done means invalid input returns a 400 Bad Request instead of an Internal Server Error.

Written by the indexing model from the issue text.

Description

Jira Bug

Jira: https://asfdaac.atlassian.net/browse/TOOL-2505

Note: The above link is accessible only to members of ASF.


I noticed that if you specify the same granule twice for an InSAR Burst job, HyP3 returns an Internal Server Error, e.g:

{
  "jobs": [
    {
      "job_parameters": {
        "apply_water_mask": false,
        "granules": [
          "S1_000693_IW1_20230620T183239_VV_F644-BURST",
          "S1_000693_IW1_20230620T183239_VV_F644-BURST"
        ],
        "looks": "20x4"
      },
      "job_type": "INSAR_ISCE_BURST",
      "name": "Job Name"
    }
  ],
  "validate_only": true
}

Results in:

<!doctype html>
<html lang=en>
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>

We should determine if this applies to other job types, determine the cause of the error, and instead return a 400 Bad Request.

Dominant language
Python
Stars
53
Forks
13
Avg merge
1d 2h
Merged PRs (30d)
20

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ASFHyP3/hyp3

All issues in ASFHyP3/hyp3

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.