Skip to content

Commit

Permalink
Merge pull request #1674 from IntersectMBO/staging
Browse files Browse the repository at this point in the history
Sancho-v1.0.12
  • Loading branch information
MSzalowski authored Aug 2, 2024
2 parents ce71931 + bd520c3 commit d2c9b09
Show file tree
Hide file tree
Showing 134 changed files with 33,365 additions and 23,900 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/build-and-deploy-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
description: "Enable proposal discussion forum"
required: true
type: choice
default: "disabled"
default: "enabled"
options:
- "enabled"
- "disabled"
Expand All @@ -36,9 +36,11 @@ jobs:
run:
working-directory: ./scripts/govtool
env:
DBSYNC_POSTGRES_DB: "cexplorer"
DBSYNC_POSTGRES_PASSWORD: "pSa8JCpQOACMUdGb"
DBSYNC_POSTGRES_USER: "postgres"
DBSYNC_POSTGRES_DB: ${{ secrets.DBSYNC_POSTGRES_DB || 'cexplorer' }}
DBSYNC_POSTGRES_PASSWORD: ${{ secrets.DBSYNC_POSTGRES_PASSWORD || 'pSa8JCpQOACMUdGb' }}
DBSYNC_POSTGRES_USER: ${{ secrets.DBSYNC_POSTGRES_USER || 'postgres' }}
DBSYNC_POSTGRES_HOST: ${{ secrets.DBSYNC_POSTGRES_HOST || 'postgres' }}
DBSYNC_POSTGRES_PORT: ${{ secrets.DBSYNC_POSTGRES_PORT || '5432' }}
GA_CLIENT_EMAIL: ${{ secrets.GA_CLIENT_EMAIL }}
GA_PRIVATE_KEY: ${{ secrets.GA_PRIVATE_KEY }}
GRAFANA_ADMIN_PASSWORD: ${{ secrets.GRAFANA_ADMIN_PASSWORD }}
Expand All @@ -57,6 +59,7 @@ jobs:
TRAEFIK_LE_EMAIL: "[email protected]"
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
IS_PROPOSAL_DISCUSSION_FORUM_ENABLED: ${{ inputs.isProposalDiscussionForumEnabled == 'enabled' }}
PDF_API_URL: ${{ secrets.PDF_API_URL}}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/build-and-deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
description: "Enable proposal discussion forum"
required: true
type: choice
default: "disabled"
default: "enabled"
options:
- "enabled"
- "disabled"
Expand All @@ -35,9 +35,11 @@ jobs:
run:
working-directory: ./scripts/govtool
env:
DBSYNC_POSTGRES_DB: "cexplorer"
DBSYNC_POSTGRES_PASSWORD: "pSa8JCpQOACMUdGb"
DBSYNC_POSTGRES_USER: "postgres"
DBSYNC_POSTGRES_DB: ${{ secrets.DBSYNC_POSTGRES_DB || 'cexplorer' }}
DBSYNC_POSTGRES_PASSWORD: ${{ secrets.DBSYNC_POSTGRES_PASSWORD || 'pSa8JCpQOACMUdGb' }}
DBSYNC_POSTGRES_USER: ${{ secrets.DBSYNC_POSTGRES_USER || 'postgres' }}
DBSYNC_POSTGRES_HOST: ${{ secrets.DBSYNC_POSTGRES_HOST || 'postgres' }}
DBSYNC_POSTGRES_PORT: ${{ secrets.DBSYNC_POSTGRES_PORT || '5432' }}
GA_CLIENT_EMAIL: ${{ secrets.GA_CLIENT_EMAIL }}
GA_PRIVATE_KEY: ${{ secrets.GA_PRIVATE_KEY }}
GRAFANA_ADMIN_PASSWORD: ${{ secrets.GRAFANA_ADMIN_PASSWORD }}
Expand All @@ -57,6 +59,7 @@ jobs:
TRAEFIK_LE_EMAIL: "[email protected]"
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
IS_PROPOSAL_DISCUSSION_FORUM_ENABLED: ${{ inputs.isProposalDiscussionForumEnabled == 'enabled' }}
PDF_API_URL: ${{ secrets.PDF_API_URL }}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/build-and-deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
description: "Enable proposal discussion forum"
required: true
type: choice
default: "disabled"
default: "enabled"
options:
- "enabled"
- "disabled"
Expand All @@ -38,9 +38,11 @@ jobs:
run:
working-directory: ./scripts/govtool
env:
DBSYNC_POSTGRES_DB: "cexplorer"
DBSYNC_POSTGRES_PASSWORD: "pSa8JCpQOACMUdGb"
DBSYNC_POSTGRES_USER: "postgres"
DBSYNC_POSTGRES_DB: ${{ secrets.DBSYNC_POSTGRES_DB || 'cexplorer' }}
DBSYNC_POSTGRES_PASSWORD: ${{ secrets.DBSYNC_POSTGRES_PASSWORD || 'pSa8JCpQOACMUdGb' }}
DBSYNC_POSTGRES_USER: ${{ secrets.DBSYNC_POSTGRES_USER || 'postgres' }}
DBSYNC_POSTGRES_HOST: ${{ secrets.DBSYNC_POSTGRES_HOST || 'postgres' }}
DBSYNC_POSTGRES_PORT: ${{ secrets.DBSYNC_POSTGRES_PORT || '5432' }}
GA_CLIENT_EMAIL: ${{ secrets.GA_CLIENT_EMAIL }}
GA_PRIVATE_KEY: ${{ secrets.GA_PRIVATE_KEY }}
GRAFANA_ADMIN_PASSWORD: ${{ secrets.GRAFANA_ADMIN_PASSWORD }}
Expand All @@ -60,6 +62,7 @@ jobs:
TRAEFIK_LE_EMAIL: "[email protected]"
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
IS_PROPOSAL_DISCUSSION_FORUM_ENABLED: ${{github.event_name == 'push' && 'false' || inputs.isProposalDiscussionForumEnabled == 'enabled'}}
PDF_API_URL: ${{ secrets.PDF_API_URL}}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-and-deploy-test-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
APP_ENV: test
PDF_API_URL: ${{ secrets.PDF_API_URL}}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/build-and-deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
description: "Enable proposal discussion forum"
required: true
type: choice
default: "disabled"
default: "enabled"
options:
- "enabled"
- "disabled"
Expand All @@ -38,9 +38,11 @@ jobs:
run:
working-directory: ./scripts/govtool
env:
DBSYNC_POSTGRES_DB: "cexplorer"
DBSYNC_POSTGRES_PASSWORD: "pSa8JCpQOACMUdGb"
DBSYNC_POSTGRES_USER: "postgres"
DBSYNC_POSTGRES_DB: ${{ secrets.DBSYNC_POSTGRES_DB || 'cexplorer' }}
DBSYNC_POSTGRES_PASSWORD: ${{ secrets.DBSYNC_POSTGRES_PASSWORD || 'pSa8JCpQOACMUdGb' }}
DBSYNC_POSTGRES_USER: ${{ secrets.DBSYNC_POSTGRES_USER || 'postgres' }}
DBSYNC_POSTGRES_HOST: ${{ secrets.DBSYNC_POSTGRES_HOST || 'postgres' }}
DBSYNC_POSTGRES_PORT: ${{ secrets.DBSYNC_POSTGRES_PORT || '5432' }}
GA_CLIENT_EMAIL: ${{ secrets.GA_CLIENT_EMAIL }}
GA_PRIVATE_KEY: ${{ secrets.GA_PRIVATE_KEY }}
GRAFANA_ADMIN_PASSWORD: ${{ secrets.GRAFANA_ADMIN_PASSWORD }}
Expand All @@ -60,6 +62,7 @@ jobs:
TRAEFIK_LE_EMAIL: "[email protected]"
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
IS_PROPOSAL_DISCUSSION_FORUM_ENABLED: ${{github.event_name == 'push' && 'false' || inputs.isProposalDiscussionForumEnabled == 'enabled'}}
PDF_API_URL: ${{ secrets.PDF_API_URL}}
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
49 changes: 39 additions & 10 deletions .github/workflows/resync-cardano-node-and-db-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,27 @@ on:
- "test"
- "staging"
- "beta"
isProposalDiscussionForumEnabled:
description: "Enable proposal discussion forum"
required: true
type: choice
default: "enabled"
options:
- "enabled"
- "disabled"
forceRebuildDockerImages:
description: "Force rebuild the docker images"
required: false
type: choice
default: "false"
options:
- "true"
- "false"

