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

Fixed s3 to s3 sync url decoding pagniation bug. #909

Merged
merged 1 commit into from
Sep 8, 2014

Conversation

kyleknap
Copy link
Contributor

@kyleknap kyleknap commented Sep 4, 2014

Keys were not getting url decoded properly with pagination.
If one bucket exited ListObjects pagination before
the other bucket, it caused the handler that decodes the keys
to prematurely exit as well. This resulted in some keys not
getting url decoded.

cc @jamesls @danielgtaylor

Keys were not getting url decoded properly with pagination.
If one bucket exited ListObjects pagination before
the other bucket, it caused the handler that decodes the keys
to prematurely exit as well. This resulted in some keys not
getting url decoded.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) when pulling 54d6430 on kyleknap:sync-encoding into 2bdb58b on aws:develop.

@kyleknap
Copy link
Contributor Author

kyleknap commented Sep 4, 2014

How does my coverage decrease when the report says that the coverage increased for the file I changed? It looks like for the other builds configure.py dropped but I did not touch that file. I do not think it is possible to add tests to what I changed to bump up the coverage. I would have to add tests not relevant to my pull requests. What are your thoughts @jamesls @danielgtaylor?

@jamesls
Copy link
Member

jamesls commented Sep 4, 2014

Can't seem to find this in coveralls, is there a page that actually shows the diff in coverage?

@kyleknap
Copy link
Contributor Author

kyleknap commented Sep 4, 2014

Yes if you click the black and green button that says 90% in the coveralls comment.

@jamesls
Copy link
Member

jamesls commented Sep 4, 2014

I'm asking for a page that shows the diff in coverage. Coveralls says it dropped 0.01%. Where does it show this? Clicking on the link shows everything is increasing. You mentioned something about configure.py. Where does it show that?

screen shot 2014-09-04 at 1 30 39 pm

@kyleknap
Copy link
Contributor Author

kyleknap commented Sep 4, 2014

Click on either job 1222.1() or 1222.2() in the jobs column.

@jamesls
Copy link
Member

jamesls commented Sep 4, 2014

Sorry, I don't think I'm being clear. In order to answer your initial question, I need to be able to see the lines of code for which coveralls is claiming a drop in coverage, which is what I've been referring to as a diff. Maybe I'm missing something obvious, but I can only see what lines of code are covered/not covered. I can't see what lines changed from covered->not covered. Am I correct in assuming I have to just pick an earlier build and manually scroll line by line to see the diff?

Perhaps it would just be more expedient if you can show what lines of code are not being covered anymore that previously were being covered, and we can go from there.

@kyleknap
Copy link
Contributor Author

kyleknap commented Sep 4, 2014

Oh I don't know how to find a diff either. I can only see covered and not covered as well. Manually scrolling is the only way that I can tell.

@kyleknap
Copy link
Contributor Author

kyleknap commented Sep 4, 2014

I just compared the code between my pull request and the recently merged doc update branch and they looked the exact same...

@danielgtaylor
Copy link
Contributor

The difference isn't obvious to me. It's possible this is a Coveralls bug maybe? Some lines change depending on Python version - maybe it has some issue with that?

@@ -490,20 +490,29 @@ def test_sync_with_plus_chars_paginate(self):
self.assertNotIn('upload:', p2.stdout)
self.assertEqual('', p2.stdout)

def test_s3_to_s3_sync_with_plus_char(self):
self.files.create_file('foo+.txt', contents="foo")
def test_s3_to_s3_sync_with_plus_char_paginate(self):
Copy link
Member

Choose a reason for hiding this comment

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

Is it not worth keeping the original test? It might be useful to verify both the non-paginated and paginated cases.

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 felt that the test that I added encompasses the non-paginated case since we always use a paginate call when listing the objects in a bucket. The main benefit in keeping the test is that it adds more granularity such that we would know if it is the first paged that is not url decoded or the pages after it. The reason I took it out in the first place is that it saves time in running the test. I estimated the test takes around 20 seconds. So I figured since the logic was the same, we could save some time/reduce redundancy.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good, makes sense.

@jamesls
Copy link
Member

jamesls commented Sep 8, 2014

Small question about, but other than that, looks good.

@jamesls
Copy link
Member

jamesls commented Sep 8, 2014

:shipit: Looks good.

kyleknap added a commit that referenced this pull request Sep 8, 2014
Fixed s3 to s3 sync url decoding pagniation bug.
@kyleknap kyleknap merged commit d5139eb into aws:develop Sep 8, 2014
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.

4 participants