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

Use girder jobs for spawning Instances #100

Merged
merged 6 commits into from Jul 2, 2018
Merged

Use girder jobs for spawning Instances #100

merged 6 commits into from Jul 2, 2018

Conversation

Xarthisius
Copy link
Collaborator

@Xarthisius Xarthisius commented Jun 19, 2018

Initial refactoring of POST/DELETE /instance. POST endpoint now returns Job object that can be used to track Instance status. Please note that creating an instance is a two step task: volume creation and container creation. Separate jobs are being created for each task. Only the latter is returned by calling POST /instance but the former can be accessed via parent keyword.

After some thought, I kept the original behavior. POST /instance still returns instance. There's a new state though: Instance.LAUNCHING (see server/constants.py for full enum). The actual spawning is done via girder jobs now and they can provide additional status if necessary (when we have interface for that).

Note: It requires corresponding branch on gwvolman (issue_95)

PLEASE DO NOT MERGE UNTIL [WIP] is removed from the title of this PR

It would be better to figure out a way to create task signatures,
using name instead of an actual function...
@codecov
Copy link

codecov bot commented Jun 28, 2018

Codecov Report

Merging #100 into master will increase coverage by 1.54%.
The diff coverage is 30.43%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #100      +/-   ##
==========================================
+ Coverage   37.42%   38.97%   +1.54%     
==========================================
  Files          18       18              
  Lines        1245     1270      +25     
==========================================
+ Hits          466      495      +29     
+ Misses        779      775       -4
Impacted Files Coverage Δ
server/__init__.py 42.51% <100%> (+0.69%) ⬆️
server/rest/instance.py 47.27% <100%> (+0.97%) ⬆️
server/models/instance.py 24.27% <20.51%> (+24.27%) ⬆️
server/constants.py 73.33% <75%> (+0.91%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d68442...1bbc57a. Read the comment docs.

@Xarthisius Xarthisius changed the title [WIP] Use girder jobs for spawning Instances Use girder jobs for spawning Instances Jul 2, 2018
@Xarthisius Xarthisius merged commit 5dcd496 into master Jul 2, 2018
@Xarthisius Xarthisius deleted the issue_95 branch July 2, 2018 17:26
Xarthisius added a commit to whole-tale/girder that referenced this pull request Jul 2, 2018
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.

None yet

1 participant