Skip to content

Commit 7fc39a0

Browse files
authored
Merge branch 'main' into feat/priority-queue
2 parents 679a4cd + c1a7303 commit 7fc39a0

File tree

6 files changed

+71
-24
lines changed

6 files changed

+71
-24
lines changed

.github/workflows/nightly-run.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,70 @@ jobs:
149149
bootstrapper-binary-hash: ${{ needs.build-bootstrapper.outputs.bootstrapper-binary-hash }}
150150
cairo-artifacts-hash: ${{ needs.build-madara.outputs.cairo-artifacts-hash }}
151151
secrets: inherit
152+
153+
# ========================================================================= #
154+
# FAILURE NOTIFICATION #
155+
# ========================================================================= #
156+
157+
notify-on-failure:
158+
name: Send SNS notification on failure
159+
runs-on: ubuntu-latest
160+
permissions:
161+
id-token: write
162+
contents: read
163+
needs:
164+
- build-madara
165+
- build-orchestrator
166+
- build-bootstrapper
167+
- test-end-to-end
168+
- build-nightly-and-publish-madara
169+
- build-nightly-and-publish-orchestrator
170+
- build-nightly-and-publish-bootstrapper
171+
if: always() && (needs.build-madara.result == 'failure' || needs.build-orchestrator.result == 'failure' || needs.build-bootstrapper.result == 'failure' || needs.test-end-to-end.result == 'failure' || needs.build-nightly-and-publish-madara.result == 'failure' || needs.build-nightly-and-publish-orchestrator.result == 'failure' || needs.build-nightly-and-publish-bootstrapper.result == 'failure')
172+
steps:
173+
- name: Configure AWS credentials via OIDC
174+
uses: aws-actions/configure-aws-credentials@v4
175+
with:
176+
role-to-assume: ${{ secrets.AWS_SNS_ROLE_ARN }}
177+
aws-region: ${{ secrets.AWS_REGION }}
178+
179+
- name: Send SNS notification
180+
run: |
181+
FAILED_JOBS=""
182+
if [ "${{ needs.build-madara.result }}" == "failure" ]; then
183+
FAILED_JOBS="$FAILED_JOBS- build-madara\n"
184+
fi
185+
if [ "${{ needs.build-orchestrator.result }}" == "failure" ]; then
186+
FAILED_JOBS="$FAILED_JOBS- build-orchestrator\n"
187+
fi
188+
if [ "${{ needs.build-bootstrapper.result }}" == "failure" ]; then
189+
FAILED_JOBS="$FAILED_JOBS- build-bootstrapper\n"
190+
fi
191+
if [ "${{ needs.test-end-to-end.result }}" == "failure" ]; then
192+
FAILED_JOBS="$FAILED_JOBS- test-end-to-end\n"
193+
fi
194+
if [ "${{ needs.build-nightly-and-publish-madara.result }}" == "failure" ]; then
195+
FAILED_JOBS="$FAILED_JOBS- build-nightly-and-publish-madara\n"
196+
fi
197+
if [ "${{ needs.build-nightly-and-publish-orchestrator.result }}" == "failure" ]; then
198+
FAILED_JOBS="$FAILED_JOBS- build-nightly-and-publish-orchestrator\n"
199+
fi
200+
if [ "${{ needs.build-nightly-and-publish-bootstrapper.result }}" == "failure" ]; then
201+
FAILED_JOBS="$FAILED_JOBS- build-nightly-and-publish-bootstrapper\n"
202+
fi
203+
204+
MESSAGE="Nightly Run Failed
205+
206+
Repository: ${{ github.repository }}
207+
Branch: ${{ github.ref_name }}
208+
Workflow: ${{ github.workflow }}
209+
Run ID: ${{ github.run_id }}
210+
Run URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
211+
212+
Failed Jobs:
213+
$(echo -e "$FAILED_JOBS")"
214+
215+
aws sns publish \
216+
--topic-arn "${{ secrets.AWS_SNS_TOPIC_ARN }}" \
217+
--subject "Nightly Run Failed - ${{ github.repository }}" \
218+
--message "$MESSAGE"

