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

Dev #258

Closed
wants to merge 91 commits into from
Closed

Dev #258

Changes from 1 commit
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
3a54afb
build(deps): bump redis from 0.22.1 to 0.22.2
dependabot[bot] Jan 16, 2023
c9fd0fc
Merge pull request #178 from bit-ranger/dependabot/cargo/dev/redis-0.…
bit-ranger Jan 17, 2023
46a382f
build(deps): bump async-trait from 0.1.61 to 0.1.63
dependabot[bot] Jan 23, 2023
88f64ba
build(deps): bump reqwest from 0.11.13 to 0.11.14
dependabot[bot] Jan 23, 2023
e15296d
build(deps): bump async-recursion from 1.0.0 to 1.0.2
dependabot[bot] Jan 23, 2023
e6b6d08
build(deps): bump tokio from 1.24.1 to 1.25.0
dependabot[bot] Jan 30, 2023
4de0916
Merge pull request #184 from bit-ranger/dependabot/cargo/dev/tokio-1.…
bit-ranger Feb 1, 2023
09a2aa2
Merge pull request #179 from bit-ranger/dependabot/cargo/dev/async-tr…
bit-ranger Feb 1, 2023
e864f83
Merge pull request #183 from bit-ranger/dependabot/cargo/dev/async-re…
bit-ranger Feb 1, 2023
b1469a4
Merge pull request #181 from bit-ranger/dependabot/cargo/dev/reqwest-…
bit-ranger Feb 1, 2023
6c66d7d
build(deps): bump actix-web from 4.2.1 to 4.3.0
dependabot[bot] Feb 1, 2023
98a48b8
build(deps): bump serde_json from 1.0.91 to 1.0.92
dependabot[bot] Feb 6, 2023
467bfc9
build(deps): bump jsonpath-rust from 0.2.0 to 0.2.1
dependabot[bot] Feb 6, 2023
519c78e
build(deps): bump async-trait from 0.1.63 to 0.1.64
dependabot[bot] Feb 6, 2023
e0ca341
build(deps): bump redis from 0.22.2 to 0.22.3
dependabot[bot] Feb 6, 2023
e89a796
Merge pull request #186 from bit-ranger/dependabot/cargo/dev/serde_js…
bit-ranger Feb 11, 2023
670b70c
Merge pull request #188 from bit-ranger/dependabot/cargo/dev/async-tr…
bit-ranger Feb 11, 2023
9459697
Merge pull request #180 from bit-ranger/dependabot/cargo/dev/actix-we…
bit-ranger Feb 11, 2023
47d1ccb
Merge pull request #187 from bit-ranger/dependabot/cargo/dev/jsonpath…
bit-ranger Feb 11, 2023
7fc9ce8
Merge pull request #189 from bit-ranger/dependabot/cargo/dev/redis-0.…
bit-ranger Feb 11, 2023
6dc2ae8
build(deps): bump serde_json from 1.0.92 to 1.0.93
dependabot[bot] Feb 13, 2023
0531a08
build(deps): bump futures from 0.3.25 to 0.3.26
dependabot[bot] Feb 13, 2023
5ec4da7
Merge pull request #191 from bit-ranger/dependabot/cargo/dev/serde_js…
bit-ranger Feb 19, 2023
587adc5
Merge pull request #192 from bit-ranger/dependabot/cargo/dev/futures-…
bit-ranger Feb 19, 2023
218daee
build(deps): bump csv from 1.1.6 to 1.2.0
dependabot[bot] Feb 20, 2023
5df9968
build(deps): bump jsonpath-rust from 0.2.1 to 0.2.2
dependabot[bot] Feb 20, 2023
d365365
Merge pull request #193 from bit-ranger/dependabot/cargo/dev/csv-1.2.0
bit-ranger Feb 21, 2023
42a1847
Merge pull request #194 from bit-ranger/dependabot/cargo/dev/jsonpath…
bit-ranger Feb 21, 2023
b268f1a
feat(action): quickjs
bit-ranger Feb 22, 2023
423a9d1
Merge remote-tracking branch 'origin/dev' into dev
bit-ranger Feb 22, 2023
c26f75d
feat(action): quickjs single rt
bit-ranger Feb 28, 2023
ca5e9f9
ci(chord): add windows-gnu
bit-ranger Mar 3, 2023
7cb8d58
ci(chord): disable quickjs
bit-ranger Mar 3, 2023
8b60989
build(deps): bump serde_json from 1.0.93 to 1.0.94
dependabot[bot] Mar 6, 2023
7d3f905
build(deps): bump actix-web from 4.3.0 to 4.3.1
dependabot[bot] Mar 6, 2023
473c5ad
build(deps): bump tokio from 1.25.0 to 1.26.0
dependabot[bot] Mar 6, 2023
7bc2e53
build(deps): bump async-trait from 0.1.64 to 0.1.67
dependabot[bot] Mar 20, 2023
41abd33
Merge pull request #195 from bit-ranger/dependabot/cargo/dev/serde_js…
bit-ranger Mar 27, 2023
3757a52
Merge pull request #200 from bit-ranger/dependabot/cargo/dev/tokio-1.…
bit-ranger Mar 27, 2023
b0415f2
Merge pull request #203 from bit-ranger/dependabot/cargo/dev/async-tr…
bit-ranger Mar 27, 2023
9334da5
build(deps): bump thiserror from 1.0.38 to 1.0.40
dependabot[bot] Mar 27, 2023
ecc0a3e
build(deps): bump futures from 0.3.26 to 0.3.27
dependabot[bot] Mar 27, 2023
2c949f7
build(deps): bump chrono from 0.4.23 to 0.4.24
dependabot[bot] Mar 27, 2023
1b561dd
Merge pull request #204 from bit-ranger/dependabot/cargo/dev/thiserro…
bit-ranger Mar 28, 2023
bdd504e
Merge pull request #206 from bit-ranger/dependabot/cargo/dev/futures-…
bit-ranger Mar 28, 2023
0088a86
Merge pull request #207 from bit-ranger/dependabot/cargo/dev/chrono-0…
bit-ranger Mar 28, 2023
1722895
Merge pull request #199 from bit-ranger/dependabot/cargo/dev/actix-we…
bit-ranger Mar 28, 2023
901208d
build(deps): bump csv from 1.2.0 to 1.2.1
dependabot[bot] Mar 28, 2023
b2bafd6
Merge pull request #196 from bit-ranger/dependabot/cargo/dev/csv-1.2.1
bit-ranger Apr 2, 2023
5753ee6
feat(flow): debug span
bit-ranger Apr 6, 2023
9746337
Merge remote-tracking branch 'origin/dev' into dev
bit-ranger Apr 6, 2023
dbb8563
feat(action): disable quickjs
bit-ranger Apr 6, 2023
8a0bf96
build(deps): bump serde_json from 1.0.94 to 1.0.95
dependabot[bot] Apr 6, 2023
a2e7b32
build(deps): bump serde from 1.0.152 to 1.0.159
dependabot[bot] Apr 6, 2023
d6eabf0
build(deps): bump dirs from 4.0.0 to 5.0.0
dependabot[bot] Apr 6, 2023
b90dd93
Merge pull request #208 from bit-ranger/dependabot/cargo/dev/dirs-5.0.0
bit-ranger Apr 8, 2023
13ed5ac
Merge pull request #211 from bit-ranger/dependabot/cargo/dev/serde-1.…
bit-ranger Apr 8, 2023
6543276
Merge pull request #209 from bit-ranger/dependabot/cargo/dev/serde_js…
bit-ranger Apr 8, 2023
e5545c9
build(deps): bump async-recursion from 1.0.2 to 1.0.4
dependabot[bot] Apr 8, 2023
516a539
Merge pull request #212 from bit-ranger/dependabot/cargo/dev/async-re…
bit-ranger Apr 8, 2023
74e0efb
build(deps): bump redis from 0.22.3 to 0.23.0
dependabot[bot] Apr 10, 2023
e5ea046
build(deps): bump jsonpath-rust from 0.2.2 to 0.3.0
dependabot[bot] Apr 10, 2023
b0a4f52
ci(chord): code review
bit-ranger Apr 13, 2023
1b53e88
build(deps): bump mongodb from 2.3.1 to 2.5.0
dependabot[bot] Apr 24, 2023
080138c
build(deps): bump reqwest from 0.11.14 to 0.11.18
dependabot[bot] May 22, 2023
c305d5c
build(deps): bump openssl from 0.10.45 to 0.10.54
dependabot[bot] Jun 5, 2023
24bc9cc
Merge pull request #224 from bit-ranger/dependabot/cargo/dev/openssl-…
bit-ranger Jun 6, 2023
70d980b
Merge pull request #223 from bit-ranger/dependabot/cargo/dev/reqwest-…
bit-ranger Jun 6, 2023
1b9d953
Merge pull request #217 from bit-ranger/dependabot/cargo/dev/jsonpath…
bit-ranger Jun 6, 2023
eeea520
Merge pull request #216 from bit-ranger/dependabot/cargo/dev/redis-0.…
bit-ranger Jun 6, 2023
014e4c0
Merge pull request #220 from bit-ranger/dependabot/cargo/dev/mongodb-…
bit-ranger Jun 6, 2023
afbf5f5
build(deps): bump url from 2.3.1 to 2.4.0
dependabot[bot] Jun 12, 2023
0565df5
build(deps): bump chrono from 0.4.24 to 0.4.26
dependabot[bot] Jun 12, 2023
b96fe14
build(deps): bump rlua from 0.19.4 to 0.19.7
dependabot[bot] Jul 3, 2023
3b2c0e4
build(deps): bump serde from 1.0.159 to 1.0.175
dependabot[bot] Jul 24, 2023
5ecbe56
Merge pull request #236 from bit-ranger/dependabot/cargo/dev/serde-1.…
bit-ranger Aug 18, 2023
aec60ee
Merge pull request #232 from bit-ranger/dependabot/cargo/dev/rlua-0.19.7
bit-ranger Aug 18, 2023
4f86818
Merge pull request #227 from bit-ranger/dependabot/cargo/dev/url-2.4.0
bit-ranger Aug 18, 2023
713dc3b
Merge pull request #228 from bit-ranger/dependabot/cargo/dev/chrono-0…
bit-ranger Aug 18, 2023
fa60743
build(deps): bump async-trait from 0.1.67 to 0.1.73
dependabot[bot] Aug 18, 2023
9095268
Merge pull request #238 from bit-ranger/dependabot/cargo/dev/async-tr…
bit-ranger Aug 21, 2023
083e14f
ci(github): actions
bit-ranger Aug 21, 2023
e7c4844
build(deps): bump dirs from 5.0.0 to 5.0.1
dependabot[bot] Aug 21, 2023
1d9db69
build(deps): bump reqwest from 0.11.18 to 0.11.22
dependabot[bot] Oct 9, 2023
16107f8
build(deps): bump serde from 1.0.175 to 1.0.191
dependabot[bot] Nov 6, 2023
382401d
Merge pull request #255 from bit-ranger/dependabot/cargo/dev/serde-1.…
bit-ranger Feb 23, 2024
0d231a6
Merge pull request #249 from bit-ranger/dependabot/cargo/dev/reqwest-…
bit-ranger Feb 23, 2024
a57256e
Merge pull request #241 from bit-ranger/dependabot/cargo/dev/dirs-5.0.1
bit-ranger Feb 23, 2024
14fbdb2
build(action): cr
bit-ranger Feb 23, 2024
bdee524
Merge remote-tracking branch 'origin/dev' into dev
bit-ranger Feb 23, 2024
8c0fff8
build(action): cr
bit-ranger Feb 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ci(chord): add windows-gnu
  • Loading branch information
