fix(views/kit): communicate :unsign in the tvl-kit URL directly

Instead of prepending :unsign to all URLs in josh-proxy, and for all
calls to filteredGitPush, explicitly use it only in the filter we use
for the `export-kit` extraStep.

This means, people cloning tvl-kit via

> https://code.tvl.fyi/depot.git:workspace=views/kit.git

now need to update the URL to point to

> https://code.tvl.fyi/depot.git:unsign:workspace=views/kit.git

instead.

git@github.com:tvlfyi/kit.git will keep the same hashes, as it's updated
to export the unsigned workspace view of it.

This is less invasive than dooming every josh workspace to have to strip
signatures.

Change-Id: I6de05182fad4c3695081388c3bbf37306521d255
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8369
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
Florian Klink 2023-03-30 16:30:22 +02:00 committed by clbot
parent 1139109063
commit e9686f84d9
5 changed files with 6 additions and 6 deletions

View file

@ -26,7 +26,7 @@ in
DynamicUser = true; DynamicUser = true;
StateDirectory = "josh"; StateDirectory = "josh";
Restart = "always"; Restart = "always";
ExecStart = "${depot.third_party.josh}/bin/josh-proxy --no-background --local /var/lib/josh --port ${toString cfg.port} --remote https://cl.tvl.fyi/ --require-auth --filter-prefix ':unsign'"; ExecStart = "${depot.third_party.josh}/bin/josh-proxy --no-background --local /var/lib/josh --port ${toString cfg.port} --remote https://cl.tvl.fyi/ --require-auth";
}; };
}; };
}; };

View file

@ -19,8 +19,8 @@ in
set -e set -e
export PATH="${makeBinPath [ pkgs.git depot.third_party.josh ]}:$PATH" export PATH="${makeBinPath [ pkgs.git depot.third_party.josh ]}:$PATH"
echo 'Filtering depot through :unsign ${filter}' echo 'Filtering depot through ${filter}'
josh-filter ':unsign ${filter}' josh-filter '${filter}'
echo 'Fetching remote to check if a push is needed' echo 'Fetching remote to check if a push is needed'
git fetch '${remote}' '${ref}' git fetch '${remote}' '${ref}'

View file

@ -15,7 +15,7 @@ look like:
- Commit your changes. This is required, as `josh-filter` operates on your - Commit your changes. This is required, as `josh-filter` operates on your
`HEAD`, not working directory state. `HEAD`, not working directory state.
- Invoke `josh-filter` with the filter expression, - Invoke `josh-filter` with the filter expression,
for example `josh-filter ':workspace=views/kit'`. for example `josh-filter ':workspace=views/tvix'`.
- Peek at the synthesized git history by looking at `FILTERED_HEAD`. - Peek at the synthesized git history by looking at `FILTERED_HEAD`.
Testing changes in Gerrit Testing changes in Gerrit

View file

@ -9,7 +9,7 @@ let
}; };
export-kit = depot.tools.releases.filteredGitPush { export-kit = depot.tools.releases.filteredGitPush {
filter = ":workspace=views/kit"; filter = ":unsign:workspace=views/kit";
remote = "git@github.com:tvlfyi/kit.git"; remote = "git@github.com:tvlfyi/kit.git";
ref = "refs/heads/canon"; ref = "refs/heads/canon";
}; };

View file

@ -17,7 +17,7 @@ tooling, currently comprising of:
It can be accessed via git by cloning it as such: It can be accessed via git by cloning it as such:
git clone https://code.tvl.fyi/depot.git:workspace=views/kit.git tvl-kit git clone https://code.tvl.fyi/depot.git:unsign:workspace=views/kit.git tvl-kit
If you are looking at this within the TVL depot, you can see the If you are looking at this within the TVL depot, you can see the
[josh][] configuration in `workspace.josh`. You will find the projects [josh][] configuration in `workspace.josh`. You will find the projects