Page MenuHomeSoftware Heritage
Feed Advanced Search

Oct 2 2020

tenma updated the summary of D4089: Add tests and fix behavior of scanner cli.
Oct 2 2020, 7:02 PM
tenma updated the diff for D4089: Add tests and fix behavior of scanner cli.

Rebased to remove doc and parse_url commits

Oct 2 2020, 6:59 PM
tenma updated the diff for D4130: Improve cli documentation.

Fixed the cherry-picked commit

Oct 2 2020, 6:51 PM
tenma updated the diff for D4130: Improve cli documentation.

Re-submit

Oct 2 2020, 5:59 PM
tenma added inline comments to D4130: Improve cli documentation.
Oct 2 2020, 5:56 PM
tenma updated the diff for D4131: Remove parse_url helper that adds no real value.

Inlined the intersting fix

Oct 2 2020, 5:41 PM
tenma added a comment to D4131: Remove parse_url helper that adds no real value.

I would add that I have even been bitten by it, providing a "http://" url that became "https://"http://""... :)

Oct 2 2020, 5:28 PM
tenma updated the task description for T1410: Kill implicit configuration: new configuration scheme.
Oct 2 2020, 4:18 PM · Core & foundations
tenma added inline comments to D4130: Improve cli documentation.
Oct 2 2020, 4:12 PM
tenma updated the summary of D4089: Add tests and fix behavior of scanner cli.
Oct 2 2020, 4:00 PM
tenma updated the summary of D4089: Add tests and fix behavior of scanner cli.
Oct 2 2020, 3:56 PM
tenma updated the task description for T1410: Kill implicit configuration: new configuration scheme.
Oct 2 2020, 3:48 PM · Core & foundations
tenma updated the task description for T1410: Kill implicit configuration: new configuration scheme.
Oct 2 2020, 3:35 PM · Core & foundations
tenma updated the summary of D4089: Add tests and fix behavior of scanner cli.
Oct 2 2020, 3:33 PM
tenma abandoned D4090: Improve cli documentation.
Oct 2 2020, 3:27 PM
tenma added a comment to D4090: Improve cli documentation.

Hm I submitted 2 times this commit, but the last one is D4130.
Sorry I will close this. Config related code will go to core.config, yes, when it will be ready for it.

Oct 2 2020, 3:27 PM
tenma added a comment to D4131: Remove parse_url helper that adds no real value.

OTOH it is CLI so interactive use so the error is instant.
The function also had a bad name.
I can just keep adding the trailing slash if you prefer, inline (no specific function).

Oct 2 2020, 3:23 PM
tenma updated the diff for D4089: Add tests and fix behavior of scanner cli.
  • Rename scan to do_scan in scanner
  • Fix not self-contained temp_path fixture in conftest
  • Change tests and fix behavior of scanner cli
Oct 2 2020, 3:17 PM
tenma created D4131: Remove parse_url helper that adds no real value.
Oct 2 2020, 3:09 PM
tenma created D4130: Improve cli documentation.
Oct 2 2020, 3:04 PM

Sep 30 2020

tenma committed rDSTObef08d6316c8: Fix object_types default in buffer interface protocol and impls (authored by tenma).
Fix object_types default in buffer interface protocol and impls
Sep 30 2020, 2:17 PM
tenma closed D4066: Fix buffer interface protocol and impls.
Sep 30 2020, 2:17 PM
tenma retitled D4089: Add tests and fix behavior of scanner cli from Add tests and fix behavior of scanner cli to WIP Add tests and fix behavior of scanner cli.
Sep 30 2020, 11:47 AM
tenma updated the diff for D4066: Fix buffer interface protocol and impls.

Renamed commit

Sep 30 2020, 11:28 AM
tenma added a comment to D4066: Fix buffer interface protocol and impls.

If my last comment was unclear:

  • concrete storages having different default does not matter since they are the endpoints in this chain.
  • any other non-terminal impl the buffer interface, if there may exist, must follow some rules: pass arguments unprocessed (*args) or a subset of BPS.OBJECT_TYPES.
Sep 30 2020, 11:16 AM

Sep 29 2020

tenma added a comment to D4089: Add tests and fix behavior of scanner cli.

OK I have been biten by the tests I just introduced. They are not self-contained, advice welcome on how to make them so.