bit-ranger committed Mar 3, 2023
commit ca5e9f93897be86d124d20847445ef393005e9c4
38 changes: 37 additions & 1 deletion .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -139,7 +139,43 @@ jobs:
path: |
target/release/chord.exe
target/release/chord-web.exe


windows-gnu:
runs-on: windows-2022

steps:
- name: checkout
uses: actions/checkout@v2

- name: env-prepare
run: |
rustup update
rustup default stable-x86_64-pc-windows-gnu

- name: chord-build-cache-simple
uses: actions/cache@v2
with:
key: build-target-windows-gnu-simple-${{ hashFiles('Cargo.lock') }}
path: |
./target

- name: chord-build-simple
run: |
chmod -R 777 $PWD
cargo --version
cargo build --all-features --verbose --release


- name: chord-target-upload
uses: actions/upload-artifact@v2
with:
name: x86_64-pc-windows-gnu
retention-days: 1
if-no-files-found: error
path: |
target/release/chord.exe
target/release/chord-web.exe


macos:
runs-on: macos-11
65 changes: 37 additions & 28 deletions flow/src/flow/task/mod.rs
Original file line number Diff line number Diff line change
@@ -11,23 +11,23 @@ use chord_core::collection::TailDropVec;
use chord_core::flow::Flow;
use chord_core::future::time::timeout;
use chord_core::input::{StageLoader, TaskLoader};
use chord_core::output::{StageReporter, TaskReporter};
use chord_core::output::Utc;
use chord_core::output::{StageReporter, TaskReporter};
use chord_core::step::{StepAsset, StepState};
use chord_core::task::{StageAsset, StageId, StageState, TaskAsset, TaskId, TaskState};
use chord_core::value::{json, Map, Value};
use res::TaskAssetStruct;

