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

add helper script to compile sol artifacts locally #16180

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

tt-cll
Copy link
Contributor

@tt-cll tt-cll commented Jan 31, 2025

@tt-cll
Copy link
Contributor Author

tt-cll commented Jan 31, 2025

abbrevieated output:

ttata@MB-KN79CFQTC4 deployment % ./setup_solana_for_tests.sh
Cloning chainlink-ccip...
Cloning into '/var/folders/pm/1lgv9cnn42bds51rvgs7kmdm0000gp/T/tmp.ghoLuIBlRr'...
remote: Enumerating objects: 11443, done.
remote: Counting objects: 100% (3155/3155), done.
remote: Compressing objects: 100% (973/973), done.
remote: Total 11443 (delta 2787), reused 2191 (delta 2180), pack-reused 8288 (from 4)
Receiving objects: 100% (11443/11443), 4.05 MiB | 695.00 KiB/s, done.
Resolving deltas: 100% (7920/7920), done.
Checking out commit 9b02e505b268...
Note: switching to '9b02e505b268'.

<anchor build output removed for brevity>

   Compiling ccip_invalid_receiver v0.0.0-dev (/private/var/folders/pm/1lgv9cnn42bds51rvgs7kmdm0000gp/T/tmp.ghoLuIBlRr/chains/solana/contracts/programs/ccip-invalid-receiver)
    Finished release [optimized] target(s) in 0.71s
Copying compiled artifacts to /Users/ttata/dev/chainlink/deployment/ccip/changeset/internal/solana_contracts...
Script completed successfully.
Cleaning up...

artifacts populated and subsequent tests pass

Comment on lines +45 to +50
echo "Cloning chainlink-ccip..."
git clone https://github.com/smartcontractkit/chainlink-ccip.git "$TEMP_REPO_DIR"

echo "Checking out commit $COMMIT_SHA..."
cd "$TEMP_REPO_DIR"
git checkout "$COMMIT_SHA"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: if someone has already chainlink-ccip cloned, in that case can it accept an arg , if set it will load from that existing dir?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah I didn't want to potentially deal with dirty local dirs or the script failing for any edge cases. Your approach is definitely faster, but the clone right now is not too bad.

@cl-sonarqube-production
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Copy link
Contributor

AER Report: CI Core

aer_workflow , commit , Detect Changes , Clean Go Tidy & Generate , Scheduled Run Frequency , GolangCI Lint (deployment) , Core Tests (go_core_tests) , Core Tests (go_core_tests_integration) , Core Tests (go_core_ccip_deployment_tests) , test-scripts , Core Tests (go_core_fuzz) , Core Tests (go_core_race_tests) , lint , SonarQube Scan

1. Race condition detected:[Run tests]

Source of Error:
Run tests	2025-01-31T22:33:20.8296147Z + echo 'Race(s) detected'
Run tests	2025-01-31T22:33:20.8296633Z Race(s) detected
Run tests	2025-01-31T22:33:20.8296962Z + exit 1
Run tests	2025-01-31T22:33:20.8314313Z ##[error]Process completed with exit code 1.

Why: The Go tests detected a race condition, which indicates that there are concurrent operations in the code that are not properly synchronized, leading to unpredictable behavior.

Suggested fix: Use Go's race detector to identify the specific lines of code causing the race condition and refactor the code to ensure proper synchronization, such as using mutexes or other concurrency control mechanisms.

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

Successfully merging this pull request may close these issues.

2 participants