Skip to content
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

Add job_urls field to post_jobs response #1616

Closed
wants to merge 6 commits into from
Closed

Conversation

jtherrmann
Copy link
Contributor

See #1273

This PR adds a job_urls field to the POST /jobs response, so that we do not have to manually concatenate the API domain name and the job ID for every job when submitting jobs via the API. Here is an example response:

{
  "job_urls": [
    "https://hyp3-enterprise-test.asf.alaska.edu/jobs/13d6eac4-b4e6-4281-951e-d79d356693bf",
    "https://hyp3-enterprise-test.asf.alaska.edu/jobs/1693d659-6bba-495e-9332-b68dcd753e57",
    "https://hyp3-enterprise-test.asf.alaska.edu/jobs/ac2c7a9f-d278-4673-89b1-bf7faa7118c3"
  ],
  "jobs": [...],
  "validate_only": false
}

This makes it much easier to open and keep track of a batch of submitted test jobs, for example, or to comment the list of URLs in an open task/issue.

TODO:

  • Address TODOs in code.

@jhkennedy
Copy link
Contributor

@jtherrmann ooh, this could be handy.

I wonder if we should also (instead?) add a job_url to each job -- when you do searches for multiple jobs (e.g., by name) you'd have URLs to open that specific job.

@jtherrmann
Copy link
Contributor Author

@jhkennedy I think I'd like both. My only dilemma with adding a job_url field to each job dict is whether to store it as a field in the database, or insert it dynamically when returning the job via the API.

@jtherrmann
Copy link
Contributor Author

I don't have as much need for this feature since we added the search-for-other-users'-jobs feature.

@jtherrmann jtherrmann closed this May 21, 2024
@jtherrmann jtherrmann deleted the job-urls branch May 21, 2024 17:15
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.

2 participants