env:
ENVIRONMENT: ${{ inputs.environment || 'dev' }}
CARDANO_NETWORK: "sanchonet"
FORCE_REBUILD: ${{inputs.forceRebuildDockerImages == 'true'}}

jobs:
deploy:
Expand All @@ -26,24 +43,36 @@ jobs:
run:
working-directory: ./scripts/govtool
env:
DBSYNC_POSTGRES_DB: "cexplorer"
DBSYNC_POSTGRES_USER: "postgres"
DBSYNC_POSTGRES_PASSWORD: "pSa8JCpQOACMUdGb"
DBSYNC_POSTGRES_DB: ${{ secrets.DBSYNC_POSTGRES_DB || 'cexplorer' }}
DBSYNC_POSTGRES_PASSWORD: ${{ secrets.DBSYNC_POSTGRES_PASSWORD || 'pSa8JCpQOACMUdGb' }}
DBSYNC_POSTGRES_USER: ${{ secrets.DBSYNC_POSTGRES_USER || 'postgres' }}
DBSYNC_POSTGRES_HOST: ${{ secrets.DBSYNC_POSTGRES_HOST || 'postgres' }}
DBSYNC_POSTGRES_PORT: ${{ secrets.DBSYNC_POSTGRES_PORT || '5432' }}
GA_CLIENT_EMAIL: ${{ secrets.GA_CLIENT_EMAIL }}
GA_PRIVATE_KEY: ${{ secrets.GA_PRIVATE_KEY }}
GRAFANA_ADMIN_PASSWORD: ${{ secrets.GRAFANA_ADMIN_PASSWORD }}
GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }}
GRAFANA_SLACK_OAUTH_TOKEN: ${{ secrets.GRAFANA_SLACK_OAUTH_TOKEN }}
NGINX_BASIC_AUTH: ${{ secrets.NGINX_BASIC_AUTH }}
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }}
TRAEFIK_LE_EMAIL: "[email protected]"
GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }}
GTM_ID: ${{ secrets.GTM_ID }}
NPMRC_TOKEN: ${{ secrets.NPMRC_TOKEN }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }}
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
IP_ADDRESS_BYPASSING_BASIC_AUTH1: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH1 }}
IP_ADDRESS_BYPASSING_BASIC_AUTH2: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH2 }}
NEXT_PUBLIC_API_URL: "https://participation.sanchogov.tools"
NEXT_PUBLIC_GA4_PROPERTY_ID: ${{ secrets.NEXT_PUBLIC_GA4_PROPERTY_ID }}
DEV_NGINX_BASIC_AUTH: ${{ secrets.DEV_NGINX_BASIC_AUTH }}
TEST_NGINX_BASIC_AUTH: ${{ secrets.TEST_NGINX_BASIC_AUTH }}
STAGING_NGINX_BASIC_AUTH: ${{ secrets.STAGING_NGINX_BASIC_AUTH }}
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }}
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }}
SENTRY_IGNORE_API_RESOLUTION_ERROR: "1"
TRAEFIK_LE_EMAIL: "[email protected]"
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
IS_PROPOSAL_DISCUSSION_FORUM_ENABLED: ${{ inputs.isProposalDiscussionForumEnabled == 'enabled' }}
PDF_API_URL: ${{ secrets.PDF_API_URL }}
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ treefmt.toml
local/

