Skip to content

Commit

Permalink
Merge branch 'main' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
daryllimyt committed Jan 23, 2025
2 parents e3c0313 + ec56d8f commit 111a504
Show file tree
Hide file tree
Showing 42 changed files with 1,149 additions and 251 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ COMPOSE_PROJECT_NAME=tracecat
# --- Shared URL env vars ---
PUBLIC_APP_URL=http://localhost
PUBLIC_API_URL=${PUBLIC_APP_URL}/api
SAML_SP_ACS_URL=${PUBLIC_API_URL}/auth/saml/acs
INTERNAL_API_URL=http://api:8000
INTERNAL_EXECUTOR_URL=http://executor:8000
# -- Caddy env vars ---
Expand Down Expand Up @@ -80,7 +79,8 @@ USER_AUTH_SECRET=your-auth-secret

# SAML SSO settings
SAML_IDP_METADATA_URL=
TRACECAT__SETTING_OVERRIDE_SAML_ENABLED= # Enables SAML on startup
# Enables SAML on startup
TRACECAT__SETTING_OVERRIDE_SAML_ENABLED=

# --- Temporal ---
TEMPORAL__CLUSTER_URL=temporal:7233
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"""

import asyncio
import os
from collections.abc import Sequence

from temporalio.api.enums.v1 import IndexedValueType
Expand Down
2 changes: 0 additions & 2 deletions deployments/aws/ecs/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ locals {
# Tracecat common URLs
public_app_url = "https://${var.domain_name}"
public_api_url = "https://${var.domain_name}/api"
saml_acs_url = "https://${var.domain_name}/api/auth/saml/acs"
internal_api_url = "http://api-service:8000" # Service connect DNS name
internal_executor_url = "http://executor-service:8002" # Service connect DNS name
temporal_cluster_url = var.temporal_cluster_url
Expand All @@ -34,7 +33,6 @@ locals {
for k, v in merge({
LOG_LEVEL = var.log_level
RUN_MIGRATIONS = "true"
SAML_SP_ACS_URL = local.saml_acs_url
TEMPORAL__CLIENT_RPC_TIMEOUT = var.temporal_client_rpc_timeout
TEMPORAL__CLUSTER_NAMESPACE = local.temporal_namespace
TEMPORAL__CLUSTER_QUEUE = local.temporal_cluster_queue
Expand Down
2 changes: 1 addition & 1 deletion deployments/aws/ecs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ variable "tracecat_ui_image" {

variable "tracecat_image_tag" {
type = string
default = "0.21.4"
default = "0.21.7"
}

variable "temporal_server_image" {
Expand Down
2 changes: 1 addition & 1 deletion deployments/aws/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ variable "tracecat_ui_image" {

variable "tracecat_image_tag" {
type = string
default = "0.21.4"
default = "0.21.7"
}

variable "temporal_server_image" {
Expand Down
1 change: 0 additions & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ services:
USER_AUTH_SECRET: ${USER_AUTH_SECRET}
# SAML SSO
SAML_IDP_METADATA_URL: ${SAML_IDP_METADATA_URL}
SAML_SP_ACS_URL: ${SAML_SP_ACS_URL}
# Temporal
TEMPORAL__CLUSTER_URL: ${TEMPORAL__CLUSTER_URL}
TEMPORAL__CLUSTER_QUEUE: ${TEMPORAL__CLUSTER_QUEUE}
Expand Down
9 changes: 4 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ services:
- ./Caddyfile:/etc/caddy/Caddyfile

api:
image: ghcr.io/tracecathq/tracecat:${TRACECAT__IMAGE_TAG:-0.21.4}
image: ghcr.io/tracecathq/tracecat:${TRACECAT__IMAGE_TAG:-0.21.7}
container_name: api
restart: unless-stopped
networks:
Expand Down Expand Up @@ -46,7 +46,6 @@ services:
RUN_MIGRATIONS: "true"
# SAML SSO
SAML_IDP_METADATA_URL: ${SAML_IDP_METADATA_URL}
SAML_SP_ACS_URL: ${SAML_SP_ACS_URL}
# Temporal
TEMPORAL__CLUSTER_URL: ${TEMPORAL__CLUSTER_URL}
TEMPORAL__CLUSTER_QUEUE: ${TEMPORAL__CLUSTER_QUEUE}
Expand All @@ -61,7 +60,7 @@ services:
OLLAMA__API_URL: ${OLLAMA__API_URL}

worker:
image: ghcr.io/tracecathq/tracecat:${TRACECAT__IMAGE_TAG:-0.21.4}
image: ghcr.io/tracecathq/tracecat:${TRACECAT__IMAGE_TAG:-0.21.7}
restart: unless-stopped
networks:
- core
Expand All @@ -86,7 +85,7 @@ services:
command: ["python", "tracecat/dsl/worker.py"]

executor:
image: ghcr.io/tracecathq/tracecat:${TRACECAT__IMAGE_TAG:-0.21.4}
image: ghcr.io/tracecathq/tracecat:${TRACECAT__IMAGE_TAG:-0.21.7}
restart: unless-stopped
networks:
- core
Expand Down Expand Up @@ -121,7 +120,7 @@ services:
]

ui:
image: ghcr.io/tracecathq/tracecat-ui:${TRACECAT__IMAGE_TAG:-0.21.4}
image: ghcr.io/tracecathq/tracecat-ui:${TRACECAT__IMAGE_TAG:-0.21.7}
container_name: ui
restart: unless-stopped
networks:
Expand Down
4 changes: 2 additions & 2 deletions docs/self-hosting/authentication/saml.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ TRACECAT__SETTING_OVERRIDE_SAML_ENABLED=true
Select **SAML 2.0** and click on **Create**.
</Step>
<Step title="Configure ACS endpoint">
Set the **Single sign-on URL** to `https://<your-tracecat-instance>/api/auth/saml/acs`.
Set the **Single sign-on URL** to `https://<your-tracecat-instance>/auth/saml/acs`.
</Step>
<Step title="Configure Audience Restriction">
Set the **Audience Restriction** to `https://<your-tracecat-instance>/api`.
Set the **Audience Restriction** to `https://<your-tracecat-instance>`.
</Step>
<Step title="Configure SAML settings in environment variables">
Set the following environment variables in your `.env` file:
Expand Down
8 changes: 4 additions & 4 deletions docs/self-hosting/deployment-options/docker-compose.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ Use the commands listed below to download the required configuration files

```bash
# 1. Download the env.sh installation script
curl -o env.sh https://raw.githubusercontent.com/TracecatHQ/tracecat/0.21.4/env.sh
curl -o env.sh https://raw.githubusercontent.com/TracecatHQ/tracecat/0.21.7/env.sh

# 2. Download the .env.example template file (env.sh needs this to generate your .env file)
curl -o .env.example https://raw.githubusercontent.com/TracecatHQ/tracecat/0.21.4/.env.example
curl -o .env.example https://raw.githubusercontent.com/TracecatHQ/tracecat/0.21.7/.env.example

# 3. Make the env.sh script executable and run it
chmod +x env.sh && ./env.sh
Expand Down Expand Up @@ -87,13 +87,13 @@ Tracecat uses Caddy as a reverse proxy.
You'll need to download the following `Caddyfile` to configure this service.

```bash
curl -o Caddyfile https://raw.githubusercontent.com/TracecatHQ/tracecat/0.21.4/Caddyfile
curl -o Caddyfile https://raw.githubusercontent.com/TracecatHQ/tracecat/0.21.7/Caddyfile
```

## Download Docker Compose File

```bash
curl -o docker-compose.yml https://raw.githubusercontent.com/TracecatHQ/tracecat/0.21.4/docker-compose.yml
curl -o docker-compose.yml https://raw.githubusercontent.com/TracecatHQ/tracecat/0.21.7/docker-compose.yml
```

## Start Tracecat
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/updating.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ description: Learn how to safely update versions and run data migrations.
version.

```
curl -o env-migration.sh https://raw.githubusercontent.com/TracecatHQ/tracecat/0.21.4/env-migration.sh
curl -o .env.example https://raw.githubusercontent.com/TracecatHQ/tracecat/0.21.4/.env.example
curl -o env-migration.sh https://raw.githubusercontent.com/TracecatHQ/tracecat/0.21.7/env-migration.sh
curl -o .env.example https://raw.githubusercontent.com/TracecatHQ/tracecat/0.21.7/.env.example
```
</Step>
<Step title="Execute environment variables migration">
Expand All @@ -39,7 +39,7 @@ description: Learn how to safely update versions and run data migrations.
Download the latest Docker Compose file.

```
curl -o docker-compose.yml https://raw.githubusercontent.com/TracecatHQ/tracecat/0.21.4/docker-compose.yml
curl -o docker-compose.yml https://raw.githubusercontent.com/TracecatHQ/tracecat/0.21.7/docker-compose.yml
```
</Step>
<Step title="Restart Tracecat">
Expand Down
1 change: 1 addition & 0 deletions frontend/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
16 changes: 11 additions & 5 deletions frontend/src/app/workspaces/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
import Image from "next/image"
import { useParams } from "next/navigation"
import { useAuth } from "@/providers/auth"
import { WorkflowBuilderProvider } from "@/providers/builder"
import { WorkflowProvider } from "@/providers/workflow"
import { WorkspaceProvider } from "@/providers/workspace"
import { LogOut } from "lucide-react"
import TracecatIcon from "public/icon.png"
import { ReactFlowProvider } from "reactflow"

import { useWorkspaceManager } from "@/lib/hooks"
import { Button } from "@/components/ui/button"
Expand Down Expand Up @@ -39,11 +41,15 @@ export default function WorkspaceLayout({
return (
<WorkspaceProvider workspaceId={wsId}>
<WorkflowProvider workspaceId={wsId}>
<div className="no-scrollbar flex h-screen max-h-screen flex-col overflow-hidden">
{/* DynamicNavbar needs a WorkflowProvider and a WorkspaceProvider */}
<DynamicNavbar />
<div className="grow overflow-auto">{children}</div>
</div>
<ReactFlowProvider>
<WorkflowBuilderProvider>
<div className="no-scrollbar flex h-screen max-h-screen flex-col overflow-hidden">
{/* DynamicNavbar needs a WorkflowProvider and a WorkspaceProvider */}
<DynamicNavbar />
<div className="grow overflow-auto">{children}</div>
</div>
</WorkflowBuilderProvider>
</ReactFlowProvider>
</WorkflowProvider>
</WorkspaceProvider>
)
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/dashboard/delete-workflow-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ export function DeleteWorkflowAlertDialog({
{children}
<AlertDialogContent>
<AlertDialogHeader>
<AlertDialogTitle>Delete secret</AlertDialogTitle>
<AlertDialogTitle>Delete workflow</AlertDialogTitle>
<AlertDialogDescription>
Are you sure you want to delete this secret from the workflow? This
action cannot be undone.
Are you sure you want to delete this workflow? This action cannot be
undone.
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/editor/editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ export function CustomEditor({
scrollbar: {
verticalScrollbarSize: 10,
horizontalScrollbarSize: 10,
alwaysConsumeMouseWheel: false,
},
renderLineHighlight: "all",
automaticLayout: true,
Expand Down
21 changes: 9 additions & 12 deletions frontend/src/components/executions/event-history.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,27 +48,24 @@ export function WorkflowExecutionEventHistory({
selectedEvent?: WorkflowExecutionEvent
setSelectedEvent: (event: WorkflowExecutionEvent) => void
}) {
const {
workflowExecution,
workflowExecutionLoading,
workflowExecutionError,
} = useWorkflowExecution(executionId, {
refetchInterval: REFETCH_INTERVAL,
})
const { execution, executionIsLoading, executionError } =
useWorkflowExecution(executionId, {
refetchInterval: REFETCH_INTERVAL,
})

if (workflowExecutionLoading) {
if (executionIsLoading) {
return <CenteredSpinner />
}
if (workflowExecutionError) {
return <AlertNotification message={workflowExecutionError.message} />
if (executionError) {
return <AlertNotification message={executionError.message} />
}
if (!workflowExecution) {
if (!execution) {
return <NoContent message="No event history found." />
}
return (
<div className="group flex flex-col gap-4 py-2">
<nav className="grid gap-1 px-2">
{workflowExecution.events.map((event, index) => (
{execution.events.map((event, index) => (
<Button
key={index}
className={cn(
Expand Down
56 changes: 7 additions & 49 deletions frontend/src/components/nav/workbench-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
import React from "react"
import Link from "next/link"
import { usePathname, useRouter } from "next/navigation"
import {
ApiError,
RegistryActionValidateResponse,
workflowExecutionsCreateWorkflowExecution,
} from "@/client"
import { ApiError, RegistryActionValidateResponse } from "@/client"
import { useWorkflow } from "@/providers/workflow"
import { useWorkspace } from "@/providers/workspace"
import { zodResolver } from "@hookform/resolvers/zod"
Expand All @@ -18,7 +14,6 @@ import {
PlayIcon,
SaveIcon,
SquarePlay,
Trash2Icon,
WorkflowIcon,
} from "lucide-react"
import { useForm } from "react-hook-form"
Expand All @@ -27,7 +22,7 @@ import { z } from "zod"

import { TracecatApiError } from "@/lib/errors"
import { exportWorkflow, handleExportError } from "@/lib/export"
import { useWorkflowManager } from "@/lib/hooks"
import { useManualWorkflowExecution, useWorkflowManager } from "@/lib/hooks"
import { cn } from "@/lib/utils"
import {
AlertDialog,
Expand All @@ -49,16 +44,7 @@ import {
BreadcrumbSeparator,
} from "@/components/ui/breadcrumb"
import { Button } from "@/components/ui/button"
import {
Dialog,
DialogClose,
DialogContent,
DialogDescription,
DialogFooter,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "@/components/ui/dialog"
import { Dialog } from "@/components/ui/dialog"
import {
DropdownMenu,
DropdownMenuContent,
Expand Down Expand Up @@ -369,6 +355,7 @@ function WorkflowManualTrigger({
disabled: boolean
workflowId: string
}) {
const { createExecution } = useManualWorkflowExecution(workflowId)
const [open, setOpen] = React.useState(false)
const { workspaceId } = useWorkspace()
const [lastTriggerInput, setLastTriggerInput] = React.useState<string | null>(
Expand All @@ -391,12 +378,9 @@ function WorkflowManualTrigger({
setLastTriggerInput(payload)
setManualTriggerErrors(null)
try {
const response = await workflowExecutionsCreateWorkflowExecution({
workspaceId,
requestBody: {
workflow_id: workflowId,
inputs: payload ? JSON.parse(payload) : undefined,
},
const response = await createExecution({
workflow_id: workflowId,
inputs: payload ? JSON.parse(payload) : undefined,
})
console.log("Workflow started", response)
toast({
Expand Down Expand Up @@ -605,34 +589,8 @@ function WorkbenchNavOptions({
<DownloadIcon className="mr-2 size-4" />
<span>Export as YAML</span>
</DropdownMenuItem>
<DialogTrigger asChild>
<DropdownMenuItem className="text-xs text-red-600">
<Trash2Icon className="mr-2 size-4" />
<span>Delete</span>
</DropdownMenuItem>
</DialogTrigger>
</DropdownMenuContent>
</DropdownMenu>

<DialogContent>
<DialogHeader>
<DialogTitle>Delete workflow</DialogTitle>
<DialogClose />
</DialogHeader>
<DialogDescription>
Are you sure you want to permanently delete this workflow?
</DialogDescription>
<DialogFooter>
<Button variant="outline">Cancel</Button>
<Button
onClick={handleDeleteWorkflow}
variant="destructive"
className="mr-2"
>
Delete
</Button>
</DialogFooter>
</DialogContent>
</Dialog>
</>
)
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/organization/org-settings-sso.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export function OrgSettingsSsoForm() {
</FormLabel>
<FormControl>
<Input
placeholder="http://localhost/api/auth/saml/acs"
placeholder="http://localhost/auth/saml/acs"
{...field}
value={field.value ?? ""}
disabled
Expand Down
Loading

0 comments on commit 111a504

Please sign in to comment.