Fri, Oct 22
typo fixes; added doc links
Thu, Oct 21
Removed unused code
Changes requested in the review
Mon, Oct 11
- checking for origin_url in request params
- better tests
- redirect to /snapshot/log/<id>
Commit message changes to include "Fixes <ticket>"
Review changes and changes to the commit message
Please use the imperative form in diff and commit titles. For example (respectively):Fix navigation to directory(code) in snapshot view
andAdd an extra parameter called directory_url in the snapshot_context To fix missing URL to the code (directory) view in case the snapshot is missing an origin context. Related to T3644
or just this:Fix missing URL to the code (directory) view in case the snapshot is missing an origin context. Related to T3644
Two other nitpicks:
- it's easier for everyone to have the diff title and message match the commit message most of the time
- Use "Fixes Txxxx" or "Closes Txxxx" instead of "Related to Txxxx" for commits that completely fix an issue, it gives more details on the relation between the commit and the task.
Fri, Oct 8
Diff for log routes
WIP: Many URLs defined in the origin view (urlconf) are redundant.
This fix redirects /origin/branches?origin_url=<url> and
/origin/<url>/branches to /snapshot-branches/
Thu, Oct 7
Yes we can, the snapshot should be provided as query parameter in other views in that case.
I'm asking this because using predictable origin-centric URLs is generally much more user friendly than having to use multiple APIs to look up the SWHID of a given object before being able to construct the URL, and one would have to always to dynamic API calls to generate the URL for browsing the "latest archival" of a given origin.
For instance, the "archived origin" SWH badge https://www.softwareheritage.org/2020/01/13/the-swh-badges-are-here/ uses an origin-centric URL.
Just to be clear, you're looking to keep these URL working, but turn them into redirects over to swhid-centric URLs with context parameters (and drop the original view code from these URLs), correct?
@anlambert do you think we can deprecate following routes as well? I think they can be redirected to the corresponding swh/web/browse/views/<object_type>.py routes.
Wed, Oct 6
- Unit tests for mongo backend
- small change
- missing test stubs
Tue, Oct 5
The issue is, the redirected url (/browse/directory/<sha1>?origin_url=<>) will call the same function (get_snapshot_context) again. This is true for all the urls.
Do you see some other efficient alternative to fix this ticket?
@jayeshv, all costly storage requests result (getting origin visits, snapshot content and size) performed by the get_snapshot_context
function are cached at the django level so no need to worry about performance here as it has already been handled.
Mon, Oct 4
@anlambert This ticket might have some performance implications.
for eg: in the first case, to redirect /browse/origin/directory/?origin_url=<> to the root directory, we have to query the archive first. The obvious way would be to call the get_snapshot_context function.
Fri, Oct 1
Fixed the issue in timestamp comparison
Wed, Sep 29
Tue, Sep 28
Sep 23 2021
Sep 22 2021
- added stubs
- small fixes
- more doc strings
- Better doc strings
Sep 21 2021
- Unit tests for mongo backend
- Added tests for multiple records
- Added more unit tests
- String corrections
Sep 20 2021
I'm not really convinced about adding this test, it essentially recreates situations that are already tested in the test_provenance_storage test (but there it is done for all backends at once).
Also, performing direct queries to the mongodb object breaks the abstraction layer which means any future refactoring will require reimplementing this tests.
I rather design test to be independent of the actual implementation, so that they check that the class behave as expected from a semantic point of view.
Sep 17 2021
Added missing tests for multiple records
Sep 16 2021
Sep 14 2021
Sep 13 2021
Not sure we really want to restrict this methods to test-only in the documentation. But we can change this in the future anyway
Please use imperative style in the got commit message
Docstring changes for test only methods (Minor).
Sep 9 2021
Sep 7 2021
Sep 6 2021
Initial version is merged to master.
First test 07/09/2021
Against the simple/experimental data model version. (https://forge.softwareheritage.org/rDPROV3e009a2f77de1d4d00eb52f838537c7af327f010)
Computer: Dell 7400