madara/crates/client/gateway/client/src/methods.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,6 @@ mod tests {
428428

429429
#[rstest]
430430
#[tokio::test]
431-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
432431
async fn get_preconfirmed_block(client_testnet_fixture: GatewayProvider) {
433432
let latest_block_number =
434433
client_testnet_fixture.get_header(BlockId::Tag(BlockTag::Latest)).await.unwrap().block_number;
@@ -441,7 +440,6 @@ mod tests {
441440
// TODO: Fix this test
442441
#[rstest]
443442
#[tokio::test]
444-
#[ignore = "Ignoring for now because of changes in SN version 0.14.0"]
445443
async fn get_state_update(client_mainnet_fixture: GatewayProvider) {
446444
let state_update = client_mainnet_fixture.get_state_update(BlockId::Number(0)).await.unwrap();
447445
assert_eq!(

madara/crates/primitives/gateway/src/state_update.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ pub struct StateDiff {
4949
pub declared_classes: Vec<DeclaredClassItem>,
5050
pub nonces: HashMap<Felt, Felt>,
5151
pub replaced_classes: Vec<DeployedContractItem>,
52+
/// New in Starknet 0.14.1 - parsed but not stored in DB
53+
#[serde(default)]
54+
pub migrated_compiled_classes: Vec<Felt>,
5255
}
5356

5457
impl From<mp_state_update::StateDiff> for StateDiff {
@@ -75,6 +78,7 @@ impl From<mp_state_update::StateDiff> for StateDiff {
7578
class_hash,
7679
})
7780
.collect(),
81+
migrated_compiled_classes: Vec::new(),
7882
}
7983
}
8084
}

madara/crates/tests/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,6 @@ fn madara_help_shows() {
569569

570570
#[rstest]
571571
#[tokio::test]
572-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
573572
async fn madara_can_sync_a_few_blocks() {
574573
use starknet_core::types::BlockHashAndNumber;
575574
use starknet_types_core::felt::Felt;
@@ -603,7 +602,6 @@ async fn madara_can_sync_a_few_blocks() {
603602

604603
#[rstest]
605604
#[tokio::test]
606-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
607605
async fn madara_can_sync_and_restart() {
608606
use starknet_core::types::BlockHashAndNumber;
609607
use starknet_types_core::felt::Felt;

madara/crates/tests/src/rpc/read.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ mod test_rpc_read_calls {
5656
/// ```
5757
#[rstest]
5858
#[tokio::test]
59-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
6059
async fn test_block_hash_and_number_works() {
6160
let madara = get_madara().await;
6261
let json_client = madara.json_rpc();
@@ -91,7 +90,6 @@ mod test_rpc_read_calls {
9190
/// ```
9291
#[rstest]
9392
#[tokio::test]
94-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
9593
async fn test_get_block_txn_count_works() {
9694
let madara = get_madara().await;
9795
let json_client = madara.json_rpc();
@@ -127,7 +125,6 @@ mod test_rpc_read_calls {
127125
/// ```
128126
#[rstest]
129127
#[tokio::test]
130-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
131128
async fn test_batched_requests_work() {
132129
let madara = get_madara().await;
133130

@@ -276,7 +273,6 @@ mod test_rpc_read_calls {
276273
/// ```
277274
#[rstest]
278275
#[tokio::test]
279-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
280276
async fn test_get_block_txn_with_tx_hashes_works() {
281277
let madara = get_madara().await;
282278
let json_client = madara.json_rpc();
@@ -320,7 +316,6 @@ mod test_rpc_read_calls {
320316
/// ```
321317
#[rstest]
322318
#[tokio::test]
323-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
324319
async fn test_get_block_txn_with_tx_works() {
325320
let madara = get_madara().await;
326321
let json_client = madara.json_rpc();
@@ -371,7 +366,6 @@ mod test_rpc_read_calls {
371366
/// ```
372367
#[rstest]
373368
#[tokio::test]
374-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
375369
async fn test_get_class_hash_at_works() {
376370
let madara = get_madara().await;
377371
let json_client = madara.json_rpc();
@@ -410,7 +404,6 @@ mod test_rpc_read_calls {
410404
/// ```
411405
#[rstest]
412406
#[tokio::test]
413-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
414407
async fn test_get_nonce_works() {
415408
let madara = get_madara().await;
416409
let json_client = madara.json_rpc();
@@ -449,7 +442,6 @@ mod test_rpc_read_calls {
449442
/// ```
450443
#[rstest]
451444
#[tokio::test]
452-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
453445
async fn test_get_txn_by_block_id_and_index_works() {
454446
let madara = get_madara().await;
455447
let json_client = madara.json_rpc();
@@ -489,7 +481,6 @@ mod test_rpc_read_calls {
489481
/// ```
490482
#[rstest]
491483
#[tokio::test]
492-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
493484
async fn test_get_txn_by_hash_works() {
494485
let madara = get_madara().await;
495486
let json_client = madara.json_rpc();
@@ -534,7 +525,6 @@ mod test_rpc_read_calls {
534525
/// ```
535526
#[rstest]
536527
#[tokio::test]
537-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
538528
// TODO: replace this with jsonrpsee client
539529
async fn test_get_txn_receipt_works() {
540530
let madara = get_madara().await;
@@ -589,7 +579,6 @@ mod test_rpc_read_calls {
589579
/// Hence, all the txn would be marked as AcceptedOnL2.
590580
#[rstest]
591581
#[tokio::test]
592-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
593582
async fn test_get_txn_status_works() {
594583
let madara = get_madara().await;
595584
let json_client = madara.json_rpc();
@@ -630,7 +619,6 @@ mod test_rpc_read_calls {
630619
/// ```
631620
#[rstest]
632621
#[tokio::test]
633-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
634622
async fn test_get_storage_at_works() {
635623
let madara = get_madara().await;
636624
let json_client = madara.json_rpc();
@@ -669,7 +657,6 @@ mod test_rpc_read_calls {
669657
/// ```
670658
#[rstest]
671659
#[tokio::test]
672-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
673660
async fn test_get_state_update_works() {
674661
let madara = get_madara().await;
675662
let json_client = madara.json_rpc();
@@ -760,7 +747,6 @@ mod test_rpc_read_calls {
760747
/// the continuation token.
761748
#[rstest]
762749
#[tokio::test]
763-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
764750
async fn test_get_events_works() {
765751
let madara = get_madara().await;
766752
let json_client = madara.json_rpc();
@@ -840,7 +826,6 @@ mod test_rpc_read_calls {
840826
/// ```
841827
#[rstest]
842828
#[tokio::test]
843-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
844829
async fn test_get_events_with_continuation_token_works() {
845830
let madara = get_madara().await;
846831
let json_client = madara.json_rpc();
@@ -1005,7 +990,6 @@ mod test_rpc_read_calls {
1005990
/// Along with that we are also checking for abi and the entry points.
1006991
#[rstest]
1007992
#[tokio::test]
1008-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
1009993
async fn test_get_class_works() {
1010994
let madara = get_madara().await;
1011995
let json_client = madara.json_rpc();
@@ -1044,7 +1028,6 @@ mod test_rpc_read_calls {
10441028
/// for Sierra class versions > v1.1.0, we always use the latest version of the compiler.
10451029
#[rstest]
10461030
#[tokio::test]
1047-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
10481031
async fn test_get_compiled_casm_works() {
10491032
let madara = get_madara().await;
10501033

@@ -1103,7 +1086,6 @@ mod test_rpc_read_calls {
11031086
/// Note: The program has been compressed using the same script mentioned in the above test case.
11041087
#[rstest]
11051088
#[tokio::test]
1106-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
11071089
async fn test_get_class_at_works() {
11081090
let madara = get_madara().await;
11091091
let json_client = madara.json_rpc();

madara/crates/tests/src/storage_proof.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ fn normalize(json: &mut serde_json::Value) {
1414

1515
#[rstest]
1616
#[tokio::test]
17-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
1817
async fn test_storage_proof_snapshots() {
1918
let _ = tracing_subscriber::fmt().with_test_writer().try_init();
2019

@@ -47,7 +46,6 @@ async fn test_storage_proof_snapshots() {
4746

4847
#[rstest]
4948
#[tokio::test]
50-
#[ignore = "Madara is incompatible with 0.14.1 feeder gateway changes, specifically migrated_compiled_classes."]
5149
async fn test_storage_proof_trie_log() {
5250
// use trie log
5351
let cmd_builder = MadaraCmdBuilder::new().args([

0 commit comments

Comments
 (0)