Sep 29 2020, 8:00 PM
tenma updated the summary of D4090: Improve cli documentation.
Sep 29 2020, 7:58 PM
tenma updated the summary of D4089: Add tests and fix behavior of scanner cli.
Sep 29 2020, 7:57 PM
tenma created D4090: Improve cli documentation.
Sep 29 2020, 7:55 PM
tenma created D4089: Add tests and fix behavior of scanner cli.
Sep 29 2020, 7:53 PM
tenma updated the summary of D4066: Fix buffer interface protocol and impls.
Sep 29 2020, 11:04 AM

Sep 28 2020

tenma added a comment to D4066: Fix buffer interface protocol and impls.

If whatever component before BPS has its flush called with no object_types, it depends on the impl of this component how it chains well. As is, it should either chain down the arg unprocessed (from *args/**kwargs for example, what I have done for all proxies before I understood the getattr hooks), call it without this arg or give it a valid value like OBJECT_TYPES (which could be shared). In short intermediate should not have an invalid default passed down verbatim.
The case of concrete storage is not clear, because they don't chain call it nor need it in the first place. So any value is OK.
We have no other component than BPS that would do something with this (buffering) interface though, and it maybe would not make sense to have another.

Sep 28 2020, 5:09 PM
tenma added a comment to D4066: Fix buffer interface protocol and impls.

Tested on storage and loader-core as seen with mr grep '\.flush('.

Sep 28 2020, 4:19 PM
tenma created D4066: Fix buffer interface protocol and impls.
Sep 28 2020, 4:15 PM
tenma closed T2632: swh scanner fail to start when configuration file is missing as Resolved.
Sep 28 2020, 10:14 AM · Code scanner
tenma closed D4046: Fix default config file may be absent in scanner cli.
Sep 28 2020, 10:11 AM

Sep 25 2020

tenma updated the diff for D4046: Fix default config file may be absent in scanner cli.

resubmit after rebase

Sep 25 2020, 6:36 PM
tenma committed rDTSCNad23ee03c084: Fix default config file may be absent in scanner cli (authored by tenma).
Fix default config file may be absent in scanner cli
Sep 25 2020, 6:34 PM
tenma accepted D4040: Add a regression test for the buffer proxy default settings.
Sep 25 2020, 6:03 PM
tenma closed T2287: Improve code in BufferingProxyStorage as Resolved.
Sep 25 2020, 4:47 PM · Easy hack, Storage manager
tenma abandoned D4018: Make all storages compatible with buffering.

Superseded by D4033 D4034

Sep 25 2020, 4:42 PM
tenma committed rDSTOa75c5caf9df0: Improve typing of the buffering interface (authored by tenma).
Improve typing of the buffering interface
Sep 25 2020, 4:11 PM
tenma committed rDSTO632e99e477ae: Add static check to object_type literals in buffers (authored by tenma).
Add static check to object_type literals in buffers
Sep 25 2020, 4:11 PM
tenma closed D4033: Improve typing of the buffering interface.
Sep 25 2020, 4:11 PM
tenma closed D4034: Add static check to object_type literals in buffers.
Sep 25 2020, 4:11 PM
tenma added a comment to D4046: Fix default config file may be absent in scanner cli.

Can you show me the code you tried?

Sep 25 2020, 3:56 PM
tenma created P785 Cannot make click display my multiline help.
Sep 25 2020, 3:55 PM
tenma updated the diff for D4034: Add static check to object_type literals in buffers.

commit has changed hash

Sep 25 2020, 3:51 PM
tenma updated the diff for D4033: Improve typing of the buffering interface.

commit has changed hash

Sep 25 2020, 3:50 PM
tenma closed D4017: Improve code quality and doc in BufferedProxyStorage.
Sep 25 2020, 3:35 PM
tenma added a comment to D4046: Fix default config file may be absent in scanner cli.

IMO it's more readable like this

Sep 25 2020, 2:43 PM
tenma added a comment to D4046: Fix default config file may be absent in scanner cli.

Also, I added description of defaults in the command help, but it reads badly, do you know a better way?
Remarks:

  • clicks inline even if I use a docstring
  • moving it to the command/group docstring would resolve the problem, but causes unexpectedly the docstring to be ignored by click (we wants static strings here)
Sep 25 2020, 2:36 PM
tenma updated the diff for D4046: Fix default config file may be absent in scanner cli.

extracted isort change from commit, which was directly merged by olasd

Sep 25 2020, 2:28 PM
tenma created P784 Tox another fail in swh-scanner.
Sep 25 2020, 2:15 PM
tenma created P782 Tox fail in swh-scanner.
Sep 25 2020, 1:59 PM
tenma added a comment to D4046: Fix default config file may be absent in scanner cli.

fail if file does not exist instead of using empty config dict

Isn't it already the default behavior?

Sep 25 2020, 1:49 PM
tenma added a comment to D4046: Fix default config file may be absent in scanner cli.

on another note, do I write tests for this cli?

Sep 25 2020, 11:53 AM
tenma added inline comments to D4046: Fix default config file may be absent in scanner cli.
Sep 25 2020, 11:52 AM
tenma added a revision to T2632: swh scanner fail to start when configuration file is missing: D4046: Fix default config file may be absent in scanner cli.
Sep 25 2020, 11:44 AM · Code scanner
tenma created D4046: Fix default config file may be absent in scanner cli.
Sep 25 2020, 11:44 AM

Sep 24 2020

tenma created D4034: Add static check to object_type literals in buffers.
Sep 24 2020, 4:37 PM
tenma created D4033: Improve typing of the buffering interface.
Sep 24 2020, 4:35 PM
tenma created D4032: Fix default value handling in constructor.
Sep 24 2020, 4:32 PM
tenma added a comment to D4017: Improve code quality and doc in BufferedProxyStorage.

Last attempt:
https://docs.python.org/3/reference/datamodel.html#objects-values-and-types
clearly states what is object identity and that it does not change and that we compare it with is.

Sep 24 2020, 2:09 PM
tenma added a comment to D4017: Improve code quality and doc in BufferedProxyStorage.

Wanted also to rename constructor parameters but they are tied to the config parameters.

Sep 24 2020, 1:38 PM
tenma added a comment to D4017: Improve code quality and doc in BufferedProxyStorage.

@zack @olasd @vlorentz I am puzzled. Do I go with the ImmutableDict solution or throw away another part of what I did the last 3 days (did it also in another commit)? Already removed code that was against the strict signature checker in the unit tests.

Sep 24 2020, 1:36 PM
tenma added a comment to D4017: Improve code quality and doc in BufferedProxyStorage.

@vlorentz: true, this is bad. I added the check after, and didn't check this...

Sep 24 2020, 1:23 PM
tenma added a comment to D4017: Improve code quality and doc in BufferedProxyStorage.

And look! I can get rid of the identity check, just it would merge with itself. This one is to avoid perf penalty.

Sep 24 2020, 1:17 PM
tenma added a comment to D4017: Improve code quality and doc in BufferedProxyStorage.

The fact that is not so common a pattern does not make it bad.
It IS exactly like using None if we make this dict immutable, with added benefits of readability and checking. It even has no performance penalty or anything.

Sep 24 2020, 1:13 PM
tenma added a comment to D4017: Improve code quality and doc in BufferedProxyStorage.
In D4017#99688, @olasd wrote:

I see that e37f63930b323a1e811861d298e62516ed94649a has been pushed. Meh.

To properly push after a rebase, you need to do arc diff --update to make sure that the changes after rebase will be picked up by phabricator and the diff will be automatically closed.

Sep 24 2020, 12:57 PM
tenma added a comment to D4017: Improve code quality and doc in BufferedProxyStorage.

I view it that way:

  • identity checking a default value is always good, even if mutable, precisely because static values like these can never change identity (identity/value dichotomy). It would be wrong to value equality check it through if it is mutable of course;
  • this value can only be modified inside the module (modulo import time hacking), so the question are:
      • do we want it immutable (we don't plan to have code that mutate it)?
      • trust the module code for well behaving? it is a real policy question, I think your answer is no, but then why manual replacing None if we can do without it?
    • this pattern is equivalent to the None one, except we statically (as opposed to manually replace None by a default) never allow any invalid type like NoneType. I try to leverage static typing to the fullest, and avoid the potential "billion dollar mistake".

After this rationale, which could be a valid policy to introduce in the project, now the proposition is:

Sep 24 2020, 11:31 AM
tenma updated the diff for D4018: Make all storages compatible with buffering.

repush?

Sep 24 2020, 12:36 AM
tenma updated the diff for D4017: Improve code quality and doc in BufferedProxyStorage.

repush?

Sep 24 2020, 12:34 AM
tenma committed rDSTOe37f63930b32: Improve code quality and doc in BufferedProxyStorage (authored by tenma).
Improve code quality and doc in BufferedProxyStorage
Sep 24 2020, 12:28 AM
tenma updated the diff for D4018: Make all storages compatible with buffering.

Found how to do write passtrough functions while having good default handling and keep the signature checker happy. A bit hacky.

Sep 24 2020, 12:18 AM

Sep 23 2020

tenma updated the diff for D4017: Improve code quality and doc in BufferedProxyStorage.

Fix typo and remove TODO comment

Sep 23 2020, 4:15 PM
tenma added inline comments to D4017: Improve code quality and doc in BufferedProxyStorage.
Sep 23 2020, 3:56 PM
tenma added inline comments to D4017: Improve code quality and doc in BufferedProxyStorage.
Sep 23 2020, 2:50 PM
tenma planned changes to D4018: Make all storages compatible with buffering.

build failed and one thing to rework

Sep 23 2020, 1:25 PM
tenma created D4018: Make all storages compatible with buffering.
Sep 23 2020, 1:14 PM
tenma added a revision to T2287: Improve code in BufferingProxyStorage: D4017: Improve code quality and doc in BufferedProxyStorage.
Sep 23 2020, 1:08 PM · Easy hack, Storage manager
tenma created D4017: Improve code quality and doc in BufferedProxyStorage.
Sep 23 2020, 1:08 PM

Sep 22 2020

tenma accepted D3965: config: Deprecate SWHConfig in favor of load_from_envvar function.
Sep 22 2020, 11:45 AM
tenma added inline comments to D3965: config: Deprecate SWHConfig in favor of load_from_envvar function.
Sep 22 2020, 11:30 AM

Sep 21 2020

tenma added a comment to D3965: config: Deprecate SWHConfig in favor of load_from_envvar function.

I think you should not remove this code as it has one use case (filename is provided as parameter, from CLI or not) but have a different function name for the "prod" use case (e.g. parse_config_file_envvar).
Some parts in the old code are not needed anymore, but not all. In another diff we will cover the other use case.
For now better to have 2 functions.

Sep 21 2020, 2:48 PM
tenma updated the task description for T1410: Kill implicit configuration: new configuration scheme.
Sep 21 2020, 2:20 PM · Core & foundations

Sep 18 2020

tenma claimed T2287: Improve code in BufferingProxyStorage.
Sep 18 2020, 11:59 AM · Easy hack, Storage manager

Sep 17 2020

tenma updated the task description for T1410: Kill implicit configuration: new configuration scheme.
Sep 17 2020, 6:12 PM · Core & foundations
tenma renamed T1410: Kill implicit configuration: new configuration scheme from Kill implicit configuration: new configuration scheme to Kill implicit configuration : new configuration scheme.
Sep 17 2020, 5:20 PM · Core & foundations
tenma renamed T1410: Kill implicit configuration: new configuration scheme from Kill implicit configuration to Kill implicit configuration : new configuration scheme.
Sep 17 2020, 10:50 AM · Core & foundations

Sep 16 2020

tenma added inline comments to D3965: config: Deprecate SWHConfig in favor of load_from_envvar function.
Sep 16 2020, 5:18 PM
tenma added inline comments to D3965: config: Deprecate SWHConfig in favor of load_from_envvar function.
Sep 16 2020, 4:36 PM

Sep 15 2020

tenma accepted D3953: config: Clarify the configuration setup path for the server part.
Sep 15 2020, 6:07 PM
tenma added inline comments to D3953: config: Clarify the configuration setup path for the server part.
Sep 15 2020, 4:12 PM
tenma added inline comments to D3953: config: Clarify the configuration setup path for the server part.
Sep 15 2020, 4:01 PM
tenma added inline comments to D3953: config: Clarify the configuration setup path for the server part.
Sep 15 2020, 3:57 PM
tenma added inline comments to D3953: config: Clarify the configuration setup path for the server part.
Sep 15 2020, 3:56 PM
tenma committed rDDOC46ad8ea561c6: Update and organise debian deps for swh-env (authored by tenma).
Update and organise debian deps for swh-env
Sep 15 2020, 3:40 PM
tenma closed D3954: Update and organise debian deps for swh-env.
Sep 15 2020, 3:40 PM
tenma updated the diff for D3954: Update and organise debian deps for swh-env.

dedented debian packages and updated one description

Sep 15 2020, 2:39 PM