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

ci: Updating workflows/actions to be compatible to and updating to the step-security maintained version. #2963

Conversation

san-est
Copy link
Contributor

@san-est san-est commented Sep 11, 2024

Description:
The previous attempt to upgrade to the step-security version of the workflows resulted in an issue as there was mismatch in the inputs between the versions. This should now be resolved and this PR contains the changed inputs as well as the upgrade to the step-security maintained version of the action.

Related issue(s):

Fixes #2943

Notes for reviewer:

Checklist

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

@san-est san-est added this to the 0.56.0 milestone Sep 11, 2024
@san-est san-est self-assigned this Sep 11, 2024
@san-est san-est requested review from AlfredoG87, ebadiere, Nana-EC and a team as code owners September 11, 2024 07:26
@san-est san-est linked an issue Sep 11, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Sep 11, 2024

Test Results

    3 files    297 suites   19s ⏱️
1 353 tests 1 352 ✅ 1 💤 0 ❌
1 362 runs  1 361 ✅ 1 💤 0 ❌

Results for commit 3d169d1.

♻️ This comment has been updated with latest results.

@san-est san-est marked this pull request as draft September 11, 2024 07:59
.github/workflows/acceptance.yml Show resolved Hide resolved
.github/workflows/manual-testing.yml Show resolved Hide resolved
.github/workflows/test.yml Show resolved Hide resolved
@san-est san-est requested a review from rbarkerSL September 13, 2024 13:29
@san-est san-est marked this pull request as ready for review September 13, 2024 14:43
@quiet-node quiet-node modified the milestones: 0.56.0, 0.57.0 Sep 17, 2024
rbarkerSL
rbarkerSL previously approved these changes Sep 19, 2024
@Nana-EC
Copy link
Collaborator

Nana-EC commented Sep 25, 2024

@san-est needs a rebase but otherwise LG

…ep-security maintained version.

Signed-off-by: Vasil Boyadzhiev <[email protected]>

Resolving conflicts and rebasing.
Signed-off-by: Vasil Boyadzhiev <[email protected]>
Signed-off-by: Vasil Boyadzhiev <[email protected]>

Resolving conflicts and rebasing.
@san-est san-est force-pushed the 2943-determine-upgrade-path-for-publish-unit-test-result-action branch from 20c3d03 to 3d169d1 Compare September 30, 2024 10:42
@ebadiere ebadiere modified the milestones: 0.57.0, 0.58.0 Sep 30, 2024
* chore: Move unneeded dependencies to `devDependencies`

Signed-off-by: Victor Yanev <[email protected]>

* chore: Move unneeded dependencies to `devDependencies`

Signed-off-by: Victor Yanev <[email protected]>

* chore: Move unneeded dependencies to `devDependencies`

Signed-off-by: Victor Yanev <[email protected]>

* Merge branch 'main' into 3035-Move-unneeded-dependencies-to-devDependencies

Signed-off-by: Victor Yanev <[email protected]>

* chore: move `@hashgraph/hedera-local` to `devDependencies`

Signed-off-by: Victor Yanev <[email protected]>

* chore: move `pnpm`

Signed-off-by: Victor Yanev <[email protected]>

---------

Signed-off-by: Victor Yanev <[email protected]>
@@ -40,7 +40,11 @@ jobs:
timeout-minutes: 50
permissions:
contents: write
<<<<<<< HEAD

Choose a reason for hiding this comment

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

looks like you have merge issues in this PR

@@ -100,8 +100,13 @@ jobs:
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}

<<<<<<< HEAD

Choose a reason for hiding this comment

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

looks like you have merge issues in this PR

@@ -135,6 +140,7 @@ jobs:
networkTag: ${{inputs.networkNodeTag}}
mirrorTag: ${{inputs.mirrorNodeTag}}

<<<<<<< HEAD

Choose a reason for hiding this comment

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

looks like you have merge issues in this PR

swirlds-automation and others added 8 commits October 10, 2024 10:58
fix: upgrade web3 from 4.12.1 to 4.13.0

Snyk has created this PR to upgrade web3 from 4.12.1 to 4.13.0.

See this package in npm:
web3

See this project in Snyk:
https://app.snyk.io/org/json-rpc-relay/project/9e95a688-4e8c-4400-bbd9-181a47c69778?utm_source=github&utm_medium=referral&page=upgrade-pr

