This repository was archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 550
Rest API for retry-history #4958
Merged
Merged
Changes from 4 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
f4b20a1
add task history api; support get job with specific attempt.
suiguoxin 2cba771
fix attempt index issue
suiguoxin 37ad813
merge master and resolve conflict
suiguoxin 33c240d
resolve conflict
suiguoxin 1595fe7
refine code
suiguoxin d32c663
fix typo in swagger
suiguoxin 0bb44c9
update get task api response schema
suiguoxin 5005735
Merge remote-tracking branch 'msft/master' into retry-history
suiguoxin 6c91eab
order task history when query db
suiguoxin 5aa07fb
fix swagger format issue; refine get task error cases response
suiguoxin c1f963d
use deprecated operation in swagger
suiguoxin 50c878a
bug fix
suiguoxin 2ba1b4a
fix job-attempt api issue
suiguoxin ebd33f3
add launchedTime field besides createdTime
suiguoxin aff761c
fix attempt state issue
suiguoxin fe385d9
refine var name
suiguoxin 22647c1
refine var name
suiguoxin aa3e071
remove task histories with unreasonable task attempt index
suiguoxin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| // Copyright (c) Microsoft Corporation | ||
| // All rights reserved. | ||
| // | ||
| // MIT License | ||
| // | ||
| // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated | ||
| // documentation files (the "Software"), to deal in the Software without restriction, including without limitation | ||
| // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and | ||
| // to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
| // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
| // | ||
| // THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING | ||
| // BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | ||
| // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
|
||
| // module dependencies | ||
| const asyncHandler = require('@pai/middlewares/v2/asyncHandler'); | ||
| const task = require('@pai/models/v2/task'); | ||
|
|
||
| const get = asyncHandler(async (req, res) => { | ||
| const result = await task.get( | ||
| req.params.frameworkName, | ||
| Number(req.params.jobAttemptId), | ||
| req.params.taskRoleName, | ||
| Number(req.params.taskIndex), | ||
| ); | ||
| res.status(result.status).json(result.data); | ||
| }); | ||
|
|
||
| // module exports | ||
| module.exports = { | ||
| get, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.