# used by haskell
govtool/backend/dist-newstyle/
govtool/backend/.stack-work/
dist-newstyle/
.stack-work/

# target environment config dir
scripts/govtool/config/target
Expand All @@ -141,4 +141,4 @@ scripts/govtool/dev-postgres_password
node_modules

# sonar scanner
.scannerwork/
.scannerwork/
89 changes: 79 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,83 @@ changes.

## [Unreleased]

### Added

-

### Fixed

-

### Changed

-

## [sancho-v1.0.12](https://github.com/IntersectMBO/govtool/releases/tag/sancho-v1.0.12) 2024-08-01

### Added

- Add network name to GET /network/metrics [Issue 1644](https://github.com/IntersectMBO/govtool/issues/1644)

### Fixed

- Fix displaying Governance Action & DRep metadatas

### Changed

- Change link to propose a governace action docs [Issue 1132](https://github.com/IntersectMBO/govtool/issues/1132)
- Change link to docs regarding DReps [Issue 1130](https://github.com/IntersectMBO/govtool/issues/1130)
- Change link to view governance actions docs [Issue 1131](https://github.com/IntersectMBO/govtool/issues/1131)
- Change link to delegate voting power docs, [Issue 1654](https://github.com/IntersectMBO/govtool/issues/1654)
- Make all the frontend build arguments mandatory [Issue 1642](https://github.com/IntersectMBO/govtool/issues/1642), [Issue 1643](https://github.com/IntersectMBO/govtool/issues/1643)
- Breaking! Remove usage of metadata validation service in Haskell Backend
- Bump @intersect.mbo/pdf-ui to v0.3.3

## [sancho-v1.0.11](https://github.com/IntersectMBO/govtool/releases/tag/sancho-v1.0.11) 2024-07-30

### Added

-

### Fixed

- Fix unbound variable in the resync cardano node github workflow [Issue 1624](https://github.com/IntersectMBO/govtool/issues/1624)

### Changed

- bump @intersect.mbo/pdf-ui to v0.3.2

## [sancho-v1.0.10](https://github.com/IntersectMBO/govtool/releases/tag/sancho-v1.0.10) 2024-07-29

### Added

- Add redirect to the connected DRep Directory page if a connected user enters a non-connected DRep Directory url [Issue 1117](https://github.com/IntersectMBO/govtool/issues/1117)
- Add PDF_API_URL to the frontend config [Issue 1575](https://github.com/IntersectMBO/govtool/issues/1575)
- Provide DB-Sync Postgres envs to the backend config
- Add redirects to cards on Home after user connects [Issue 1442](https://github.com/IntersectMBO/govtool/issues/1442)
- Add support for CIP-100 for context to Governance Action Vote [Issue 1582](https://github.com/IntersectMBO/govtool/issues/1582)

### Fixed

- Fix querying metadata-validation service from haskell backend [Issue 1612](https://github.com/IntersectMBO/govtool/issues/1612)
- Fix thread killed by timeout manager [Issue 1417](https://github.com/IntersectMBO/govtool/issues/1417)
- Changed use new CSL UTxO selection to take into account change

### Changed

- Set Proposal Discussion Forum Pillar enabled by default [Issue 1501](https://github.com/IntersectMBO/govtool/issues/1501)
- bump @intersect.mbo/pdf-ui to v0.3.1

## [sancho-v1.0.9](https://github.com/IntersectMBO/govtool/releases/tag/sancho-v1.0.9) 2024-07-16

### Added

- 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)
- Initialize Usersnap into App [Issue 546](https://github.com/IntersectMBO/govtool/issues/546)
- Integrate frontend with metadata validation service [Issue 617](https://github.com/IntersectMBO/govtool/issues/617)
- Implement a loading modal for the validation of the metadata [Issue 646](https://github.com/IntersectMBO/govtool/issues/646)
- Fix displaying modals to not block signing transactions [Issue 710](https://github.com/IntersectMBO/govtool/issues/710)
- Change style of url button to trim the file name [Issue 655](https://github.com/IntersectMBO/govtool/issues/655)
- Change regex for parsing urls to match urls without protocol [Issue 655](https://github.com/IntersectMBO/govtool/issues/655)
- Integrate ga displaying metadata validation with the validation service [Issue 712](https://github.com/IntersectMBO/govtool/issues/712)
- Correct text of the governance action type [Issue 651](https://github.com/IntersectMBO/govtool/issues/651)
- Enable coverage tests report

### Added

- added `bio` `dRepName` `email` `references` `metadataValid` and `metadataStatus` fields to `drep/list`
- added `metadatavalidationmaxconcurrentrequests` field to the backend config
- added `metadata/validate` endpoint [Issue 876](https://github.com/IntersectMBO/govtool/issues/876)
Expand Down Expand Up @@ -67,6 +129,7 @@ changes.
- 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)
- Enable coverage tests report

### Fixed

Expand Down Expand Up @@ -107,6 +170,9 @@ changes.
- 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)
- Fix navigation over Proposal discussion forum pillar [Issue 1436](https://github.com/IntersectMBO/govtool/issues/1436)
- Fix building the frontend image [Issue 1583](https://github.com/IntersectMBO/govtool/issues/1583)
- Correct text of the governance action type [Issue 651](https://github.com/IntersectMBO/govtool/issues/651)
- Fix displaying modals to not block signing transactions [Issue 710](https://github.com/IntersectMBO/govtool/issues/710)

### Changed

Expand Down Expand Up @@ -140,6 +206,9 @@ changes.
- 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)
- Change DRep without metadata name from "Sole Voter" to "Direct Voter" [Issue 880](https://github.com/IntersectMBO/govtool/issues/880)
- Change style of url button to trim the file name [Issue 655](https://github.com/IntersectMBO/govtool/issues/655)
- Change regex for parsing urls to match urls without protocol [Issue 655](https://github.com/IntersectMBO/govtool/issues/655)

### Removed

Expand Down
7 changes: 0 additions & 7 deletions gov-action-loader/backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
FROM python:3.10 AS builder

WORKDIR /app
# Install cardano-cli

RUN \
wget https://github.com/input-output-hk/cardano-node/releases/download/8.5.0-pre/cardano-node-8.5.0-linux.tar.gz \
&& tar -xvzf cardano-node-8.5.0-linux.tar.gz \
&& mv ./cardano-cli /usr/local/bin/cardano-cli \
&& rm -rf /code/*

COPY ./requirements.txt ./requirements.txt
RUN pip install --no-cache-dir --upgrade -r ./requirements.txt
Expand Down
6 changes: 3 additions & 3 deletions gov-action-loader/backend/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from app.settings import settings
from app.transaction import (get_base_proposal_for_multiple,
get_default_transaction,
get_proposal_data_from_type, get_txid_from_cli,
get_proposal_data_from_type,
main_wallet, submit_proposal_tx)

app = FastAPI()
Expand Down Expand Up @@ -106,7 +106,7 @@ async def submit_multiple_proposals(
else:
raise HTTPException(
status_code=400,
detail="No of proposals greater than 100 not supported yet.",
detail="No of proposals greater than "+str(maximum_supported_proposals)+" not supported yet.",
)


Expand Down Expand Up @@ -134,7 +134,7 @@ async def submit_single_proposal(
if kuber_response.status_code == 200:
tx = kuber_response.json()
tx["type"] = "Witnessed Tx ConwayEra"
tx_id = get_txid_from_cli(tx)
tx_id = tx['hash']
return tx | {"txId": tx_id}
else:
print(kuber_response.text)
Expand Down
Loading

0 comments on commit d2c9b09

Please sign in to comment.