Skip to content

Commit dc6d01c

Browse files
committed
[static] Merge branch 'main' into isegall/migrate-issues
Signed-off-by: Itai Segall <itai.segall@digitalasset.com>
2 parents 54868bc + a6f7631 commit dc6d01c

File tree

73 files changed

+4681
-532
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+4681
-532
lines changed

.github/actions/scripts/common_setup.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ git checkout main
1717
echo "GITHUB_HEAD_REF: ${GITHUB_HEAD_REF:-}"
1818
if [ -n "${GITHUB_HEAD_REF:-}" ] && [ "$GITHUB_HEAD_REF" != "main" ]; then
1919
echo "Checking out $GITHUB_HEAD_REF"
20-
git checkout "$GITHUB_HEAD_REF"
20+
# On PRs from forks, GITHUB_HEAD_REF is the name of the branch in the forked repo, so we cannot actually checkout that branch directly.
21+
git checkout "$GITHUB_HEAD_REF" || true
2122
fi
2223
git fetch origin 'refs/heads/release-line*:refs/heads/origin/release-line*' --force
2324

.github/workflows/build.docs.yml

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,30 +38,11 @@ jobs:
3838
# as it finishes fastest and we want to ensure that it includes test sources.
3939
cmd: "Test/compile docs/bundle"
4040

41-
# TODO(#1028): Reenable this
42-
# - name: Push documentation
43-
# uses: ./.github/actions/nix/run_bash_command_in_nix
44-
# if: github.ref == 'refs/heads/main' && github.event_name == 'push'
45-
# env:
46-
# GH_USER: ${{ github.actor }}
47-
# GH_TOKEN: ${{ secrets.GH_ISSUES }}
48-
# with:
49-
# additional_nix_args: "--keep GH_USER --keep GH_TOKEN"
50-
# cmd: |
51-
# REPO_DIR="$(mktemp -d)"
52-
# export GIT_SSH_COMMAND="/usr/bin/ssh"
53-
# git config --global user.email "splice-maintainers@digitalasset.com"
54-
# git config --global user.name "DA Automation"
55-
# git clone https://$GH_USER:$GH_TOKEN@github.com/digital-asset/decentralized-canton-sync.git "$REPO_DIR" -b docs
56-
# # Given that we just wanna overwrite anything an rm + cp seems more straightforward than an rsync.
57-
# rm -rf "$REPO_DIR/docs"
58-
# cp -r "docs/html/html" "$REPO_DIR/docs"
59-
# # Required to make GH service the _static directory properly.
60-
# touch "$REPO_DIR/docs/.nojekyll"
61-
# cd "$REPO_DIR"
62-
# git add .
63-
# git commit -m 'Update documentation'
64-
# git push origin docs
41+
- name: Upload documentation artifacts
42+
uses: actions/upload-pages-artifact@2d163be3ddce01512f3eea7ac5b7023b5d643ce1
43+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
44+
with:
45+
path: docs/html/html
6546

6647
- name: Post-SBT job
6748
uses: ./.github/actions/sbt/post_sbt

.github/workflows/cimain.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Deploy CIMain
2+
on:
3+
push:
4+
branches:
5+
- 'main'
6+
7+
jobs:
8+
trigger_cimain:
9+
uses: ./.github/workflows/cluster_tests.yml
10+
secrets: inherit
11+
with:
12+
workflow: deploy_cimain
13+
sha: ${{ github.sha }}

.github/workflows/ciupgrade.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Deploy CIUpgrade
2+
on:
3+
push:
4+
branches:
5+
- 'main'
6+
7+
jobs:
8+
trigger_ciupgrade:
9+
uses: ./.github/workflows/cluster_tests.yml
10+
secrets: inherit
11+
with:
12+
workflow: deploy_ciupgrade
13+
sha: ${{ github.sha }}

.github/workflows/cluster_tests.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ on:
99
sha:
1010
type: string
1111
required: true
12-
public_splice:
13-
type: boolean
14-
required: false
1512

1613
outputs:
1714
result:
@@ -42,5 +39,5 @@ jobs:
4239
run: |
4340
set -euo pipefail
4441
result=$(curl -sSfL -H "Authorization: Bearer ${{ steps.auth.outputs.id_token }}" \
45-
"${{ secrets.CLUSTER_TEST_INVOKER_URL }}?workflow=${{ inputs.workflow }}&splice-git-ref=${{ inputs.sha }}&public-splice=${{ inputs.public_splice }}")
42+
"${{ secrets.CLUSTER_TEST_INVOKER_URL }}?workflow=${{ inputs.workflow }}&splice-git-ref=${{ inputs.sha }}")
4643
echo "result=$result" >> "$GITHUB_OUTPUT"

