This repository was archived by the owner on May 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
refactor: job isolation done #204
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
e703bff
refactor: job isolation done
Mohiiit ff84440
fix: tests fixed
Mohiiit decc1ad
feat: metadata struct introduced
Mohiiit d11c246
refactor: metadata introduced to each job, happy flow working
Mohiiit a35594a
chore: comments resolved
Mohiiit 7336d08
fix: e2e test should work
Mohiiit 37cff7a
fix: fixing the snos fact
Mohiiit d0f2e34
chore: linting and e2e test
Mohiiit 11d3be9
fix: snos full output set to false in e2e
Mohiiit b1ba517
chore: linting
Mohiiit 9c2c64f
chore: linting, and addressing a few comments
Mohiiit e3dcaea
Merge branch 'main' into refactor/job-isolation
Mohiiit 04e9324
chore: docs added
Mohiiit ac2ee05
chore: comments resolved
Mohiiit fe0f37a
refactor(tests): all tests updated with the latest metadata changes
Mohiiit d490a65
refactor: metadata refactored
Mohiiit 3408e91
Merge branch 'main' into refactor/job-isolation
Mohiiit d7603bd
chore: fixing post merge
Mohiiit e4acd86
chore(ci): fixing the workflow to use rustup show
Mohiiit f46286d
chore(ci): fixing the rustup command
Mohiiit 93d0db6
chore(ci): fixing the test ci
Mohiiit 11cf440
chore(ci): fixing the coverage and e2e workflows
Mohiiit bb6f271
chore(ci): reverting to initial version
Mohiiit d25b21d
fix(ci): coverage workflow updated v1
Mohiiit 4a2c548
fix(ci): coverage workflow updated v2
Mohiiit de27ab8
fix(ci): coverage workflow updated v3
Mohiiit a2ee8de
fix(ci): coverage workflow updated v4
Mohiiit 114043b
fix(ci): coverage workflow updated v5
Mohiiit fcc9bde
fix(ci): coverage workflow updated v6
Mohiiit dd03ea6
fix(ci): coverage workflow updated v7
Mohiiit 639084d
chore(fix): tests fixed and ci workflow fixed for e2e
Mohiiit 685daf1
fix(test): state update create job test fixed
Mohiiit 4fcbf71
chore(e2e): test time fixed and expectedDBState updated
Mohiiit f5a123e
refactor: constants fixed
Mohiiit c648a2f
refactor(tests): build job item moved to common
Mohiiit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| //! Common metadata shared across all job types. | ||
|
|
||
| use chrono::{DateTime, Utc}; | ||
| use serde::{Deserialize, Serialize}; | ||
|
|
||
| /// Common metadata fields shared across all job types. | ||
| /// | ||
| /// # Field Management | ||
| /// These fields are automatically managed by the job processing system and should not | ||
| /// be modified directly by workers or jobs. The system uses these fields to: | ||
| /// - Track processing and verification attempts | ||
| /// - Record completion timestamps | ||
| /// - Store failure information | ||
| #[derive(Debug, Clone, Serialize, Deserialize, Default, PartialEq, Eq)] | ||
| pub struct CommonMetadata { | ||
| /// Number of times the job has been processed | ||
| pub process_attempt_no: u64, | ||
| /// Number of times the job has been retried after processing failures | ||
| pub process_retry_attempt_no: u64, | ||
| /// Number of times the job has been verified | ||
| pub verification_attempt_no: u64, | ||
| /// Number of times the job has been retried after verification failures | ||
| pub verification_retry_attempt_no: u64, | ||
| /// Timestamp when job processing started | ||
| #[serde(with = "chrono::serde::ts_seconds_option")] | ||
| pub process_started_at: Option<DateTime<Utc>>, | ||
| /// Timestamp when job processing completed | ||
| #[serde(with = "chrono::serde::ts_seconds_option")] | ||
| pub process_completed_at: Option<DateTime<Utc>>, | ||
| /// Timestamp when job verification started | ||
| #[serde(with = "chrono::serde::ts_seconds_option")] | ||
| pub verification_started_at: Option<DateTime<Utc>>, | ||
| /// Timestamp when job verification completed | ||
| #[serde(with = "chrono::serde::ts_seconds_option")] | ||
| pub verification_completed_at: Option<DateTime<Utc>>, | ||
| /// Reason for job failure if any | ||
| pub failure_reason: Option<String>, | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| //! Metadata for data availability (DA) jobs. | ||
|
|
||
| use serde::{Deserialize, Serialize}; | ||
|
|
||
| /// Metadata specific to data availability (DA) jobs. | ||
| /// | ||
| /// # Field Management | ||
| /// - Worker-initialized fields: block_number and blob_data_path | ||
| /// - Job-populated fields: tx_hash (during processing) | ||
| #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)] | ||
| pub struct DaMetadata { | ||
| // Worker-initialized fields | ||
| /// Block number for data availability | ||
| pub block_number: u64, | ||
| /// Path to the blob data file | ||
| pub blob_data_path: Option<String>, | ||
|
|
||
| // Job-populated fields | ||
| /// Transaction hash after data submission | ||
| pub tx_hash: Option<String>, | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.