mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-08 08:02:27 +00:00
fix: fix uv path
This commit is contained in:
+1
-1
@@ -159,7 +159,7 @@ ENV PATH="${PATH}:/usr/local/go/bin"
|
||||
ENV GO_PATH=/usr/local/go/bin/go
|
||||
|
||||
# Install UV
|
||||
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.4.18/uv-installer.sh | sh
|
||||
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.4.18/uv-installer.sh | sh && mv /root/.cargo/bin/uv /usr/local/bin/uv
|
||||
|
||||
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
|
||||
RUN apt-get -y update && apt-get install -y curl nodejs awscli && apt-get clean \
|
||||
|
||||
@@ -29,6 +29,9 @@ lazy_static::lazy_static! {
|
||||
static ref PYTHON_PATH: String =
|
||||
std::env::var("PYTHON_PATH").unwrap_or_else(|_| "/usr/local/bin/python3".to_string());
|
||||
|
||||
static ref UV_PATH: String =
|
||||
std::env::var("UV_PATH").unwrap_or_else(|_| "/usr/local/bin/uv".to_string());
|
||||
|
||||
static ref FLOCK_PATH: String =
|
||||
std::env::var("FLOCK_PATH").unwrap_or_else(|_| "/usr/bin/flock".to_string());
|
||||
static ref NON_ALPHANUM_CHAR: Regex = regex::Regex::new(r"[^0-9A-Za-z=.-]").unwrap();
|
||||
@@ -294,13 +297,19 @@ pub async fn uv_pip_compile(
|
||||
}
|
||||
tracing::debug!("uv args: {:?}", args);
|
||||
|
||||
let mut child_cmd = Command::new("uv");
|
||||
#[cfg(windows)]
|
||||
let uv_cmd = "uv";
|
||||
|
||||
#[cfg(unix)]
|
||||
let uv_cmd = UV_PATH.as_str();
|
||||
|
||||
let mut child_cmd = Command::new(uv_cmd);
|
||||
child_cmd
|
||||
.current_dir(job_dir)
|
||||
.args(args)
|
||||
.stdout(Stdio::piped())
|
||||
.stderr(Stdio::piped());
|
||||
let child_process = start_child_process(child_cmd, "uv").await?;
|
||||
let child_process = start_child_process(child_cmd, "/usr/local/bin/uv").await?;
|
||||
append_logs(&job_id, &w_id, logs, db).await;
|
||||
handle_child(
|
||||
job_id,
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
export let workspaceId: string | undefined = undefined
|
||||
export let refreshLog: boolean = false
|
||||
export let durationStates: Writable<Record<string, DurationStatus>> | undefined
|
||||
export let downloadLogs = true
|
||||
|
||||
let lastJobId: string | undefined = undefined
|
||||
let drawer: Drawer | undefined = undefined
|
||||
@@ -40,7 +41,6 @@
|
||||
let logOffset = 0
|
||||
async function getLogs() {
|
||||
if (jobId) {
|
||||
|
||||
const getUpdate = await JobService.getJobUpdates({
|
||||
workspace: workspaceId ?? $workspaceStore!,
|
||||
id: jobId,
|
||||
@@ -85,6 +85,12 @@
|
||||
<div class="absolute z-40 text-xs top-0 left-1"
|
||||
><button class="" on:click={drawer.openDrawer}>explore all steps' logs</button></div
|
||||
>
|
||||
<LogViewer content={logs ?? ''} {jobId} isLoading={waitingForExecutor} {tag} />
|
||||
<LogViewer
|
||||
download={downloadLogs}
|
||||
content={logs ?? ''}
|
||||
{jobId}
|
||||
isLoading={waitingForExecutor}
|
||||
{tag}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
export let hideDownloadInGraph = false
|
||||
export let hideNodeDefinition = false
|
||||
export let hideJobId = false
|
||||
export let hideDownloadLogs = false
|
||||
|
||||
export let isOwner = false
|
||||
export let wideResults = false
|
||||
@@ -34,6 +35,7 @@
|
||||
hideNodeDefinition,
|
||||
hideTimeline,
|
||||
hideJobId
|
||||
hideDownloadLogs
|
||||
})
|
||||
|
||||
function loadOwner(path: string) {
|
||||
|
||||
@@ -38,7 +38,8 @@
|
||||
suspendStatus,
|
||||
hideDownloadInGraph,
|
||||
hideTimeline,
|
||||
hideNodeDefinition
|
||||
hideNodeDefinition,
|
||||
hideDownloadLogs
|
||||
} = getContext<FlowStatusViewerContext>('FlowStatusViewer')
|
||||
|
||||
export let jobId: string
|
||||
@@ -669,6 +670,7 @@
|
||||
result={job.result}
|
||||
logs={job.logs}
|
||||
durationStates={localDurationStatuses}
|
||||
downloadLogs={!hideDownloadLogs}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
@@ -1026,6 +1028,7 @@
|
||||
result={job['result']}
|
||||
logs={job.logs ?? ''}
|
||||
durationStates={localDurationStatuses}
|
||||
downloadLogs={!hideDownloadLogs}
|
||||
/>
|
||||
{:else if selectedNode == 'start'}
|
||||
{#if job.args}
|
||||
@@ -1101,6 +1104,7 @@
|
||||
tag={node.tag}
|
||||
logs={node.logs}
|
||||
durationStates={localDurationStatuses}
|
||||
downloadLogs={!hideDownloadLogs}
|
||||
/>
|
||||
{:else}
|
||||
<p class="p-2 text-tertiary italic"
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
export let drawerOpen = false
|
||||
export let noMaxH = false
|
||||
export let noAutoScroll = false
|
||||
export let download = true
|
||||
|
||||
// @ts-ignore
|
||||
const ansi_up = new AnsiUp()
|
||||
@@ -93,7 +94,7 @@
|
||||
loadedFromObjectStore: string,
|
||||
limit: number
|
||||
) {
|
||||
let content = loadedFromObjectStore + jobContent ?? ''
|
||||
let content = loadedFromObjectStore + (jobContent ?? '')
|
||||
if (content.length > limit) {
|
||||
return content.substring(content.length - limit)
|
||||
}
|
||||
@@ -148,7 +149,7 @@
|
||||
<Drawer bind:this={logViewer} bind:open={drawerOpen} size="900px">
|
||||
<DrawerContent title="Expanded Logs" on:close={logViewer.closeDrawer}>
|
||||
<svelte:fragment slot="actions">
|
||||
{#if jobId}
|
||||
{#if jobId && download}
|
||||
<Button
|
||||
href="{base}/api/w/{$workspaceStore}/jobs_u/get_logs/{jobId}"
|
||||
download="windmill_logs_{jobId}.txt"
|
||||
@@ -196,7 +197,7 @@
|
||||
>
|
||||
<div class="sticky z-10 top-0 right-0 w-full flex flex-row-reverse justify-between text-sm">
|
||||
<div class="flex gap-2 pl-0.5 bg-surface-secondary">
|
||||
{#if jobId}
|
||||
{#if jobId && download}
|
||||
<div class="flex items-center">
|
||||
<a
|
||||
class="text-primary pb-0.5"
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
export let trigger = false
|
||||
export let loading = false
|
||||
export let preFilter: string
|
||||
export let disableAi = false
|
||||
|
||||
let scripts: Script[] | undefined = undefined
|
||||
export let filteredItems: (Script & { marked?: string })[] | (Item & { marked?: string })[] = []
|
||||
@@ -53,14 +54,14 @@
|
||||
bind:this={input}
|
||||
type="text"
|
||||
bind:value={funcDesc}
|
||||
placeholder="Search {trigger ? 'triggers' : 'scripts'} or AI gen"
|
||||
placeholder="Search {trigger ? 'triggers' : 'scripts'} {disableAi ? '' : 'or AI gen'}"
|
||||
/>
|
||||
</div>
|
||||
<div class="absolute inset-y-0 right-3 flex items-center pointer-events-none">
|
||||
{#if loading}
|
||||
<Loader2 size={16} class="animate-spin text-gray-400" />
|
||||
{/if}
|
||||
{#if funcDesc?.length === 0 && !loading}
|
||||
{#if funcDesc?.length === 0 && !loading && !disableAi}
|
||||
<Wand2 size={14} class="fill-current opacity-70 text-violet-800 dark:text-violet-400" />
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -95,7 +95,7 @@ shouldUsePortal={true} -->
|
||||
role="none"
|
||||
>
|
||||
<div class="flex flex-row items-center gap-2">
|
||||
<StepGenQuick on:insert bind:funcDesc {preFilter} {loading} />
|
||||
<StepGenQuick {disableAi} on:insert bind:funcDesc {preFilter} {loading} />
|
||||
{#if selectedKind != 'preprocessor' && selectedKind != 'flow'}
|
||||
<ToggleHubWorkspaceQuick bind:selected={preFilter} />
|
||||
{/if}
|
||||
|
||||
@@ -37,6 +37,7 @@ export type FlowStatusViewerContext = {
|
||||
hideTimeline?: boolean
|
||||
hideNodeDefinition?: boolean
|
||||
hideJobId?: boolean
|
||||
hideDownloadLogs
|
||||
}
|
||||
|
||||
export type GraphModuleState = {
|
||||
|
||||
Reference in New Issue
Block a user