.github/workflows/post_merge.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,22 @@ jobs:
2020
ci:
2121
uses: ./.github/workflows/build.yml
2222
secrets: inherit
23+
24+
publish_docs:
25+
if: github.ref == 'refs/heads/main'
26+
needs: ci
27+
runs-on: self-hosted-docker-tiny
28+
29+
permissions:
30+
pages: write # to deploy to Pages
31+
id-token: write # to verify the deployment originates from an appropriate source
32+
33+
# Deploy to the github-pages environment
34+
environment:
35+
name: github-pages
36+
url: ${{ steps.deployment.outputs.page_url }}
37+
38+
steps:
39+
- name: Deploy to GitHub Pages
40+
id: deployment
41+
uses: actions/deploy-pages@854d7aa1b99e4509c4d1b53d69b7ba4eaf39215a

.github/workflows/pr_cluster_test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ jobs:
3333
with:
3434
workflow: cluster_test
3535
sha: ${{ needs.get_head.outputs.sha }}
36-
public_splice: ${{ github.repository == 'hyperledger-labs/splice' }}
3736

3837
result:
3938
runs-on: self-hosted-docker-tiny
@@ -54,7 +53,6 @@ jobs:
5453
with:
5554
workflow: hdm_test
5655
sha: ${{ needs.get_head.outputs.sha }}
57-
public_splice: ${{ github.repository == 'hyperledger-labs/splice' }}
5856

5957
result_hdm:
6058
runs-on: self-hosted-docker-tiny

apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/AnsAuth0FrontendIntegrationTest.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import org.lfdecentralizedtrust.splice.integration.EnvironmentDefinition
77
import org.lfdecentralizedtrust.splice.util.{FrontendLoginUtil, AnsFrontendTestUtil, WalletTestUtil}
88
import monocle.macros.syntax.lens.*
99

10-
import java.net.URL
10+
import java.net.URI
1111

1212
class AnsAuth0FrontendIntegrationTest
1313
extends FrontendIntegrationTest("alice")
@@ -29,7 +29,9 @@ class AnsAuth0FrontendIntegrationTest
2929
.replace(
3030
Rs256(
3131
sys.env("OIDC_AUTHORITY_VALIDATOR_AUDIENCE"),
32-
new URL(s"https://${sys.env("SPLICE_OAUTH_TEST_AUTHORITY")}/.well-known/jwks.json"),
32+
new URI(
33+
s"https://${sys.env("SPLICE_OAUTH_TEST_AUTHORITY")}/.well-known/jwks.json"
34+
).toURL,
3335
)
3436
)
3537
)(c)

apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/WalletAuth0FrontendIntegrationTest.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import org.lfdecentralizedtrust.splice.util.{
1212
}
1313
import monocle.macros.syntax.lens.*
1414

15-
import java.net.URL
15+
import java.net.URI
1616

1717
class WalletAuth0FrontendIntegrationTest
1818
extends FrontendIntegrationTest("randomUser")
@@ -31,7 +31,9 @@ class WalletAuth0FrontendIntegrationTest
3131
.replace(
3232
Rs256(
3333
sys.env("OIDC_AUTHORITY_VALIDATOR_AUDIENCE"),
34-
new URL(s"https://${sys.env("SPLICE_OAUTH_TEST_AUTHORITY")}/.well-known/jwks.json"),
34+
new URI(
35+
s"https://${sys.env("SPLICE_OAUTH_TEST_AUTHORITY")}/.well-known/jwks.json"
36+
).toURL,
3537
)
3638
)
3739
)(spliceConfig)

apps/common/frontend/src/contexts/LedgerApiContext.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ import { Choice, ContractId, Template, TemplateOrInterface } from '@daml/types';
1010

1111
const ANS_LEDGER_NAME = 'ans-ledger';
1212

13+
interface JsonApiErrorBody {
14+
error: string;
15+
}
16+
1317
interface JsonApiErrorResponse {
1418
status: number;
1519
statusText: string;
1620
body: JsonApiErrorBody;
1721
}
1822

19-
interface JsonApiErrorBody {
20-
error: string;
21-
}
22-
2323
export class JsonApiError extends Error {
2424
status: number;
2525
statusText: string;

0 commit comments

Comments
 (0)