Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sancho-v1.0.7 #1332

Merged
merged 183 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
faa4928
WIP Update stress tests
mesudip May 24, 2024
f69a78d
Fetch Drep and Proposal Ids for seeding
mesudip Jun 3, 2024
84a968d
test: Dashboard learn more button action
kneerose Jun 7, 2024
828ea2d
test: Abstain and signal-no-confidence info button action
kneerose Jun 7, 2024
45ff0a8
test: DRep registration and edit dRep registration page restriction
kneerose Jun 7, 2024
d01e85a
refactor: Split miscellaneous tests based on dRep and loggedin depend…
kneerose Jun 7, 2024
86df750
chore: Refactor inconsistent test title numbering
NabinKawan Jun 12, 2024
9894aff
Fix: Add missing file on backend test
mesudip Jun 13, 2024
3ef147a
Chore: Test stack - Add Sentry config
mesudip Jun 10, 2024
6ebbeaa
Fix: Add sentry Backend DSN in playbook
mesudip Jun 10, 2024
a1dac9b
Chore: Upgrade cardano-db-sync to sancho-5-0-0
mesudip Jun 11, 2024
08f71bc
Add doc for enbsubst.py
mesudip Jun 13, 2024
025462d
Merge pull request #1270 from IntersectMBO/infra/test-chores
mesudip Jun 13, 2024
3b4bdc9
Fix: Fix metadata-validation default url
mesudip Jun 13, 2024
ff388e2
Merge pull request #1271 from IntersectMBO/fixes/test-deployment
NabinKawan Jun 13, 2024
5b3ea0b
Merge pull request #1269 from IntersectMBO/fix/backend-tests
mesudip Jun 13, 2024
ffc2ba6
Fix: backend config and tests
mesudip Jun 13, 2024
91dad17
Merge pull request #1216 from IntersectMBO/extended/tests
NabinKawan Jun 13, 2024
561ae26
Merge pull request #1273 from IntersectMBO/fix/backend-tests
mesudip Jun 13, 2024
b6f9598
#1244 add markdown element
Sworzen1 Jun 13, 2024
239a6d9
Update proposal format for test
mesudip Jun 13, 2024
2176317
add test for render markdown component
Sworzen1 Jun 13, 2024
31e3731
feat(#1284): replace govtool-wrapper GA creation in favor of PDF Pillar
MSzalowski Jun 13, 2024
e20ffea
chore(#1281): increase level of logs of metada validation service
MSzalowski Jun 13, 2024
27a9862
Merge pull request #1290 from IntersectMBO/chore/1281-provide-more-lo…
MSzalowski Jun 13, 2024
8a184d4
Merge pull request #1289 from IntersectMBO/feat/1284-replace-govtool-…
MSzalowski Jun 13, 2024
e2e368b
improve connect/disconnect wallet navigation
Sworzen1 Jun 14, 2024
5af9a31
Merge pull request #1292 from IntersectMBO/fix/1119-bug-wallet-discon…
Sworzen1 Jun 14, 2024
7b9f8bd
Merge branch 'develop' of https://github.com/IntersectMBO/govtool int…
Sworzen1 Jun 14, 2024
3b47ab3
update yarn
Sworzen1 Jun 14, 2024
e67c673
Merge pull request #1276 from IntersectMBO/fix/1244-bug-cip-108-metad…
Sworzen1 Jun 14, 2024
e0df013
fix(#1282): fix validation for missing references
MSzalowski Jun 14, 2024
3120e0f
Merge pull request #1294 from IntersectMBO/develop
pmbinapps Jun 14, 2024
e42795c
Merge pull request #1285 from IntersectMBO/chore/backend-tests-update
mesudip Jun 17, 2024
16d6734
use optional chaining
Sworzen1 Jun 17, 2024
ff3345b
Merge pull request #1296 from IntersectMBO/fix/1282-missing-reference…
MSzalowski Jun 17, 2024
8690cd1
chore: remove unsafe-inline for font-src csp directive
MSzalowski Jun 14, 2024
d8aedbf
fix(#1244): fix direction on the governance actions
MSzalowski Jun 17, 2024
3a140e3
Merge pull request #1311 from IntersectMBO/fix/1244-bug-cip-108-wrong…
MSzalowski Jun 17, 2024
cb078c8
chore: bump pdf-ui package to v0.1.8;
MSzalowski Jun 17, 2024
4e58cde
Merge pull request #1309 from IntersectMBO/chore/bump-pdf-ui-package
MSzalowski Jun 18, 2024
7f12996
fix text area story
Sworzen1 Jun 17, 2024
8efd006
fix dashboard card story
Sworzen1 Jun 17, 2024
25903eb
fix voting power chips story
Sworzen1 Jun 17, 2024
788bbde
fix test
Sworzen1 Jun 17, 2024
98fb67b
delete unnecessary code
Sworzen1 Jun 17, 2024
954f7f6
remove coments
Sworzen1 Jun 18, 2024
821dd30
fix: dashboard action card drepId storybook test
MSzalowski Jun 17, 2024
070154f
Merge pull request #1306 from IntersectMBO/fix/1305-bug-white-screen-…
Sworzen1 Jun 18, 2024
566b057
fix(#1244): Fix styling of the markdowns on the slider cards
MSzalowski Jun 18, 2024
800817b
Merge pull request #1310 from IntersectMBO/fix/1307-bug-storybook-com…
Sworzen1 Jun 18, 2024
c9b0f69
Merge pull request #1315 from IntersectMBO/fix/1244-bug-cip-108-wrong…
MSzalowski Jun 18, 2024
4aa67f8
Setup deployment for storybook
NabinKawan Jun 17, 2024
beb84eb
fix(#1313): fix blank screen on GAs voting when wallet is not initial…
MSzalowski Jun 18, 2024
2451876
Merge pull request #1321 from IntersectMBO/fix/1313-ga-change-vote-as…
MSzalowski Jun 18, 2024
2420404
Merge pull request #1302 from IntersectMBO/chore/remove-invalid-unsaf…
MSzalowski Jun 18, 2024
96533a2
Merge pull request #1322 from IntersectMBO/develop
MSzalowski Jun 18, 2024
44bf92f
chore(#1324): Add sentry environment config
MSzalowski Jun 18, 2024
7b932e1
Merge pull request #1325 from IntersectMBO/chore/1324-handle-sentry-e…
MSzalowski Jun 18, 2024
745c1b7
chore: bump pdf-ui to v0.1.9
MSzalowski Jun 18, 2024
f514f5b
Merge pull request #1328 from IntersectMBO/chore/bump-pdf-ui-package
MSzalowski Jun 18, 2024
284b60c
Merge pull request #1330 from IntersectMBO/develop
MSzalowski Jun 18, 2024
a9a6627
Merge pull request #1323 from IntersectMBO/test
MSzalowski Jun 18, 2024
d1bdf06
Fix Storybook deployment setup
mesudip Jun 19, 2024
789a330
Configure Google tag manager in test stack
mesudip Jun 19, 2024
6d82a29
Fix SonarQube analysis
mesudip Jun 19, 2024
e13cb49
Workflow: Configure registry url and scope
mesudip Jun 19, 2024
7fcac21
Increase heap size for test run
mesudip Jun 19, 2024
3b09d37
Run SonarQube scan on test failure
mesudip Jun 19, 2024
5436aea
Merge pull request #1336 from IntersectMBO/fixes/test-stack-gtm
mesudip Jun 19, 2024
aeda2cd
Update sentry DNS variable in test stack
mesudip Jun 19, 2024
98de2a2
Merge pull request #1339 from IntersectMBO/chore/update-sentry-dns
mesudip Jun 19, 2024
0b41db6
Merge pull request #1338 from IntersectMBO/fix/sonarqube-analysis
mesudip Jun 19, 2024
b6d611c
Add placement constraint on storybook service
mesudip Jun 19, 2024
85d2f28
Merge pull request #1316 from IntersectMBO/feat/deploy-storybook
mesudip Jun 19, 2024
3dd1b06
Make user-scenarios on stress-test readable
mesudip Jun 19, 2024
f37bf63
feat: Proposal services to create,delete proposal and add poll on pro…
kneerose Jun 12, 2024
9b04367
feat: Add proposal setup and teardown
kneerose Jun 12, 2024
b489f6e
chore: Add proposal discussion and its details page
kneerose Jun 12, 2024
41a2091
chore: Add fixture of proposal discussion details page
kneerose Jun 12, 2024
c11724f
test: proposal discussion forum [WIP]
kneerose Jun 12, 2024
46e796e
chore: Make types first character capital
kneerose Jun 13, 2024
64fc37c
feat: Add proposal comment service and use it on temporary proposal c…
kneerose Jun 13, 2024
fc16116
chore: Add helper for create file
NabinKawan Jun 13, 2024
d0031e9
chore: Refactor proposal-setup to create static proposals
NabinKawan Jun 13, 2024
e04b7fa
test: Share proposed governance action and proposal discussions acces…
NabinKawan Jun 13, 2024
4a5115f
chore: Refactor proposal discussion service and creation flow
NabinKawan Jun 13, 2024
779f5a6
test: Poll voting and Proposal creation restriction
NabinKawan Jun 13, 2024
68ef3aa
chore: Remove proposal manager
kneerose Jun 13, 2024
19dfcd6
test: Sort comment and disable poll voting
kneerose Jun 13, 2024
dec2a08
fix: Base file path of mock
kneerose Jun 13, 2024
e67caf0
test: Set username
kneerose Jun 13, 2024
d546c00
chore: Add mulple proposal deletion
kneerose Jun 13, 2024
b891e62
test: Comment and reply anonymously
kneerose Jun 13, 2024
bcebe1b
chore: Setup proposal wallet
NabinKawan Jun 14, 2024
1e92c89
tempFix: Slow page loading by changing test timeout to 90 sec
NabinKawan Jun 14, 2024
c4f286a
chore: Setup/Teardown proposal using ui approach
NabinKawan Jun 14, 2024
4c5116a
test: comment and reply proposal
NabinKawan Jun 14, 2024
e7336b9
chore: Enhance fixture proposalDiscussionDetailsPage to proposal
NabinKawan Jun 14, 2024
2e3988a
tempFix: Reload after sanchonet info on login
NabinKawan Jun 14, 2024
db2dd90
test: Update anonymous username to set username in comments
NabinKawan Jun 14, 2024
140b527
chore: Mock proposal, poll for visibility testing
NabinKawan Jun 14, 2024
17ac9cc
chore: Add pollEnabled option on proposal fixture
kneerose Jun 14, 2024
42ce3c3
test: Vote and change vote functionality in proposal poll
kneerose Jun 14, 2024
815d712
test: Add and cancel poll
kneerose Jun 14, 2024
fc038b2
chore: Remove proposal teardown and setup
kneerose Jun 14, 2024
58ab129
fix: Search gov action list
kneerose Jun 14, 2024
655770e
fix: test poll proposal
NabinKawan Jun 14, 2024
2ca0cc4
chore: Refactor test username
NabinKawan Jun 14, 2024
dd464db
test: Comments visibility
NabinKawan Jun 14, 2024
4255fa3
chore: Remove unused proposal discussion services
NabinKawan Jun 19, 2024
1b147e0
chore: Fix typo in test title (6F)
NabinKawan Jun 19, 2024
d95d625
Merge pull request #1301 from IntersectMBO/feat/pdf-tests
NabinKawan Jun 19, 2024
8c337e6
Merge pull request #1149 from IntersectMBO/chore/update-stress-tests
mesudip Jun 19, 2024
4b95ff3
chore: add force rebuild images toggle to github actions
MSzalowski Jun 19, 2024
8bb1b0b
Merge pull request #1342 from IntersectMBO/chore/add-force-rebuild-im…
MSzalowski Jun 19, 2024
0b5a5ee
Merge pull request #1343 from IntersectMBO/develop
MSzalowski Jun 19, 2024
ea489a1
Merge pull request #1344 from IntersectMBO/test
MSzalowski Jun 19, 2024
11a8d87
Test-infra: Expose storybook deployment publicly
mesudip Jun 19, 2024
2611b68
Test-infra: Add USERSNAP_SPACE_API_KEY build-arg
mesudip Jun 19, 2024
a2f1f09
Merge pull request #1356 from IntersectMBO/fix/storybook-deployment
NabinKawan Jun 20, 2024
8a91ce2
Merge pull request #1359 from IntersectMBO/infra/test-chores
mesudip Jun 20, 2024
c235dd9
chore: Update proposal-id for frontend validation in sorting
NabinKawan Jun 20, 2024
b18c87d
Fix CSP issue blocking Sentry requests in Traefik configuration
placek Jun 20, 2024
bfa66c6
Merge pull request #1362 from IntersectMBO/bug/1218-resolve-csp-issue…
placek Jun 20, 2024
248c6b8
Merge pull request #1360 from IntersectMBO/bugfix/test-4C_2
NabinKawan Jun 21, 2024
179d4e7
chore: Update matadata-anchor incorrect test ids
kneerose Jun 20, 2024
a792eb4
fix: Metadata error modal
kneerose Jun 20, 2024
340554a
chore: Add email and bio data on update dRep test
kneerose Jun 20, 2024
3b73afe
chore: Change navigation of dRep details page
kneerose Jun 21, 2024
97e8f28
chore: Add "add link" button click event on edit dRep
kneerose Jun 21, 2024
f1297b8
chore: Add missing testids on dRepDirectory page
kneerose Jun 20, 2024
4f4dbf0
chore: Add missing testids on dRep Registration page
kneerose Jun 20, 2024
e6940d4
chore: Add missing test ids on GA page
kneerose Jun 20, 2024
8ff03fa
Merge pull request #1395 from IntersectMBO/fix/metadata-validation
NabinKawan Jun 21, 2024
c76b129
Merge pull request #1394 from IntersectMBO/fix/dRep-GA-missing-test-ids
NabinKawan Jun 21, 2024
0b29322
Merge pull request #1396 from IntersectMBO/bugfix/test-2N-3M
NabinKawan Jun 21, 2024
dfd6094
fix edit drep form
Sworzen1 Jun 21, 2024
013e0ab
fix Modal ref error
Sworzen1 Jun 19, 2024
3e74a2d
fix tab index Modal
Sworzen1 Jun 19, 2024
2181a36
fix nested p error
Sworzen1 Jun 19, 2024
781914d
fix cannot get value from undefined and improve sanchonet info modal
Sworzen1 Jun 19, 2024
f185f8b
fix navigation
Sworzen1 Jun 19, 2024
46c2d1d
fix: Dashboard and homepage learn more navigation link
kneerose Jun 17, 2024
2c96724
fix: Abstain and signal-no-confidence info navigation url
kneerose Jun 17, 2024
bd439fa
chore: Replace hardcoded docs url with constant
kneerose Jun 21, 2024
f4e24da
Merge pull request #1337 from IntersectMBO/fix/console-errors
Sworzen1 Jun 21, 2024
4852a48
Merge pull request #1392 from IntersectMBO/refactor/test-docs-url-link
NabinKawan Jun 21, 2024
be00b50
chore: fix flaky tests
MSzalowski Jun 20, 2024
5dc08a4
Merge pull request #1373 from IntersectMBO/chore/1334-fix-sonarqube-a…
MSzalowski Jun 21, 2024
dbb00ed
feat: pass govtool metadata validator to pdf pillar
MSzalowski Jun 20, 2024
b90e1d4
Merge pull request #1374 from IntersectMBO/feat/pass-govtool-metadata…
MSzalowski Jun 21, 2024
0052547
fix vote
Sworzen1 Jun 21, 2024
b48108d
Merge pull request #1402 from IntersectMBO/fix/vote
Sworzen1 Jun 21, 2024
f5507e8
chore: provide tags to sentry events
MSzalowski Jun 21, 2024
17d782e
Merge pull request #1399 from IntersectMBO/chore/1326-group-the-same-…
MSzalowski Jun 21, 2024
fb643d0
[#1093] return 0 drep voting power instead of throwing 500
jankun4 Jun 23, 2024
9c729bc
[#1148] add -threaded flag to backend
jankun4 Jun 23, 2024
911483e
Merge pull request #1397 from IntersectMBO/fix/1389-bug-clearing-name…
Sworzen1 Jun 24, 2024
d447847
fix(#1355): fix the navigation to Home from Proposal pillar on discon…
MSzalowski Jun 24, 2024
518acd2
fix(#1349): Change label of Proposal Discussion nav item
MSzalowski Jun 24, 2024
15382c9
Merge pull request #1411 from IntersectMBO/fix/1349-change-proposal-d…
MSzalowski Jun 24, 2024
fa202ec
Merge pull request #1412 from IntersectMBO/fix/1355-user-get-stack
MSzalowski Jun 24, 2024
a72f442
Merge pull request #1424 from IntersectMBO/develop
pmbinapps Jun 24, 2024
af33e43
chore: bump @intersect.mbo/[email protected]
MSzalowski Jun 24, 2024
296c609
Merge pull request #1427 from IntersectMBO/chore/bump-pdf-ui
MSzalowski Jun 25, 2024
6fad7b7
Merge pull request #1429 from IntersectMBO/develop
MSzalowski Jun 25, 2024
36a8938
Merge pull request #1408 from IntersectMBO/1148-stress-test-govtool-b…
MSzalowski Jun 25, 2024
e39f867
Merge pull request #1432 from IntersectMBO/develop
MSzalowski Jun 25, 2024
e93f6c1
[#1417] silence timeout errors
jankun4 Jun 25, 2024
24589ab
Merge pull request #1434 from IntersectMBO/1417-sentry-exception-befo…
MSzalowski Jun 26, 2024
75e7c78
[#1422] silence closed connection error
jankun4 Jun 25, 2024
fa1c0dd
Merge pull request #1435 from IntersectMBO/1422-sentry-exception-warp…
MSzalowski Jun 26, 2024
bdec2d4
feat(#1431): handle disconnected state of proposal pillar
MSzalowski Jun 26, 2024
52404b8
[#1401] add sentryenv field to backend config
jankun4 Jun 25, 2024
f65a43b
Merge pull request #1437 from IntersectMBO/feat/1431-govtool-+-pdf-ha…
MSzalowski Jun 26, 2024
02aac70
chore: add sentry env to backend config makefile
MSzalowski Jun 26, 2024
3787150
chore: bump @intersect.mbo/pdf-ui to v0.2.1
MSzalowski Jun 26, 2024
257283d
Merge pull request #1438 from IntersectMBO/develop
MSzalowski Jun 26, 2024
91ac368
Merge pull request #1439 from IntersectMBO/chore/bump-pdf-ui
MSzalowski Jun 26, 2024
54dfbc6
Merge pull request #1433 from IntersectMBO/1401-provide-env-sentry-se…
MSzalowski Jun 26, 2024
a6d4125
Merge pull request #1440 from IntersectMBO/develop
MSzalowski Jun 26, 2024
1e8b49e
Merge pull request #1441 from IntersectMBO/test
MSzalowski Jun 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/build-and-deploy-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,20 @@ on:
options:
- "enabled"
- "disabled"
forceRebuildDockerImages:
description: "Force rebuild the docker images"
required: false
type: choice
default: "false"
options:
- "true"
- "false"

env:
ENVIRONMENT: "beta"
CARDANO_NETWORK: "sanchonet"
DOMAIN: "sanchogov.tools"
FORCE_REBUILD: ${{inputs.forceRebuildDockerImages == 'true'}}

jobs:
deploy:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/build-and-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,20 @@ on:
options:
- "enabled"
- "disabled"
forceRebuildDockerImages:
description: "Force rebuild the docker images"
required: false
type: choice
default: "false"
options:
- "true"
- "false"

env:
ENVIRONMENT: "dev"
CARDANO_NETWORK: "sanchonet"
DOMAIN: "dev-sanchonet.govtool.byron.network"
FORCE_REBUILD: ${{inputs.forceRebuildDockerImages == 'true'}}

jobs:
deploy:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/build-and-deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,20 @@ on:
options:
- "enabled"
- "disabled"
forceRebuildDockerImages:
description: "Force rebuild the docker images"
required: false
type: choice
default: "false"
options:
- "true"
- "false"

env:
ENVIRONMENT: "staging"
CARDANO_NETWORK: "sanchonet"
DOMAIN: "staging.govtool.byron.network"
FORCE_REBUILD: ${{inputs.forceRebuildDockerImages == 'true'}}

jobs:
deploy:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build-and-deploy-test-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- test
- infra/test-chores

env:
ENVIRONMENT: "test"
Expand All @@ -21,9 +22,10 @@ jobs:
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }}
GTM_ID: ${{ secrets.GTM_ID }}
NPMRC_TOKEN: ${{ secrets.NPMRC_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }}
SENTRY_DSN_FRONTEND: ${{ secrets.SENTRY_DSN_FRONTEND }}
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
APP_ENV: test
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/build-and-deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,20 @@ on:
options:
- "enabled"
- "disabled"
forceRebuildDockerImages:
description: "Force rebuild the docker images"
required: false
type: choice
default: "false"
options:
- "true"
- "false"

env:
ENVIRONMENT: "test"
CARDANO_NETWORK: "sanchonet"
DOMAIN: "test-sanchonet.govtool.byron.network"
FORCE_REBUILD: ${{inputs.forceRebuildDockerImages == 'true'}}

jobs:
deploy:
Expand Down
20 changes: 6 additions & 14 deletions .github/workflows/frontend_sonar_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,19 @@ jobs:
uses: actions/setup-node@v4
with:
node-version-file: "govtool/frontend/.nvmrc"

registry-url: "https://registry.npmjs.org/"
scope: "@intersect.mbo"
- name: 🧪 Test
working-directory: govtool/frontend
env:
NODE_OPTIONS: "--max_old_space_size=4096"
NODE_OPTIONS: "--max_old_space_size=6144"
NODE_AUTH_TOKEN: ${{ secrets.NPMRC_TOKEN }}
run: |
npm install
npm ci
npm run test:coverage

# Running with docker
#
# - name: Run SonarQube Scanner
# run: |
# docker run --rm \
# -e SONAR_HOST_URL="https://sonarcloud.io" \
# -e SONAR_TOKEN="ec4183646e59dd70c8077acfabe52062ccbea7a9" \
# -v "$(pwd):/usr/src" \
# --workdir=/usr/src/govtool/frontend \
# sonarsource/sonar-scanner-cli:5.0.1

- uses: sonarsource/sonarqube-scan-action@master
if: always()
with:
projectBaseDir: govtool/frontend
env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test_backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
KUBER_API_URL: https://kuber-govtool.cardanoapi.io

- name: Upload report
if: always()
uses: actions/upload-artifact@v3
with:
name: allure-results
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install Playwright
run: npx playwright install --with-deps
- name: Build Storybook
run: NODE_OPTIONS="--max-old-space-size=8046" npm run build-storybook --quiet
run: NODE_OPTIONS="--max-old-space-size=8046" npm run build:storybook --quiet
- name: Serve Storybook and run tests
run: |
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ changes.

## [Unreleased]

- Added 'sentryenv' field in backend config file [Issue 1401](https://github.com/IntersectMBO/govtool/issues/1401)
- Add wallet connector package [Issue 898](https://github.com/IntersectMBO/govtool/issues/898)
- Change DRep without metadata name from "Sole Voter" to "Direct Voter" [Issue 880](https://github.com/IntersectMBO/govtool/issues/880)
- Inicialize Usersnap into App [Issue 546](https://github.com/IntersectMBO/govtool/issues/546)
Expand Down Expand Up @@ -63,9 +64,16 @@ changes.
- Add eslint & prettier to frontend package [Issue 166](https://github.com/IntersectMBO/govtool/issues/166)
- Add DRep list pagination [Issue 740](https://github.com/IntersectMBO/govtool/issues/740)
- Add PDF pillar [Issue 1090](https://github.com/IntersectMBO/govtool/issues/1090)
- Replace govtool-wrapper governance action creation in favor of pdf-pillar [Issue 1284](https://github.com/IntersectMBO/govtool/issues/1284)
- Add sentry environment config [Issue 1324](https://github.com/IntersectMBO/govtool/issues/1324)
- Add proposal discussion pillar to home page [Issue 1431](https://github.com/IntersectMBO/govtool/issues/1431)

### Fixed

- silenced `Thread killed by timeout manager` sentry log [Issue 1417](https://github.com/IntersectMBO/govtool/issues/1417)
- silenced `Warp: Client closed connection prematurely` error [Issue 1422](https://github.com/IntersectMBO/govtool/issues/1422)
- backend is now compiled with -threaded [Issue 1148](https://github.com/IntersectMBO/govtool/issues/1148)
- drep/get-voting-power no longer throws 500 for non-existing dreps. Instead it returns 0 [Issue 1093](https://github.com/IntersectMBO/govtool/issues/1093)
- proposal/list no longer throws 500 error when proposal's url is incorrect [Issue 1073](https://github.com/IntersectMBO/govtool/issues/1073)
- drep/list sql fix (now the drep type is correct) [Issue 957](https://github.com/IntersectMBO/govtool/issues/957)
- drep/list sql fix (now the latest tx date is correct) [Issue 826](https://github.com/IntersectMBO/govtool/issues/826)
Expand Down Expand Up @@ -94,6 +102,10 @@ changes.
- Remove wrongly appended `Yourself` filter on DRep Directory [Issue 1028](https://github.com/IntersectMBO/govtool/issues/1028)
- Fix validation of uris in metadata [Issue 1011](https://github.com/IntersectMBO/govtool/issues/1011)
- Fix wrong link to the GA Details once it is in progress [Issue 1252](https://github.com/IntersectMBO/govtool/issues/1252)
- Fix validation of the GAs with missing references [Issue 1282](https://github.com/IntersectMBO/govtool/issues/1282)
- Fix displaying the GA Markdowns [Issue 1244](https://github.com/IntersectMBO/govtool/issues/1244)
- Fix app crash on voting on the GA without the connected wallet before [Issue 1313](https://github.com/IntersectMBO/govtool/issues/1313)
- Fix the navigation to Home from Proposal pillar on disconnected wallet [Issue 1355](https://github.com/IntersectMBO/govtool/issues/1355)

### Changed

Expand Down Expand Up @@ -126,6 +138,7 @@ changes.
- Changed documents to prepare for open source [Issue 737](https://github.com/IntersectMBO/govtool/issues/737)
- Changed copy on maintenance page [Issue 753](https://github.com/IntersectMBO/govtool/issues/753)
- Update link to docs [Issue 1246](https://github.com/IntersectMBO/govtool/issues/1246)
- Change label of Proposal Discussion nav item [Issue 1349](https://github.com/IntersectMBO/govtool/issues/1349)

### Removed

Expand Down
43 changes: 43 additions & 0 deletions docs/GOVERNANCE_ACTION_SUBMISSION.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,46 @@ await buildSignSubmitConwayCertTx({
### Step 6: Verify the Governance Action

`buildSignSubmitConwayCertTx` logs the transaction CBOR making it able to be tracked on the transactions tools such as cexplorer.

## Additional steps for using the GovTool metadata validation on the imported Pillar component

```tsx
enum MetadataValidationStatus {
URL_NOT_FOUND = "URL_NOT_FOUND",
INVALID_JSONLD = "INVALID_JSONLD",
INVALID_HASH = "INVALID_HASH",
INCORRECT_FORMAT = "INCORRECT_FORMAT",
}
// Using the props passed to the component
type Props = {
validateMetadata: ({
url,
hash,
standard,
}: {
url: string;
hash: string;
standard: "CIP108";
}) => Promise<{
metadata?: any;
status?: MetadataValidationStatus;
valid: boolean;
}>;
};

import React, { Suspense } from "react";

const SomeImportedPillar: React.FC<Props> = React.lazy(
() => import("path/to/SomeImportedPillar")
);

const SomeWrapperComponent = () => {
const { validateMetadata } = useValidateMutation();

return (
<Suspense fallback={<div>I am lazy loading...</div>}>
<SomeImportedPillar validateMetadata={validateMetadata} />
</Suspense>
);
};
```
14 changes: 9 additions & 5 deletions govtool/backend/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ exceptionHandler :: VVAConfig -> Maybe Request -> SomeException -> IO ()
exceptionHandler vvaConfig mRequest exception = do
print mRequest
print exception
guard (show exception /= "Thread killed by timeout manager")
guard (show exception /= "Warp: Client closed connection prematurely")
let env = sentryEnv vvaConfig
sentryService <-
initRaven
(sentryDSN vvaConfig)
Expand All @@ -154,20 +157,21 @@ exceptionHandler vvaConfig mRequest exception = do
"vva.be"
Error
(formatMessage mRequest exception)
(recordUpdate mRequest exception)
(recordUpdate env mRequest exception)



formatMessage :: Maybe Request -> SomeException -> String
formatMessage Nothing exception = "Exception before request could be parsed: " ++ show exception
formatMessage (Just request) exception = "Exception " ++ show exception ++ " while handling request " ++ show request

recordUpdate :: Maybe Request -> SomeException -> SentryRecord -> SentryRecord
recordUpdate Nothing exception record = record
recordUpdate (Just request) exception record =
recordUpdate :: String -> Maybe Request -> SomeException -> SentryRecord -> SentryRecord
recordUpdate env Nothing exception record = record { srEnvironment = Just env }
recordUpdate env (Just request) exception record =
record
{ srCulprit = Just $ unpack $ rawPathInfo request,
srServerName = unpack <$> requestHeaderHost request
srServerName = unpack <$> requestHeaderHost request,
srEnvironment = Just env
}

shouldDisplayException :: SomeException -> Bool
Expand Down
1 change: 1 addition & 0 deletions govtool/backend/example-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"host" : "localhost",
"cachedurationseconds": 20,
"sentrydsn": "https://username:[email protected]/id",
"sentryenv": "dev",
"metadatavalidationhost": "localhost",
"metadatavalidationport": 3001,
"metadatavalidationmaxconcurrentrequests": 10
Expand Down
6 changes: 6 additions & 0 deletions govtool/backend/src/VVA/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ data VVAConfigInternal
, vVaConfigInternalCacheDurationSeconds :: Int
-- | Sentry DSN
, vVAConfigInternalSentrydsn :: String
-- | Sentry environment
, vVAConfigInternalSentryEnv :: String
-- | Metadata validation service host
, vVAConfigInternalMetadataValidationHost :: Text
-- | Metadata validation service port
Expand All @@ -97,6 +99,7 @@ instance DefaultConfig VVAConfigInternal where
vVAConfigInternalHost = "localhost",
vVaConfigInternalCacheDurationSeconds = 20,
vVAConfigInternalSentrydsn = "https://username:[email protected]/id",
vVAConfigInternalSentryEnv = "development",
vVAConfigInternalMetadataValidationHost = "localhost",
vVAConfigInternalMetadataValidationPort = 3001,
vVAConfigInternalMetadataValidationMaxConcurrentRequests = 10
Expand All @@ -115,6 +118,8 @@ data VVAConfig
, cacheDurationSeconds :: Int
-- | Sentry DSN
, sentryDSN :: String
-- | Sentry environment
, sentryEnv :: String
-- | Metadata validation service host
, metadataValidationHost :: Text
-- | Metadata validation service port
Expand Down Expand Up @@ -161,6 +166,7 @@ convertConfig VVAConfigInternal {..} =
serverHost = vVAConfigInternalHost,
cacheDurationSeconds = vVaConfigInternalCacheDurationSeconds,
sentryDSN = vVAConfigInternalSentrydsn,
sentryEnv = vVAConfigInternalSentryEnv,
metadataValidationHost = vVAConfigInternalMetadataValidationHost,
metadataValidationPort = vVAConfigInternalMetadataValidationPort,
metadataValidationMaxConcurrentRequests = vVAConfigInternalMetadataValidationMaxConcurrentRequests
Expand Down
6 changes: 4 additions & 2 deletions govtool/backend/src/VVA/DRep.hs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ getVotingPower ::
Text ->
m Integer
getVotingPower drepId = withPool $ \conn -> do
[SQL.Only votingPower] <-
result <-
liftIO
(SQL.query @_ @(SQL.Only Scientific) conn getVotingPowerSql $ SQL.Only drepId)
return $ floor votingPower
case result of
[SQL.Only votingPower] -> return $ floor votingPower
[] -> return 0

listDRepsSql :: SQL.Query
listDRepsSql = sqlFrom $(embedFile "sql/list-dreps.sql")
Expand Down
2 changes: 2 additions & 0 deletions govtool/backend/vva-be.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ executable vva-be

hs-source-dirs: app
default-language: Haskell2010
ghc-options: -threaded

library
hs-source-dirs: src
Expand Down Expand Up @@ -118,3 +119,4 @@ library
, VVA.Types
, VVA.Network
, VVA.Metadata
ghc-options: -threaded
1 change: 1 addition & 0 deletions govtool/frontend/.env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
VITE_APP_ENV="development"
VITE_BASE_URL=""
VITE_NETWORK_FLAG=0
VITE_SENTRY_DSN=""
Expand Down
2 changes: 2 additions & 0 deletions govtool/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM node:18-alpine as builder

ARG VITE_APP_ENV='beta'
ARG VITE_BASE_URL
ARG VITE_GTM_ID
ARG VITE_NETWORK_FLAG=0
Expand Down
Loading
Loading