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

refactor: clean up configurations #3331

Open
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

victor-yanev
Copy link
Contributor

@victor-yanev victor-yanev commented Dec 12, 2024

Description:

This PR cleans up the messed up configurations that we have for the operator account, and fixes the underlying root cause of this spaghetti code coming from the GitHub workflow files.

It also stabilizes some flaky unit tests + sets the Pino logger instances to silent mode in the unit tests to avoid cluttering the logs in the CI.

Related issue(s):

Fixes #3099

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
…ient

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
…nse`

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
@victor-yanev victor-yanev self-assigned this Dec 12, 2024
@victor-yanev victor-yanev added this to the 0.63.0 milestone Dec 12, 2024
@victor-yanev victor-yanev added the Technical Debt Issue which resolves technical debt label Dec 12, 2024
@victor-yanev victor-yanev changed the base branch from 3099-Add-operator-tier to main December 12, 2024 10:42
@victor-yanev victor-yanev changed the base branch from main to 3099-Add-operator-tier December 12, 2024 10:43
@victor-yanev victor-yanev mentioned this pull request Dec 12, 2024
2 tasks
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
@victor-yanev victor-yanev changed the base branch from 3099-Add-operator-tier to main December 12, 2024 10:56
@victor-yanev victor-yanev changed the base branch from main to 3099-Add-operator-tier December 12, 2024 10:57
Copy link

github-actions bot commented Dec 12, 2024

Test Results

 21 files   -   2  316 suites   - 33   44m 44s ⏱️ - 4m 28s
613 tests  -   4  606 ✅ +  3  4 💤 ±0  3 ❌  - 7 
740 runs   - 169  732 ✅  - 157  4 💤  - 3  4 ❌  - 9 

For more details on these failures, see this check.

Results for commit 21225b9. ± Comparison against base commit 13d09e9.

This pull request removes 5 and adds 1 tests. Note that renamed tests count towards both.
"before all" hook for "emits an approval event" ‑ RPC Server Acceptance Tests Acceptance tests @erc20 Acceptance Tests HTS token should behave like erc20 transfer from when the token owner is not the zero address when the recipient is not the zero address when the spender has enough allowance "before all" hook for "emits an approval event"
"before all" hook for "reverts" ‑ RPC Server Acceptance Tests Acceptance tests @erc20 Acceptance Tests HTS token should behave like erc20 transfer from when the token owner is not the zero address when the recipient is not the zero address when the spender does not have enough allowance when the token owner has enough balance "before all" hook for "reverts"
"before all" hook in "Debug API Test Suite" ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-3 RPC Server Acceptance Tests Debug API Test Suite "before all" hook in "Debug API Test Suite"
"before each" hook for "reverts" ‑ RPC Server Acceptance Tests Acceptance tests @erc20 Acceptance Tests HTS token should behave like erc20 transfer from when the token owner is not the zero address when the recipient is not the zero address when the spender does not have enough allowance "before each" hook for "reverts"
"before each" hook for "should execute "eth_getStorageAt" request to get current state changes" ‑ RPC Server Acceptance Tests Acceptance tests @api-batch-2 RPC Server Acceptance Tests "before each" hook for "should execute "eth_getStorageAt" request to get current state changes"
"before each" hook: reducing balance for "reverts" ‑ RPC Server Acceptance Tests Acceptance tests @erc20 Acceptance Tests HTS token should behave like erc20 transfer from when the token owner is not the zero address when the recipient is not the zero address when the spender does not have enough allowance when the token owner does not have enough balance "before each" hook: reducing balance for "reverts"

♻️ This comment has been updated with latest results.

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
@hashgraph hashgraph deleted a comment from sonarqubecloud bot Dec 17, 2024
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
@victor-yanev victor-yanev marked this pull request as ready for review December 17, 2024 14:46
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
…ATOR_ID_MAIN` is not set

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
quiet-node
quiet-node previously approved these changes Dec 18, 2024
Copy link
Member

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely feels and looks better with the new changes! Great work!

Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
12.0% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Copy link
Contributor

@mishomihov00 mishomihov00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review applies to:
.github/workflows/acceptance-workflow.yml
charts/hedera-json-rpc-relay/environments/minikube.yaml
charts/hedera-json-rpc-relay/templates/secret.yaml

Copy link
Member

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT! Thanks for the great work!

Copy link

codecov bot commented Dec 24, 2024

Codecov Report

Attention: Patch coverage is 91.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 85.46%. Comparing base (13d09e9) to head (21225b9).

Files with missing lines Patch % Lines
.../relay/src/lib/services/hapiService/hapiService.ts 80.00% 0 Missing and 1 partial ⚠️
packages/relay/src/utils.ts 90.90% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3331      +/-   ##
==========================================
+ Coverage   85.04%   85.46%   +0.41%     
==========================================
  Files          65       69       +4     
  Lines        4508     4664     +156     
  Branches     1023     1035      +12     
==========================================
+ Hits         3834     3986     +152     
- Misses        330      386      +56     
+ Partials      344      292      -52     
Flag Coverage Δ
config-service 98.14% <100.00%> (ø)
relay 79.20% <90.90%> (-0.53%) ⬇️
server 83.28% <ø> (?)
ws-server 36.66% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/config-service/src/services/index.ts 100.00% <100.00%> (ø)
packages/relay/src/lib/constants.ts 94.82% <ø> (+7.52%) ⬆️
packages/relay/src/lib/relay.ts 92.64% <ø> (+1.09%) ⬆️
...s/relay/src/lib/services/hbarLimitService/index.ts 94.77% <100.00%> (+1.60%) ⬆️
.../relay/src/lib/services/hapiService/hapiService.ts 94.73% <80.00%> (+14.94%) ⬆️
packages/relay/src/utils.ts 97.67% <90.90%> (-2.33%) ⬇️

... and 17 files with indirect coverage changes

@quiet-node quiet-node modified the milestones: 0.63.0, 0.64.0 Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Technical Debt Issue which resolves technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[HBAR Rate Limit Redesign] Add OPERATOR tier
3 participants