Signed-off-by: ebadiere <[email protected]>
Co-authored-by: snyk-bot <[email protected]>
* feat: Wagmi example usage with Hedera

Signed-off-by: mateuszm-arianelabs <[email protected]>

* chore: typo in readme, remove unused import

Signed-off-by: mateuszm-arianelabs <[email protected]>

* chore: typo in readme, cleanup in code

Signed-off-by: mateuszm-arianelabs <[email protected]>

* chore: change pnpm to npm, small fixes

Signed-off-by: mateuszm-arianelabs <[email protected]>

* feat: pr suggestions applied

Signed-off-by: Mariusz Jasuwienas <[email protected]>

* feat: pr suggestions applied

Signed-off-by: Mariusz Jasuwienas <[email protected]>

* feat: cancuns opcodes are supported in hedera already so this comment about them was no longer valid

Signed-off-by: Mariusz Jasuwienas <[email protected]>

---------

Signed-off-by: mateuszm-arianelabs <[email protected]>
Signed-off-by: Mariusz Jasuwienas <[email protected]>
Co-authored-by: mateuszm-arianelabs <[email protected]>
* test: add helper method for overriding env variables

Signed-off-by: Victor Yanev <[email protected]>

* chore: improve readability

Signed-off-by: Victor Yanev <[email protected]>

* fix: usages

Signed-off-by: Victor Yanev <[email protected]>

* fix: cacheService.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* fix: utils.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* fix: relay.spec.ts and sdkClient.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* fix: eth_call.spec.ts, eth_estimateGas.spec.ts, ethGetBlockBy.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* fix: use helper method to override envs in acceptance test specs

Signed-off-by: Victor Yanev <[email protected]>

* fix: hapiService.spec.ts and precheck.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* fix: sdkClient.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* fix: cacheService.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* fix: metricService.spec.ts and subscriptionController.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* fix: rateLimiter.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* fix: failing tests

Signed-off-by: Victor Yanev <[email protected]>

* chore: revert some changes in rpc_batch3.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* fix: subscribe.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* chore: add docs with examples to `overrideEnvs` and `withOverriddenEnvs`

Signed-off-by: Victor Yanev <[email protected]>

* chore: address comments

Signed-off-by: Victor Yanev <[email protected]>

* fix: build image test

Signed-off-by: Victor Yanev <[email protected]>

* Merge branch 'main' into add-helper-method-for-overriding-env-variables

Signed-off-by: Victor Yanev <[email protected]>

# Conflicts:
#	packages/relay/tests/lib/repositories/hbarLimiter/ethAddressHbarSpendingPlanRepository.spec.ts
#	packages/relay/tests/lib/repositories/hbarLimiter/hbarSpendingPlanRepository.spec.ts

* chore: address comments + fix conflicts after merge

Signed-off-by: Victor Yanev <[email protected]>

* chore: optimize TTL tests in localLRUCache.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* fix: failing unit test after merge from main

Signed-off-by: Victor Yanev <[email protected]>

* chore: optimize imports after merge from main

Signed-off-by: Victor Yanev <[email protected]>

---------

