Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
50 changes: 45 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,38 +171,78 @@ jobs:
- run:
name: "Check code formatting"
command: |
sudo -u lightning mix format --check-formatted || echo "format" >> /tmp/lint_failed
mkdir -p /tmp/lint
sudo -u lightning mix format --check-formatted > /tmp/lint/format.log 2>&1 \
|| echo "format" >> /tmp/lint_failed
cat /tmp/lint/format.log
- run:
name: "Check code style with Credo"
when: always
command: |
sudo -u lightning mix credo --strict --all || echo "credo" >> /tmp/lint_failed
mkdir -p /tmp/lint
sudo -u lightning mix credo --strict --all > /tmp/lint/credo.log 2>&1 \
|| echo "credo" >> /tmp/lint_failed
cat /tmp/lint/credo.log
- run:
name: "Check for security vulnerabilities"
when: always
command: |
sudo -u lightning mix sobelow --threshold medium || echo "sobelow" >> /tmp/lint_failed
mkdir -p /tmp/lint
sudo -u lightning mix sobelow --threshold medium > /tmp/lint/sobelow.log 2>&1 \
|| echo "sobelow" >> /tmp/lint_failed
cat /tmp/lint/sobelow.log
- run:
name: "Check for known-vulnerable Hex dependencies"
when: always
command: |
mkdir -p /tmp/lint
# GHSA-g2wm-735q-3f56: cowlib cookie encoder CRLF injection (low);
# no patched release available yet.
#
# hackney advisories below are fixed in hackney 4.0.1, but we cannot
# upgrade yet: hackney 4.x is a breaking API change (request/body
# return shapes changed) and our dependency graph is not ready.
# tzdata (all releases, incl. latest 1.1.4) pins hackney ~> 1.17 and
# calls :hackney.get/:hackney.body directly, which crashes on 4.x;
# httpoison < 3.0 has the same incompatibility and gcs_signed_url
# pins httpoison ~> 2.0. Revisit once tzdata ships a hackney-4.x
# compatible release.
# GHSA-gp9c-pm5m-5cxr (high) ssl:connect post-handshake timeout
# GHSA-pj7v-xfvx-wmjq (moderate) SSRF allowlist bypass
# GHSA-j9wq-vxxc-94wf (moderate) CR/LF injection in query param
# GHSA-mp55-p8c9-rfw2 (low) CRLF injection via domain/path
sudo -u lightning mix deps.audit \
--ignore-advisory-ids GHSA-g2wm-735q-3f56 \
--ignore-advisory-ids GHSA-g2wm-735q-3f56,GHSA-gp9c-pm5m-5cxr,GHSA-pj7v-xfvx-wmjq,GHSA-j9wq-vxxc-94wf,GHSA-mp55-p8c9-rfw2 \
> /tmp/lint/deps_audit.log 2>&1 \
|| echo "deps.audit" >> /tmp/lint_failed
cat /tmp/lint/deps_audit.log
- run:
name: "Check for retired Hex packages"
when: always
command: |
sudo -u lightning mix hex.audit || echo "hex.audit" >> /tmp/lint_failed
mkdir -p /tmp/lint
sudo -u lightning mix hex.audit > /tmp/lint/hex_audit.log 2>&1 \
|| echo "hex.audit" >> /tmp/lint_failed
cat /tmp/lint/hex_audit.log
- run:
name: "Verify all checks passed"
when: always
command: |
if [ -f /tmp/lint_failed ]; then
echo "The following checks failed:"
cat /tmp/lint_failed
echo
while IFS= read -r check; do
# map the check name to its captured log file
log="/tmp/lint/$(echo "$check" | tr '.' '_').log"
echo "==================== ${check} ===================="
if [ -f "$log" ]; then
cat "$log"
else
echo "(no output captured)"
fi
echo
done < /tmp/lint_failed
exit 1
fi

Expand Down
43 changes: 0 additions & 43 deletions assets/js/collaborative-editor/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ import { useCallback, useContext, useState } from 'react';

import { useURLState } from '#/react/lib/use-url-state';

import { buildClassicalEditorUrl } from '../../utils/editorUrlConversion';
import * as dataclipApi from '../api/dataclips';
import { StoreContext } from '../contexts/StoreProvider';
import { channelRequest } from '../hooks/useChannel';
import { getCsrfToken } from '../lib/csrf';
import { useActiveRun } from '../hooks/useHistory';
import { useSession } from '../hooks/useSession';
import {
useIsNewWorkflow,
useLimits,
Expand Down Expand Up @@ -228,7 +225,6 @@ export function Header({
const isCreateWorkflowPanelCollapsed = useIsCreateWorkflowPanelCollapsed();
const importPanelState = useImportPanelState();
const { selectedTemplate } = useTemplatePanel();
const { provider } = useSession();
const limits = useLimits();
const { isReadOnly } = useWorkflowReadOnly();
const { hasChanges } = useUnsavedChanges();
Expand Down Expand Up @@ -365,25 +361,6 @@ export function Header({
}
}, [firstTriggerId, openRunPanel, selectNode, updateSearchParams]);

const handleSwitchToLegacyEditor = useCallback(async () => {
if (!provider?.channel || !projectId || !workflowId) return;

try {
await channelRequest(provider.channel, 'switch_to_legacy_editor', {});

// Build legacy editor URL and navigate
const legacyUrl = buildClassicalEditorUrl({
projectId,
workflowId,
searchParams: new URLSearchParams(window.location.search),
isNewWorkflow,
});
window.location.href = legacyUrl;
} catch (error) {
console.error('Failed to switch to legacy editor:', error);
}
}, [provider, projectId, workflowId, isNewWorkflow]);

useKeyboardShortcut(
'Control+Enter, Meta+Enter',
() => {
Expand Down Expand Up @@ -452,26 +429,6 @@ export function Header({
<div className="mx-auto sm:px-4 lg:px-4 py-6 flex items-center h-20 text-sm gap-2">
<Breadcrumbs>{children}</Breadcrumbs>
<ReadOnlyWarning className="ml-3" />
{projectId && workflowId && (
<Tooltip
content={
<span>
Looking for the old version of the workflow builder? You can
switch back for a few more days by clicking this icon. (But it
will soon be retired!)
</span>
}
side="bottom"
>
<button
type="button"
onClick={() => void handleSwitchToLegacyEditor()}
className="w-6 h-6 place-self-center text-slate-500 hover:text-slate-400 cursor-pointer"
>
<span className="hero-question-mark-circle"></span>
</button>
</Tooltip>
)}
<ActiveCollaborators className="ml-2" />
<div className="grow ml-2"></div>

Expand Down
2 changes: 1 addition & 1 deletion assets/js/collaborative-editor/hooks/useWorkflow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ export const useWorkflowActions = () => {
const searchParams = new URLSearchParams(url.search);
searchParams.delete('method'); // Close left panel
const queryString = searchParams.toString();
const newUrl = `/projects/${projectId}/w/${workflowId}/legacy${queryString ? `?${queryString}` : ''}`;
const newUrl = `/projects/${projectId}/w/${workflowId}${queryString ? `?${queryString}` : ''}`;
window.history.pushState({}, '', newUrl);
// Mark workflow as no longer new after first save
sessionContextStore.clearIsNewWorkflow();
Expand Down
60 changes: 0 additions & 60 deletions assets/js/job-editor/JobEditor.tsx

This file was deleted.

157 changes: 0 additions & 157 deletions assets/js/job-editor/JobEditorComponent.tsx

This file was deleted.

Loading