Skip to content

Commit

Permalink
fix(cli): support whileloop in flow cli sync
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed May 11, 2024
1 parent 306007c commit d0a6dda
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion backend/substitute_ee_code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ if [ "$REVERT" == "YES" ]; then
ce_file="${ee_file/${EE_CODE_DIR}/.}"
ce_file="${root_dirpath}/backend/${ce_file}"
if [ "$REVERT_PREVIOUS" == "YES" ]; then
git checkout HEAD@{15} ${ce_file} || true
git checkout HEAD@{5} ${ce_file} || true
else
git restore --staged ${ce_file} || true
git restore ${ce_file} || true
Expand Down
12 changes: 7 additions & 5 deletions backend/windmill-common/src/ee.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::ee::LicensePlan::Community;
use serde::Deserialize;
use serde::{Deserialize, Serialize};
use std::sync::Arc;
use tokio::sync::RwLock;

Expand All @@ -20,8 +20,10 @@ pub async fn get_license_plan() -> LicensePlan {
return Community;
}

#[derive(Deserialize)]
#[serde(untagged)]
pub enum CriticalErrorChannel {}
pub async fn trigger_critical_error_channels(_x: String) {
//not open-source
()
}

pub async fn trigger_critical_error_channels(_error_message: String) {}
#[derive(Serialize, Deserialize)]
pub enum CriticalErrorChannel {}
2 changes: 2 additions & 0 deletions cli/flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ export async function pushFlow(
}
} else if (m.value.type == "forloopflow") {
replaceInlineScripts(m.value.modules);
} else if (m.value.type == "whileloopflow") {
replaceInlineScripts(m.value.modules);
} else if (m.value.type == "branchall") {
m.value.branches.forEach((b) => replaceInlineScripts(b.modules));
} else if (m.value.type == "branchone") {
Expand Down
4 changes: 3 additions & 1 deletion cli/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ export async function handleFile(
no_main_func: typed?.no_main_func,
priority: typed?.priority,
codebase: codebase?.digest,
timeout: typed?.timeout,
};

if (remote) {
Expand Down Expand Up @@ -236,7 +237,8 @@ export async function handleFile(
Boolean(typed.visible_to_runner_only) ==
Boolean(remote.visible_to_runner_only) &&
Boolean(typed.no_main_func) == Boolean(remote.no_main_func) &&
typed.priority == Boolean(remote.priority))
typed.priority == Boolean(remote.priority) &&
typed.timeout == remote.timeout)
) {
log.info(colors.green(`Script ${remotePath} is up to date`));
return true;
Expand Down
2 changes: 1 addition & 1 deletion cli/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import {

import { handleFile } from "./script.ts";
import { deepEqual } from "./utils.ts";
import { Codebase, SyncOptions, mergeConfigWithConfigFile } from "./conf.ts";
import { SyncOptions, mergeConfigWithConfigFile } from "./conf.ts";
import { removePathPrefix } from "./types.ts";
import { SyncCodebase, listSyncCodebases } from "./codebase.ts";

Expand Down

0 comments on commit d0a6dda

Please sign in to comment.