use crate::CTX_ID;
use crate::flow::assign_by_render;
use crate::flow::case;
use crate::flow::case::arg::{CaseArgStruct, CaseIdStruct};
use crate::flow::step::{action_asset_to_value, StepRunner};
use crate::flow::step::arg::{ArgStruct, ChordStruct};
use crate::flow::step::{action_asset_to_value, StepRunner};
use crate::flow::task::arg::{StageIdStruct, TaskIdStruct};
use crate::flow::task::Error::*;
use crate::flow::task::res::StageAssetStruct;
use crate::flow::task::Error::*;
use crate::model::app::{App, RenderContext};
use crate::CTX_ID;

pub mod arg;
pub mod res;
@@ -123,7 +123,7 @@ impl TaskRunner {
pub async fn run(self) -> Box<dyn TaskAsset> {
let task_id = self.id.to_string();
self.run0()
.instrument(error_span!("task", task=task_id))
.instrument(error_span!("task", task = task_id))
.await
}

@@ -177,7 +177,7 @@ impl TaskRunner {
)),
self.chord.clone(),
)
.await;
.await;
if let Err(e) = pre_step_vec {
error!("task Err");
return Box::new(TaskAssetStruct::new(
@@ -195,7 +195,7 @@ impl TaskRunner {
self.def_ctx.clone(),
pre_step_vec.clone(),
)
.await;
.await;
if let Err(e) = pre_arg {
error!("task Err");
return Box::new(TaskAssetStruct::new(
@@ -298,8 +298,7 @@ impl TaskRunner {
.collect();
for state_id in stage_id_vec {
trace!("stage run");
self.stage_run(state_id.as_str())
.await?;
self.stage_run(state_id.as_str()).await?;
if let StageState::Fail(_) = self.stage_state {
if "stage_fail" == self.flow.stage_break_on(state_id.as_str()) {
break;
@@ -325,10 +324,11 @@ impl TaskRunner {
Arc::new(StageIdStruct::new(
self.id.clone(),
stage_id.to_string(),
"0".to_string())),
"0".to_string(),
)),
self.chord.clone(),
)
.await?;
.await?;
self.step_vec = Arc::new(TailDropVec::from(action_vec));

let duration = self.flow.stage_duration(stage_id);
@@ -353,7 +353,10 @@ impl TaskRunner {
round_count.to_string(),
));
self.stage_run_once(stage, concurrency)
.instrument(error_span!("stage", stage=format!("{}-{}", stage_id, round_count)))
.instrument(error_span!(
"stage",
stage = format!("{}-{}", stage_id, round_count)
))
.await?;
if round_count >= round_max {
break;
@@ -363,7 +366,11 @@ impl TaskRunner {
return Ok(());
}

async fn stage_run_once(&mut self, stage: Arc<StageIdStruct>, concurrency: usize) -> Result<(), Error> {
async fn stage_run_once(
&mut self,
stage: Arc<StageIdStruct>,
concurrency: usize,
) -> Result<(), Error> {
trace!("stage run");
let start = Utc::now();

@@ -385,7 +392,12 @@ impl TaskRunner {
.map_err(|e| Reporter("stage".to_string(), stage.to_string(), e))?;

let result = self
.stage_run_io(stage.clone(), loader.as_mut(), reporter.as_mut(), concurrency)
.stage_run_io(
stage.clone(),
loader.as_mut(),
reporter.as_mut(),
concurrency,
)
.await;

let stage_asset = if let Err(e) = result {
@@ -450,12 +462,11 @@ impl TaskRunner {
};
}

trace!(
"stage load data, {}",
case_data_vec.len()
);
trace!("stage load data, {}", case_data_vec.len());

let case_asset_vec = self.case_data_vec_run(stage.clone(), case_data_vec, concurrency).await;
let case_asset_vec = self
.case_data_vec_run(stage.clone(), case_data_vec, concurrency)
.await;
let first_fail = case_asset_vec.iter().find(|ca| !ca.state().is_ok());
if first_fail.is_some() {
let cause_case = first_fail.unwrap();
@@ -507,7 +518,11 @@ impl TaskRunner {
case_asset_vec
}

fn case_arg_vec<'p>(&self, stage: Arc<StageIdStruct>, data: Vec<(String, Value)>) -> Vec<CaseArgStruct> {
fn case_arg_vec<'p>(
&self,
stage: Arc<StageIdStruct>,
data: Vec<(String, Value)>,
) -> Vec<CaseArgStruct> {
let vec = data
.into_iter()
.map(|(id, d)| {
@@ -563,7 +578,6 @@ async fn pre_ctx_create(sa_vec: &Vec<Box<dyn StepAsset>>) -> Map {
pre_ctx
}


async fn step_vec_create(
app: &dyn App,
flow: &Flow,
@@ -572,10 +586,7 @@ async fn step_vec_create(
chord: Arc<ChordStruct>,
) -> Result<Vec<(String, StepRunner)>, Error> {
let mut step_vec = vec![];
let fake_case_id = Arc::new(CaseIdStruct::new(
stage,
"0".to_string(),
));
let fake_case_id = Arc::new(CaseIdStruct::new(stage, "0".to_string()));
for sid in step_id_vec {
let mut arg = ArgStruct::new(
app,
@@ -595,12 +606,10 @@ async fn step_vec_create(
}

async fn case_run(flow_ctx: &dyn App, case_arg: CaseArgStruct) -> Box<dyn CaseAsset> {
let cas = case::run(flow_ctx, case_arg)
.await;
let cas = case::run(flow_ctx, case_arg).await;
Box::new(cas)
}


async fn case_run_arc(flow_ctx: Arc<dyn App>, case_arg: CaseArgStruct) -> Box<dyn CaseAsset> {
CTX_ID
.scope(