Signed-off-by: Victor Yanev <[email protected]>
… plans (#3058)

* chore: refactor configurations of `HbarLimitService`

Signed-off-by: Victor Yanev <[email protected]>

* chore: fix ts errors

Signed-off-by: Victor Yanev <[email protected]>

* chore: revert formatting of table

Signed-off-by: Victor Yanev <[email protected]>

* refactor: configurations of `HbarLimitService`

Signed-off-by: Victor Yanev <[email protected]>

* Merge branch 'main' into 2970-Note-what-configurations-are-used

Signed-off-by: Victor Yanev <[email protected]>

# Conflicts:
#	packages/relay/src/lib/db/repositories/hbarLimiter/hbarSpendingPlanRepository.ts
#	packages/relay/src/lib/services/hbarLimitService/index.ts
#	packages/relay/tests/lib/services/hbarLimitService/hbarLimitService.spec.ts

* docs: add configuration subsections to table of contents

Signed-off-by: Victor Yanev <[email protected]>

* docs: make descriptions of configurations consistent

Signed-off-by: Victor Yanev <[email protected]>

* chore: revert changes to localLRUCache.ts and redisCache.ts

Signed-off-by: Victor Yanev <[email protected]>

* chore: address comments

Signed-off-by: Victor Yanev <[email protected]>

* chore: address comments

Signed-off-by: Victor Yanev <[email protected]>

* chore: address comments

Signed-off-by: Victor Yanev <[email protected]>

* chore: address comments

Signed-off-by: Victor Yanev <[email protected]>

* chore: moves TODO comment to constants.ts

Signed-off-by: Victor Yanev <[email protected]>

* chore: optimize resetDate calculation

Signed-off-by: Victor Yanev <[email protected]>

* chore: remove unused imports

Signed-off-by: Victor Yanev <[email protected]>

* Merge branch 'main' into 2970-Note-what-configurations-are-used

Signed-off-by: Victor Yanev <[email protected]>

# Conflicts:
#	packages/relay/src/lib/db/repositories/hbarLimiter/ethAddressHbarSpendingPlanRepository.ts
#	packages/relay/src/lib/db/repositories/hbarLimiter/hbarSpendingPlanRepository.ts
#	packages/relay/src/lib/db/repositories/hbarLimiter/ipAddressHbarSpendingPlanRepository.ts
#	packages/relay/src/lib/services/hbarLimitService/index.ts
#	packages/relay/tests/lib/repositories/hbarLimiter/hbarSpendingPlanRepository.spec.ts
#	packages/relay/tests/lib/sdkClient.spec.ts
#	packages/relay/tests/lib/services/hbarLimitService/hbarLimitService.spec.ts

* feat: Implement configuration to pre-populate the cache with spending plans

Signed-off-by: Victor Yanev <[email protected]>

* chore: address comments

Signed-off-by: Victor Yanev <[email protected]>

* chore: address comments

Signed-off-by: Victor Yanev <[email protected]>

* chore: address comments + added improvements to logic

Signed-off-by: Victor Yanev <[email protected]>

* chore: added tests + improvements to logic

Signed-off-by: Victor Yanev <[email protected]>

* docs: update docs

Signed-off-by: Victor Yanev <[email protected]>

* docs: reformat table

Signed-off-by: Victor Yanev <[email protected]>

* chore: improvements to hbarSpendingPlanConfigService.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* chore: fix typo

Signed-off-by: Victor Yanev <[email protected]>

* chore: revert unneeded changes

Signed-off-by: Victor Yanev <[email protected]>

* chore: censor IP addresses in logs of localLRUCache.ts and redisCache.ts

Signed-off-by: Victor Yanev <[email protected]>

* chore: censor IP addresses in logs of localLRUCache.ts and redisCache.ts

Signed-off-by: Victor Yanev <[email protected]>

* fix: hbarSpendingPlanRepository.spec.ts after resolving conflicts from main branch

Signed-off-by: Victor Yanev <[email protected]>

* fix: metricService.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* chore: fix wrong value for limit duration in `hbar-limiter.md`

Co-authored-by: Logan Nguyen <[email protected]>
Signed-off-by: Victor Yanev <[email protected]>

* chore: fix jsdocs

Co-authored-by: Logan Nguyen <[email protected]>
Signed-off-by: Victor Yanev <[email protected]>

* fix: hbarSpendingPlanRepository.ts

Signed-off-by: Victor Yanev <[email protected]>

* fix: ethAddressHbarSpendingPlanRepository.ts

Signed-off-by: Victor Yanev <[email protected]>

* fix: ipAddressHbarSpendingPlanRepository.ts

Signed-off-by: Victor Yanev <[email protected]>

* fix: jsdocs in hbarLimitService/index.ts

Signed-off-by: Victor Yanev <[email protected]>

* fix: do not reset metrics

Signed-off-by: Victor Yanev <[email protected]>

* Merge branch '2970-Note-what-configurations-are-used' into 3055-Implement-configuration-to-pre-populate-the-cache-with-spending-plans

Signed-off-by: Victor Yanev <[email protected]>

# Conflicts:
#	packages/relay/src/lib/db/repositories/hbarLimiter/hbarSpendingPlanRepository.ts
#	packages/relay/tests/lib/repositories/hbarLimiter/hbarSpendingPlanRepository.spec.ts

* chore: remove mocks from hbarSpendingPlanConfigService.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* chore: remove mocks from hbarSpendingPlanConfigService.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* fix: delete obsolete IP and ETH address associations from the cache

Signed-off-by: Victor Yanev <[email protected]>

* chore: rename `SubscriptionType` to `SubscriptionTier`

Signed-off-by: Victor Yanev <[email protected]>

* chore: add jsdocs in hbarSpendingPlanConfigService.ts

Signed-off-by: Victor Yanev <[email protected]>

* chore: address sonar issue

Signed-off-by: Victor Yanev <[email protected]>

* chore: extend tests in relay.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* chore: extend tests in server.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* chore: extend tests in hbarSpendingPlanConfigService.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* chore: extend tests in hbarSpendingPlanConfigService.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* chore: reduce code duplication in hbarSpendingPlanConfigService.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* chore: remove unneeded mocks from hbarSpendingPlanConfigService.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* chore: extend tests in hbarSpendingPlanConfigService.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* chore: remove unused argument of helper method in hbarSpendingPlanConfigService.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* chore: move call of populatePreconfiguredSpendingPlans() back to constructor

Signed-off-by: Victor Yanev <[email protected]>

* chore: remove unused import

Signed-off-by: Victor Yanev <[email protected]>

* chore: address comments

Signed-off-by: Victor Yanev <[email protected]>

* chore: extend tests in localLRUCache.spec.ts and redisCache.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* fix: case sensitivity in ethAddressHbarSpendingPlanRepository.ts

Signed-off-by: Victor Yanev <[email protected]>

* chore: only trace log when configuration file is missing

Signed-off-by: Victor Yanev <[email protected]>

* chore: log `Pre-configured spending plans populated successfully` only if any spending plans have been deleted or added

Signed-off-by: Victor Yanev <[email protected]>

* test: extend repository tests with new methods

Signed-off-by: Victor Yanev <[email protected]>

* test: extend relay.spec.ts

Signed-off-by: Victor Yanev <[email protected]>

* fix: failing unit tests

Signed-off-by: Victor Yanev <[email protected]>

* chore: use override envs helper method in tests

Signed-off-by: Victor Yanev <[email protected]>

---------

Signed-off-by: Victor Yanev <[email protected]>
Signed-off-by: Victor Yanev <[email protected]>
Co-authored-by: Logan Nguyen <[email protected]>
…REVERT but a BAD Request Response (#3088)

* chore: add validation for even calldata length

Signed-off-by: nikolay <[email protected]>

* chore: add test coverage

Signed-off-by: nikolay <[email protected]>

---------

Signed-off-by: nikolay <[email protected]>
* fix: bugged metrics and wrong env vars

Signed-off-by: Victor Yanev <[email protected]>

* fix: jsdocs

Signed-off-by: Victor Yanev <[email protected]>

---------

Signed-off-by: Victor Yanev <[email protected]>
Add retry parameter and default public acceptance tests to 1

Signed-off-by: beeradb <[email protected]>
…in getTransferAmountSumForAccount() (#3103)

Signed-off-by: Logan Nguyen <[email protected]>
Copy link
Contributor

@rbarkerSL rbarkerSL left a comment

Choose a reason for hiding this comment

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

Remove merge conflict tags

…ep-security maintained version.

Signed-off-by: Vasil Boyadzhiev <[email protected]>

Resolving conflicts and rebasing.
Signed-off-by: Vasil Boyadzhiev <[email protected]>
Signed-off-by: Vasil Boyadzhiev <[email protected]>

Resolving conflicts and rebasing.
…ade-path-for-publish-unit-test-result-action' into 2943-determine-upgrade-path-for-publish-unit-test-result-action

Signed-off-by: Vasil Boyadzhiev <[email protected]>
Copy link

Copy link

🚨 Memory Leak Detected 🚨

A potential memory leak has been detected in the test titled validates enforcement of request id. This may impact the application's performance and stability.

Details

📊 Memory Leak Detection Report 📊

GC Type: MarkSweepCompact
Cost: 29,843.3 ms

Heap Statistics (before vs after executing the test):

  • Total Heap Size: increased with 1.46 MB
  • Total Heap Size Executable: no changes
  • Total Physical Size: decreased with 348.16 KB
  • Total Available Size: decreased with 1.51 MB
  • Total Global Handles Size: no changes
  • Used Global Handles Size: decreased with 64.00 bytes
  • Used Heap Size: decreased with 3.46 MB
  • Heap Size Limit: no changes
  • Malloced Memory: no changes
  • External Memory: no changes
  • Peak Malloced Memory: no changes

Heap Space Statistics (before vs after executing the test):

  • Old Space:

    • Space Size: increased with 1.84 MB
    • Space Used Size: increased with 2.06 MB
    • Space Available Size: decreased with 5.26 MB
    • Physical Space Size: increased with 1.84 MB
  • Large Object Space:

    • Space Size: increased with 835.58 KB
    • Space Used Size: increased with 813.50 KB
    • Space Available Size: no changes
    • Physical Space Size: increased with 835.58 KB

Recommendations

Please investigate the memory allocations in this test, focusing on objects that are not being properly deallocated.

@san-est
Copy link
Contributor Author

san-est commented Oct 16, 2024

I will open a new PR for this task.

@san-est san-est closed this Oct 16, 2024
Copy link

codecov bot commented Oct 16, 2024

Codecov Report

Attention: Patch coverage is 91.96850% with 51 lines in your changes missing coverage. Please review.

Project coverage is 83.16%. Comparing base (a3615c5) to head (bb0895e).
Report is 28 commits behind head on main.

Files with missing lines Patch % Lines
packages/relay/src/lib/clients/sdkClient.ts 55.55% 12 Missing ⚠️
packages/relay/src/lib/eth.ts 92.56% 10 Missing and 1 partial ⚠️
packages/relay/src/lib/types/RequestDetails.ts 45.45% 6 Missing ⚠️
packages/relay/src/lib/clients/mirrorNodeClient.ts 91.66% 3 Missing ⚠️
...barLimiter/ethAddressHbarSpendingPlanRepository.ts 88.88% 0 Missing and 3 partials ⚠️
...ay/src/lib/config/hbarSpendingPlanConfigService.ts 97.80% 0 Missing and 2 partials ⚠️
packages/relay/src/lib/constants.ts 71.42% 0 Missing and 2 partials ⚠️
...hbarLimiter/ipAddressHbarSpendingPlanRepository.ts 92.30% 0 Missing and 2 partials ⚠️
packages/relay/src/lib/poller.ts 66.66% 2 Missing ⚠️
packages/relay/src/lib/relay.ts 89.47% 1 Missing and 1 partial ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2963      +/-   ##
==========================================
- Coverage   84.91%   83.16%   -1.75%     
==========================================
  Files          58       63       +5     
  Lines        3905     4236     +331     
  Branches      784      830      +46     
==========================================
+ Hits         3316     3523     +207     
- Misses        348      470     +122     
- Partials      241      243       +2     
Flag Coverage Δ
relay 85.59% <91.96%> (+0.47%) ⬆️
server 83.48% <ø> (+0.42%) ⬆️
ws-server 33.91% <ø> (-63.96%) ⬇️

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

Files with missing lines Coverage Δ
packages/relay/src/lib/clients/cache/redisCache.ts 93.00% <100.00%> (+1.69%) ⬆️
...sitories/hbarLimiter/hbarSpendingPlanRepository.ts 100.00% <100.00%> (ø)
...kages/relay/src/lib/db/types/hbarLimiter/errors.ts 100.00% <100.00%> (ø)
...y/src/lib/db/types/hbarLimiter/subscriptionTier.ts 100.00% <100.00%> (ø)
packages/relay/src/lib/hbarlimiter/index.ts 100.00% <100.00%> (ø)
packages/relay/src/lib/precheck.ts 90.62% <100.00%> (-0.64%) ⬇️
...elay/src/lib/services/cacheService/cacheService.ts 92.48% <100.00%> (ø)
...kages/relay/src/lib/services/debugService/index.ts 76.47% <100.00%> (ø)
.../relay/src/lib/services/hapiService/hapiService.ts 80.00% <100.00%> (ø)
packages/relay/src/lib/subscriptionController.ts 100.00% <100.00%> (ø)
... and 28 more

... and 1 file with indirect coverage changes

@san-est
Copy link
Contributor Author

san-est commented Oct 16, 2024

New PR #3108

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Determine upgrade path for publish-unit-test-result-action