Summary:
The parent index for blame ranges is the index of the first *changeset* parent
that contains the file, not the index of the unode parent, which is what is
currently used for non-copy parents. In fact, unode parents are guaranteed to
exist, so currently this will always be 0.
Change the calculation to work out which changeset parent contains the file.
Differential Revision: D29453805
fbshipit-source-id: 98950090a7d87e4ece22d8047dc3794ac52ec4a2
Summary:
If the default is to pass certificates we should hard fail every single time they are not found instead silently making unauthenticated request. This will surface issues much quicker.
best_match_for can return `Ok(None)`.
Reviewed By: johansglock
Differential Revision: D29159532
fbshipit-source-id: ff28a627d91a9cf37258a97dc2c7f709ba8d00c2
Summary:
Adds class `ConfigeratorRedactedBlobs` that reads redaction data from configerator, and reloads it when necessary.
The class does this:
- Reads `RedactionSets` from configerator.
- For each key there, read `RedactionConfigBlobstore` looking for a `RedactionKeyList` with that key (these were populated by D29033598).
- From the keys listed, builds the map of redacted blobs, with the same format as before when it was fetched from XDB.
- Periodically checks if config changed. If so, reload the map of redactions. (should only happen when we land a new config change to redaction, which should be very very rare)
- We use ArcSwap to keep the config, as a good way to provide read-only access with eventual reloading.
Not implemented on this diff:
- Creation of `ConfigeratorRedactedBlobs`, or adding it to `RedactedBlobs` enum.
It's not used in this diff, will be used in the future, I split it mostly to make it easier to review.
Reviewed By: StanislavGlebik
Differential Revision: D29033595
fbshipit-source-id: 36603685433b6dd153f2c23123907f7311c20a32
Summary:
This diff adds two subsubcommands to mononoke admin:
```
- admin redaction create-key-list
- admin redaction create-key-list-from-ids
```
The first works similar to `admin redaction add`, but instead of inserting it to XDB, it instead creates a RedactionKeyList object, inserts it into the blobstore and prints its content.
The second just takes a list of keys as a raw input. Usually, the first one should be used. The second will **only** be used to migrate the current setup to be in configerator.
Reviewed By: markbt
Differential Revision: D29033598
fbshipit-source-id: 4d181d2b5c7701c7e88114a26d9219cada86c618
Summary:
This diff adds a class RedactionConfigBlobstore, which can be built using `RepoFactory`.
It is a prefix blobstore (with prefix "redactionconfig") that's created independent to all other repo blobstores. And it's where we'll store the blobs related to redaction key lists.
I created this because AFAICT using RepoFactory we can only build RepoBlobstore, which are partitioned by repo, which we don't want for redaction as it is generic for all repos.
It's not used in this diff, will be used in the future, I split it mostly to make it easier to review.
Reviewed By: markbt
Differential Revision: D29033599
fbshipit-source-id: 5c44a73e2097c0de3abad038f45166f42a14a70b
Summary: Syncing configerator changes from D29360425, and fixing all tests. Not used yet.
Reviewed By: markbt
Differential Revision: D29363416
fbshipit-source-id: d2de13d32bcec2e7fbff20204be8d9a8d65c0efe
Summary:
This reads the config added on D29305462. It populates it into `CommonConfig` struct, and also adds it to `RepoFactory`, but doesn't yet use it anywhere, this will be done on the next diff.
There is a single behaviour change in this diff, which I believe should be harmless but is noted in the comments in case it isn't.
Reviewed By: markbt
Differential Revision: D29272581
fbshipit-source-id: 62cd7dc78478c1d8cb212eafdd789527ead50ef6
Summary:
While debugging T94402830 I noticed that logview category was using quite a lot
of scribe quota, however we don't really use it much. The reason it was using a
lot of scribe quota is because we were logging all stderr messages to logview,
even "DEBUG" ones. That might also be the reason why we didn't use logview - it
was too spammy.
Let's make it possible to add an additional log level filter for logview, so
that we could log only e.g. warn log messages and above.
Reviewed By: Croohand
Differential Revision: D29456888
fbshipit-source-id: 8cc66773ca8d82b00c3337937f519f6140fc8c9d
Summary:
The type of "value" field is char, and so GetGlobalrevCounter was failing with
```
MySQL Value Error: Expected row field to be RowField::Long, but got
RowField::Bytes
```
The reason we haven't seen it before is because this query is called only when
IncreaseGlobalrevCounter didn't change a single row, and that's usually not the
case.
Reviewed By: HarveyHunt
Differential Revision: D29482685
fbshipit-source-id: 32073edcf5d57d7dad275a65c2e0f67b7321cef2
Summary:
scs server is full of messages that tell us that everything it ok. They are not
particularly useful and noisy - let's log only if we have a non-zero lag
Reviewed By: farnz
Differential Revision: D29457065
fbshipit-source-id: ab759745455f3b560e6230ade9f8a9095a3d961e
Summary:
add 'upload/filenodes' request
This API must be called after file content has been uploaded. It requires a valid upload token for already uploaded file content.
The token can contain file content id of different types (canonical, sha1, sha256). It may or may not contain content size.
Reviewed By: StanislavGlebik
Differential Revision: D29197219
fbshipit-source-id: 3de31831ab06265675617a5c43cbd4be91f5cbe2
Summary: This diff connects the trace bus with trace fs command.
Reviewed By: chadaustin
Differential Revision: D29367135
fbshipit-source-id: f9217b286c1a21805d70b21282c10d4ad722a391
Summary: If the handler throws without returning a future, the finish event will not be published. This diff adds the `LiveRequest` to publish finish event in its destructor.
Reviewed By: chadaustin
Differential Revision: D29332452
fbshipit-source-id: 880a4b67ba47b737063a3955c9f4bdbf605f1a43
Summary:
This diff adds tracking for nfs, based on the implementation of that of `FuseChannel`.
Also commented below few questions on the implementation before working on integrating to `strace`.
Reviewed By: chadaustin
Differential Revision: D29279126
fbshipit-source-id: de6bb36dfbe2f550a91f2bf254616bbc639c0c3d
Summary:
If the repo changelog was migrated to lazy, existing processes including the
import helpers might start failing to resolve commits. Detect that, and request
a restart of the import helper.
An example traceback:
edenscm.mercurial.error.RepoLookupError: unknown revision 'ce48ccc4197b2066a8c7f2a930cee89e8aea6379'
2021-06-29 12:33:12,738 error processing command 4
Traceback (most recent call last):
File "edenscm/mercurial/commands/eden.py", line 363, in process_request
cmd_function(req)
File "edenscm/mercurial/commands/eden.py", line 604, in cmd_manifest_node_for_commit
node = self.get_manifest_node(rev_name)
File "edenscm/mercurial/commands/eden.py", line 821, in get_manifest_node
return self._get_manifest_node_impl(rev)
File "edenscm/mercurial/commands/eden.py", line 790, in _get_manifest_node_impl
node_hash = ctx.manifestnode()
File "edenscm/mercurial/context.py", line 569, in manifestnode
return self._changeset.manifest
File "edenscm/mercurial/util.py", line 987, in __get__
result = self.func(obj)
File "edenscm/mercurial/context.py", line 540, in _changeset
return self._repo.changelog.changelogrevision(self._node)
File "edenscm/mercurial/changelog2.py", line 374, in changelogrevision
return changelogrevision(self.revision(nodeorrev))
File "edenscm/mercurial/changelog2.py", line 463, in revision
p1, p2 = self.parents(node)[:2]
File "edenscm/mercurial/changelog2.py", line 610, in parents
parents = list(self.dag.parentnames(node))
error.CommitLookupError: '<int> cannot be found'
Reviewed By: andll
Differential Revision: D29470181
fbshipit-source-id: 40ad6eebe1f656c63d3f96b2b70ad60b350eed21
Summary: Hack to use parexec and the par directly.
Reviewed By: chadaustin
Differential Revision: D29461444
fbshipit-source-id: 9ac6c1aa43728782b8de0a71446109f7fd5dab1d