Hey, can I take this task up next?
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Apr 9 2021
Apr 7 2021
Great!
Have pushed to git.
Oh, I am more used to the PR way where we can send away the new commits to a PR :) . Have pushed both commits.
- Added explanatory tooltips on the pictos for the revision history
- CONTRIBUTORS: Add Mihir Karbelkar
Updated CONTRIBUTORS
Sure, will do!
Ok cool.
I had one doubt regarding this, so if the target_type is content then the target would be the content_id, right? But the ids are like this "8e5adfbd7e605bda9c5e96c10e015b3dc0df688e" so for a user having an id like this in the tooltip would feel like an arbitrary string.
Apr 6 2021
Cool, makes sense. Will work on it and create a diff.
Apr 5 2021
Hi, I would like to take up this task. What should the tooltips be, to me also I think label and commit picto dont make sense.
May 24 2019
Still open?
May 21 2019
May 16 2019
hehehehe.
Dayummmm! I did it. Thanks @vlorentz
hmmmm
Rebased to master made changes
Hopefully that does it.
May 15 2019
Used the for loop once removed new_checksum_dict as it was not needed.
First build failed uploading again
Have made the changes.
Have used unknown_revision, unknown_directory and unknown_content
@nahimilega it is probably a two line script. install R and do readRDS() and you will get a data.frame object which is just like a table and has columns and then you can extract what you want. Cheers :). BTW when I did readRDS it retrieved a lot of links and I don't know about the lister that much but you can pickup from there.
May 14 2019
In D1420#32410, @vlorentz wrote:In D1420#32407, @vlorentz wrote:we have to give dir_path some value
so I have also tried doing revision_['target'] = unknown_content['sha1_git'] but the notfoundexc is never raised
Yes, look how test_lookup_directory_with_revision_with_path does it
Er, you already did that, and it indeed raises an exception, look at Jenkins' logs:
You can reproduce this example by temporarily adding @reproduce_failure('4.23.4', b'AXicY2TAD5iwiDESqQ5FDwAB3AAI') as a decorator on your test case Falsifying example: test_lookup_directory_with_revision_unknown_content(self=<swh.web.tests.common.test_service.ServiceTestCase testMethod=test_lookup_directory_with_revision_unknown_content>, revision='500a697730a27eabdcdf8af4aa6137819e72f171', unknown_content={'blake2S256': '0000000000000000000000000000000000000000000000000000000000000002', 'sha1': '0000000000000000000000000000000000000001', 'sha1_git': '0000000000000000000000000000000000000002', 'sha256': '0000000000000000000000000000000000000000000000000000000000000001'}) Traceback (most recent call last): File "/home/jenkins/workspace/DWAPPS/tox/.tox/py3/lib/python3.5/site-packages/swh/web/tests/common/test_service.py", line 359, in test_lookup_directory_with_revision_unknown_content cm.exception.args[0]) File "/usr/lib/python3.5/unittest/case.py", line 1080, in assertIn self.fail(self._formatMessage(msg, standardMsg)) File "/usr/lib/python3.5/unittest/case.py", line 666, in fail raise self.failureException(msg) AssertionError: 'Content not found for 500a697730a27eabdcdf8af4aa6137819e72f171' not found in "Directory or File 'README.md' pointed to by revision 500a697730a27eabdcdf8af4aa6137819e72f171 not found"The only issue here is that your assertion does not match the error message
Now everything works. Thanks @vlorentz.
May 10 2019
So basically if we want to raise notfoundexc by content_find we have to give
dir_path some value otherwise it sets entity['type'] as 'dir' by default and hence
elif condition will not be met so I have also tried doing revision_['target'] = unknown_content['sha1_git'] but the notfoundexc is never raised.
what should I do?
Apr 29 2019
Have added the test for you to check if I am going in the correct direction.
I took these values from the terminal when I used print(revision, unknown_content)
to print the values of those.... Also have changed my implementation of "return the first element in the list otherwise none" by using the _first_element function
just to make it a bit more concise and easy to understand.
Apr 28 2019
I am getting an error when adding the test so I thought it would be better to get a review.
Also the error occurs sometimes with file unrelated to this change. About this change it shows that it is generating inconsistent data
which I am unable to diagnose.
Apr 16 2019
Made the required changes
Missed a function in in_memory
Apr 14 2019
Sure go ahead ;)
Hey, I was wondering if @nahimilega is still working on this? If not then can I poke into this as it would be a good practice for me before implementing launchpad lister and gogs lister. Thanks :)
Apr 13 2019
Made the required changes
Sorry pushed the wrong thing...
Merged the for loop removed assertEqual for length and removed if from content find
Added the tests for colliding sha256 and blake2s256 hashes
Apr 12 2019
Added more tests for content_find.
Removed the if(s), for loop, LIMIT ALL. Made the query a bit more readable.
Apr 11 2019
Almost there. Just stuck on the query part. I do think it is similar to https://forge.softwareheritage.org/D1345#inline-8002.
Apr 10 2019
Have made the requested changes
In db.py : I have changed the content_find method to make the sql query on python side
In test_storage.py : Have added test for duplicate content
Apr 2 2019
In D1288#28317, @ardumont wrote:fwiw, from irc discussion:
20:07 <faux__> pinkieval: I have made all the required changes but I am still confused about the test as in what should we do when the content is duplicated? Sorry to be a bit late as I was travelling so rarely had internet connectivity 20:15 <+pinkieval> faux__: The content is not duplicated in the existing tests. You must add a new test where the content is duplicated, to see how content_find behaves 20:17 <faux__> By using content_add right? I did that but apparently content_find only finds one result and not two of the same result in the list 20:31 <+pinkieval> the goal of your change is to make content_find find more than one 10:17 <+ardumont> because content_add filters on existing contents so if you inject the same content twice, you will have only 1 content in the db
I also found out the same thing when I was adding duplicate content to database using content_add........ so if it will automatically filter duplicate data then content_find should return only one data as a list, right?.....
Mar 27 2019
Thanks, will get back to you with required changes.