Skip to content

Commit 3f8abdb

Browse files
authored
Add /v3/nym-nodes (#5569)
* Add /v3/nym-nodes - returns extended node info from local DB - endpoint caching - add bond_info & self_described to DB nym_nodes - update mixnode & gateway bond status on data refresh - add `active` column to DB nym_nodes - use only active & bonded nodes in scraping/testrun tasks * Improve log * PR feedback - remove active field from nym_nodes - delete obsolete nym_nodes * node-status-api: cargo sqlx prepare * Remove guardrails in CI file * Revert "node-status-api: cargo sqlx prepare" This reverts commit 1fcd895. * Try to ignore sqlx files * cargo sqlx prepare * Repair harbor tag check * Try without checkout action * add awk * Update log
1 parent 3baac12 commit 3f8abdb

File tree

62 files changed

+1236
-418
lines changed

Some content is hidden

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

62 files changed

+1236
-418
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
nym-validator-rewarder/.sqlx/** diff=nodiff
2+
nym-node-status-api/nym-node-status-api/.sqlx/** diff=nodiff

.github/workflows/ci-check-ns-api-version.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,16 @@ jobs:
2222
cmd: yq -oy '.package.version' ${{ env.WORKING_DIRECTORY }}/Cargo.toml
2323

2424
- name: Check if git tag exists
25-
uses: actions/checkout@v4
26-
- run: |
25+
run: |
2726
TAG=${{ env.WORKING_DIRECTORY }}-${{ steps.get_version.outputs.result }}
2827
if [[ -z "$TAG" ]]; then
2928
echo "Tag is empty"
3029
exit 1
3130
fi
32-
if git ls-remote --tags origin | grep -q "refs/tags/$TAG$" ; then
31+
git ls-remote --tags origin | awk '{print $2}'
32+
if git ls-remote --tags origin | awk '{print $2}' | grep -q "refs/tags/$TAG$" ; then
3333
echo "Tag '$TAG' ALREADY EXISTS on the remote"
34-
# TODO uncomment after bumping NS API version
35-
# exit 1
34+
exit 1
3635
else
3736
echo "Tag '$TAG' does not exist on the remote"
3837
fi
@@ -45,13 +44,14 @@ jobs:
4544
echo "Tag is empty"
4645
exit 1
4746
fi
48-
curl -su "${{ secrets.HARBOR_ROBOT_USERNAME }}":"${{ secrets.HARBOR_ROBOT_SECRET }}" "$registry/v2/$repo_name/tags/list" | jq
49-
curl -su ${{ secrets.HARBOR_ROBOT_USERNAME }}:${{ secrets.HARBOR_ROBOT_SECRET }} "$registry/v2/$repo_name/tags/list" | jq -e --arg search $TAG '.tags | index($search)' > /dev/null
50-
result=$?
51-
if [ "${result}" -eq 0 ]; then
52-
echo "Version '$TAG' defined in Cargo.toml already exists as tag in harbor repo"
53-
# TODO uncomment after bumping NS API version
54-
# exit 1
47+
curl -su ${{ secrets.HARBOR_ROBOT_USERNAME }}:${{ secrets.HARBOR_ROBOT_SECRET }} "$registry/v2/$repo_name/tags/list" | jq
48+
exists=$(curl -su ${{ secrets.HARBOR_ROBOT_USERNAME }}:${{ secrets.HARBOR_ROBOT_SECRET }} "$registry/v2/$repo_name/tags/list" | jq --arg tag $TAG '.tags | contains([$tag])' )
49+
if [[ $exists = "true" ]]; then
50+
echo "Version '$TAG' defined in Cargo.toml ALREADY EXISTS as tag in harbor repo"
51+
exit 1
52+
elif [[ $exists = "false" ]]; then
53+
echo "Version '$TAG' doesn't exist on the remote"
5554
else
56-
echo "Version '$TAG' doesn't exist on the remote"
55+
echo "Unknown output '$exists'"
56+
exit 1
5757
fi

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nym-node-status-api/nym-node-status-agent/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -eu
44
export ENVIRONMENT=${ENVIRONMENT:-"mainnet"}
55

6-
probe_git_ref="nym-vpn-core-v1.3.2"
6+
probe_git_ref="nym-vpn-core-v1.4.0"
77

88
crate_root=$(dirname $(realpath "$0"))
99
monorepo_root=$(realpath "${crate_root}/../..")

nym-node-status-api/nym-node-status-api/.sqlx/query-01ee4a30bc3104712e5bc371a45d614a89d88adf02358800433e06100c13c548.json

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nym-node-status-api/nym-node-status-api/.sqlx/query-8c6c1c67df2d06da74825872f448d30505801b56506668499f9da718f1d6b8f8.json nym-node-status-api/nym-node-status-api/.sqlx/query-021c6c65d1ed806d8430bef7883906b42a7e4b280c8efb32db15d7c6a51d7a27.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nym-node-status-api/nym-node-status-api/.sqlx/query-06065394c157927e4002ddd5c7c1af626ae15728d615f539470cd7c189312385.json

-12
This file was deleted.

nym-node-status-api/nym-node-status-api/.sqlx/query-124d45b9604439584650f401607c46bdbd162c7c689f74fe9ddfdfd48f5ddc07.json

+44
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nym-node-status-api/nym-node-status-api/.sqlx/query-18abc8fde56cf86baed7b4afa38f2c63cdf90f2f3b6d81afb9000bb0968dcaea.json

-12
This file was deleted.

nym-node-status-api/nym-node-status-api/.sqlx/query-21e44766729777756f6eb04bf3b81df3e591008a1e3fd664ed83ca86ac51bd8c.json

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nym-node-status-api/nym-node-status-api/.sqlx/query-227539374e7473f6f9642289c5b5d1bcd636315ab23537cb5f6d2f82a2bcb7bf.json

+26
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nym-node-status-api/nym-node-status-api/.sqlx/query-25300e435780101fa207c8e26ef2f49ba5db84d63e89440bb494e8327fe73686.json

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nym-node-status-api/nym-node-status-api/.sqlx/query-283f49a65c7d70bf271702ff6a5c7ad6e68c81932d295ff18ed198c54706a57c.json

+86
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nym-node-status-api/nym-node-status-api/.sqlx/query-3825020ab0ecbffe83270c57ec74fb7987a6807d3381a6068c79b127a668b190.json

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nym-node-status-api/nym-node-status-api/.sqlx/query-3cd5cb4bfca4243925da4ddbccd811e842090e98982e1032670df77961870b32.json

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nym-node-status-api/nym-node-status-api/.sqlx/query-3d3a1fa429e3090741c6b6a8e82e692afc04b51e8782bcbf59f1eb4116112536.json

-12
This file was deleted.

nym-node-status-api/nym-node-status-api/.sqlx/query-3d5fc502f976f5081f01352856b8632c29c81bfafb043bb8744129cf9e0266ad.json nym-node-status-api/nym-node-status-api/.sqlx/query-3e7e987780937873cdb393b157d7708c9f01047b0689eb0d4f7a973b328c609d.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)