Skip to content

Conversation

dmathieu
Copy link
Contributor

@dmathieu dmathieu commented May 7, 2019

This implements resuming a repository blobs upload.

I'm using time.Now as startedAt, as the one set when Create() was called doesn't seem to be available. I'm happy to follow any guidance on using another value though.

@dmathieu
Copy link
Contributor Author

dmathieu commented May 7, 2019

The tests failure appears to be due to vendor issues, not related to this change.

StatusCode: http.StatusOK,
Headers: http.Header(map[string][]string{
"Content-Length": {fmt.Sprint(len(b1))},
"Last-Modified": {time.Now().Add(-1 * time.Second).Format(time.ANSIC)},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can timing for this test cause random failures?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've not seen any failure. The pattern is also used in several other places (I see 16 occurences in this file).

Copy link
Contributor

@caervs caervs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@GordonTheTurtle
Copy link

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "repository-blob-resume" git@github.com:dmathieu/distribution.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842357576592
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

Copy link
Contributor

@davidswu davidswu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tariq1890
Copy link
Contributor

Looks like this needs to be rebased.

Signed-off-by: Damien Mathieu <dmathieu@salesforce.com>
@codecov
Copy link

codecov bot commented Jun 26, 2019

Codecov Report

Merging #2917 into master will decrease coverage by <.01%.
The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2917      +/-   ##
==========================================
- Coverage   60.59%   60.59%   -0.01%     
==========================================
  Files         102      102              
  Lines        8025     8034       +9     
==========================================
+ Hits         4863     4868       +5     
- Misses       2512     2514       +2     
- Partials      650      652       +2
Flag Coverage Δ
#linux 60.59% <80%> (-0.01%) ⬇️
Impacted Files Coverage Δ
registry/client/repository.go 59.76% <80%> (+0.72%) ⬆️
registry/handlers/app.go 48.16% <0%> (-0.7%) ⬇️

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 90dfea7...dd3bdee. Read the comment docs.

@caervs caervs merged commit 8063102 into distribution:master Jul 11, 2019
@dmathieu dmathieu deleted the repository-blob-resume branch July 15, 2019 04:54
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.

5 participants