chore: build errors and linting

This commit is contained in:
g
2024-02-15 17:45:50 -07:00
parent 2b33ce24d2
commit 4d44c7eaff
5 changed files with 25 additions and 24 deletions
@@ -64,7 +64,7 @@ export function DynamicSizeInputTemplate(props: BaseInputTemplateProps) {
return;
}
setHeight(ref.current);
}, [ref.current, ref.current?.value]);
}, [ref.current?.value]);
const handleKeyDown = (e: KeyboardEvent<HTMLTextAreaElement>) => {
if (!form?.current) {
+4 -19
View File
@@ -1,8 +1,5 @@
import { cn } from '@/lib/utils';
import {
CustomValidator,
ErrorSchema,
ErrorTransformer,
RJSFSchema,
RJSFValidationError,
UiSchema,
@@ -23,31 +20,19 @@ type JSONType = { [key: string]: JSONType | JSONPrimitive };
export const DEFAULT_COLLAPSED = ['advanced', 'user data'];
class NoValidation implements ValidatorType {
validateFormData(
formData: any,
schema: RJSFSchema,
customValidate?: CustomValidator<any, RJSFSchema, any> | undefined,
transformErrors?: ErrorTransformer<any, RJSFSchema, any> | undefined,
uiSchema?: UiSchema<any, RJSFSchema, any> | undefined,
): ValidationData<any> {
validateFormData(): ValidationData<any> {
return { errors: [], errorSchema: {} };
}
toErrorList(
errorSchema?: ErrorSchema<any> | undefined,
fieldPath?: string[] | undefined,
): RJSFValidationError[] {
toErrorList(): RJSFValidationError[] {
return [];
}
isValid(schema: RJSFSchema, formData: any, rootSchema: RJSFSchema): boolean {
isValid(): boolean {
return true;
}
rawValidation<Result = any>(
schema: RJSFSchema,
formData?: any,
): { errors?: Result[] | undefined; validationError?: Error | undefined } {
rawValidation() {
return {};
}
}
@@ -76,7 +76,7 @@ export function StepRunPlayground({
);
return modifiedInput;
}, [stepRun?.input, workflowRun?.jobRuns]);
}, [stepRun?.input, workflowRun]);
const [stepInput, setStepInput] = useState(originalInput);
@@ -6,8 +6,6 @@ import { Link, useOutletContext, useParams } from 'react-router-dom';
import invariant from 'tiny-invariant';
import { Badge } from '@/components/ui/badge';
import { relativeDate, timeBetween } from '@/lib/utils';
import { ArrowLeftCircleIcon } from '@heroicons/react/24/outline';
import { Button } from '@/components/ui/button';
import { CodeEditor } from '@/components/ui/code-editor';
import { Loading } from '@/components/ui/loading.tsx';
import { TenantContextType } from '@/lib/outlet';
+19 -1
View File
@@ -10,8 +10,11 @@ hatchet = Hatchet(debug=True)
class ManualTriggerWorkflow:
@hatchet.step()
def step1(self, context):
res = context.overrides('res', "HELLO")
context.sleep(3)
print("executed step1")
return {"step1": "data1"}
return {"step1": "data1 "+res}
@hatchet.step(parents=["step1"], timeout='4s')
def step2(self, context):
@@ -20,6 +23,21 @@ class ManualTriggerWorkflow:
print("finished step2")
return {"step2": "data2"}
# @hatchet.step()
# def stepb(self, context):
# res = context.overrides('res', "HELLO")
# context.sleep(3)
# print("executed step1")
# return {"step1": "data1 "+res}
# @hatchet.step(parents=["stepb"], timeout='4s')
# def stepc(self, context):
# print("started step2")
# context.sleep(1)
# print("finished step2")
# return {"step2": "data2"}
workflow = ManualTriggerWorkflow()
worker = hatchet.worker('manual-worker', max_threads=4)