Files
hatchet/hack/sync-quickstart.sh
Gabe Ruttner 09f8bd6118 feat--frontend-overhaul (#1537)
* reintegration

* fix: relative routes

* dynamic routes

* up/downgrade ui

* memoize

* fix breadcrumbs

* cleanup

* titles

* title format

* additional meta

* cli upgrade

* button

* lint

* Update frontend/app/src/next/components/runs/run-id.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* build errors

* unbind on return

* lint

* Fe overhaul  run form (#1547)

* simple trigger

* populated

* feat:trigger modal

* clear

* Update frontend/app/src/next/hooks/use-runs.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fe overhaul  details (#1552)

* simple trigger

* populated

* feat:trigger modal

* clear

* Update frontend/app/src/next/hooks/use-runs.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* wip activity log

* merged logs

* wip

* wip

* search box

* fudge sort

* wip improved worker sheet

* wip

* chore: improve error on dispatcher (#1538)

* fix: empty billing context (#1553)

* fix: empty

* precommit

* hotfix: priority nil pointer (#1555)

* hotfix: priority on schedule workflow (#1556)

* hotfix: priority on schedule workflow

* fix: build

* build

* lint

* build

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: abelanger5 <belanger@sas.upenn.edu>

* Fe  overhaul  burndown 1 (#1563)

* chore: improve error on dispatcher (#1538)

* fix: empty billing context (#1553)

* fix: empty

* precommit

* hotfix: priority nil pointer (#1555)

* hotfix: priority on schedule workflow (#1556)

* hotfix: priority on schedule workflow

* fix: build

* Hotfix: Handle EOF Properly (#1557)

* fix: handle EOF properly

* chore: version

* fix: debug logs

* fix: rm eof type

* hotfix: priority on cron workflow for v0 (#1558)

* fix: one more possible null deref (#1560)

* Hatchet Python Blog Post (#1526)

* feat: initial pass at first parts of blog post

* feat: initial mkdocs setup

* feat: first pass at embedding mkdocs

* fix: config

* debug: paths

* fix: unwind docs hack

* feat: start working on mkdocs theme

* fix: paths

* feat: wrap up post

* fix: proof

* fix: doc links

* fix: rm docs

* fix: lint

* fix: lint

* fix: typos + tweak

* fix: tweaks

* fix: typo

* fix: cleanup

* fix: go signature and docs (#1561)

* fix: go signature and docs

* Update examples/v1/workflows/concurrency-rr.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* feat: toggle doc sheet

* docs: concurrency cleanup (#1562)

* feat: storage adapter

* docs--worker-config-options (#1535)

* docs--worker-config-options

* Update frontend/docs/pages/home/workers.mdx

Co-authored-by: abelanger5 <belanger@sas.upenn.edu>

* Update worker-configuration-options.mdx

* lint

---------

Co-authored-by: abelanger5 <belanger@sas.upenn.edu>

---------

Co-authored-by: abelanger5 <belanger@sas.upenn.edu>
Co-authored-by: Matt Kaye <mrkaye97@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: bit of spacing

* single generated api

* feat: initial styling pass on runs views (#1586)

* Feat: Workflows pages (#1577)

* feat: simple workflows list page

* feat: refactor + add route for individual workflow

* feat: start wiring up workflow detail page

---------

Co-authored-by: Gabe Ruttner <gabriel.ruttner@gmail.com>

* fix: tsc

* fix: compiler

* fe  overhaul runs bash (#1599)

* wip sidebar

* wip: navigation

* fix nits

* tweaks

* clear filter button

* filter on click

* always scroll y

* wip time filters

* state changes

* wip

* wip

* functional, no style

* fix default

* wip

* queue metrics

* multi-select

* padding

* counts

* fix always num

* actions

* fix maxheight

* wip

* spacing

* fix: tenant state

* fix: tenant

* lint

* github page

* tenant alerting

* ingestors

* fix: tenant state

* build errrors

* empty state alerter

* dropdown only on mobile

* billing and limits

* fix form

* fix form

* wip

* wip

* env vars

* wip

* what a component

* wip

* fix inf render

* cleanup

* persistent tabs

* wip

* common actions

* deploy modal

* update

* delete

* you're a wizard harry

* Feat: Subrows in Runs View (#1595)

* fix: type

* feat: start wiring up subrows

* fix: tsc

* fix: hook order

* fix: hack for tsc

* fix: add some margin

* fix: empty state

* fix: empty state centering

* fix: task detail links

* fix: handle error, tweak child run styling

* fix: lint

* fix: edge case

* all mw config

* wip

* fix breadcrumb hook

* fixes

* upgrade surfaces

---------

Co-authored-by: Matt Kaye <mrkaye97@gmail.com>

* bring back error toast

* toast improvements

* lint

* fix: cloud only surface

* cloud surface

* fix breadcrumbs

* feat: config view on workflow run page (#1607)

* feat: config

* fix: rm schedule timeout

* Feat: Rework runs sidebar (#1612)

* feat: rq devtools

* fix: badge hover

* feat: improve sidebar

* refactor: hook

* fix: input undefined

* feat: waterfall diagram and cleanup runs view (#1606)

* merge

* merge

* fix merge issue

* rm debug lines

* case on count

* fix: display names

* colors and handle on click

---------

Co-authored-by: mrkaye97 <mrkaye97@gmail.com>

* fix: remove a ton of dead code (#1618)

* fix: remove n+1 query (#1619)

* Fe  overhaul managed compute and onboarding (#1614)

* fix tab state on state changes

* fix collapsed children

* setup

* layout

* layout

* move feature

* wip

* chore(deps): bump k8s.io/client-go from 0.32.3 to 0.33.0 (#1608)

Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go) from 0.32.3 to 0.33.0.
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.32.3...v0.33.0)

---
updated-dependencies:
- dependency-name: k8s.io/client-go
  dependency-version: 0.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* wip

* universal install

* initial migration guide

* fakefake tokens

* fake secret

* fixes

* lint

* lint

* lint

* tidy

* chore: expose clean docs on top level

* drop reo

* wip

* static

* functional

* bump go 1.23 -> 1.24

* fix: whitespace lint

* bump golangci-lint version

* wip

* try to set up go before pre commit runs

* lint

* names

* lint

* fix: session store

* wip

* normalized snips

* fix links

* blog: mergent migration (#1611)

* universal install

* initial migration guide

* fakefake tokens

* fake secret

* fixes

* lint

* lint

* lint

* tidy

* bump go 1.23 -> 1.24

* fix: whitespace lint

* bump golangci-lint version

* try to set up go before pre commit runs

* lint

* names

* lint

* fix: session store

* fix links

---------

Co-authored-by: Alexander Belanger <alexander@hatchet.run>

* reusable state

* fix: rm unimplemented pages for now (#1615)

* feature dir

* fixes (#1616)

* with public auth

* completed typescript flow

* go blocks

* wip

* layout

* wip

* feat: read replica support and docs (#1617)

* feat: read replica support and docs

* fix: load logic

* wip

* wip

* remove provider

* migrate to static

* fix block

* lint

* fix: loadtest

* add task for linting

* cleanup

* fix meta sync

* clean examples with highlights

* get snips into app

* sync

* remove fake highlights

* always gen before build

* ignore generated

* ignore

* ignore generated

* cleanup

* always start the dev server

* examples dependabot

* app examples built off sdk examples

* auto sync on main changes

* sync the quickstarts with updating dependencies

* examples and quickstart dependabots

* only examples

* functional onboarding

* fix worker detail page

* fix detail page

* lint

* init

* tested structure copy

* prepend

* to >, ‼️ to !!

* normalize

* separate example source

* multi source

* with index

* wip

* clean generation

* migrated

* cleanup

* should build

* sync before build

* fix steps

* inline

* mkdirs

* revert build

* gen docs

* static

* rm

* update examples

* lint

* fix: ts

* fix remove lines on match

* fix: client

* add snips

* dont lint examples

* fix source

* dont test examples

* exclude quickstart

* lint

* dont break examples

* cleanup

* cleanup

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexander Belanger <alexander@hatchet.run>
Co-authored-by: Matt Kaye <mrkaye97@gmail.com>
Co-authored-by: abelanger5 <belanger@sas.upenn.edu>

* Merge main

* lint

* fix

* Update api-server-setup.mdx

* cleanup

* github state

* review and build

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: abelanger5 <belanger@sas.upenn.edu>
Co-authored-by: Matt Kaye <mrkaye97@gmail.com>
Co-authored-by: Alexander Belanger <alexander@hatchet.run>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-05 08:17:29 -07:00

119 lines
2.6 KiB
Bash
Executable File

#!/bin/bash
set -e
# Required parameters (no defaults)
SOURCE_DIR=""
TARGET_REPO=""
GIT_USERNAME="Hatchet Actions Bot"
GIT_EMAIL="dev@hatchet.run"
TEMP_DIR=$(mktemp -d)
GITHUB_SHA=$(git rev-parse HEAD)
# Parse command line arguments
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
--source-dir)
SOURCE_DIR="$2"
shift
shift
;;
--target-repo)
TARGET_REPO="$2"
shift
shift
;;
--token)
GITHUB_TOKEN="$2"
shift
shift
;;
--git-username)
GIT_USERNAME="$2"
shift
shift
;;
--git-email)
GIT_EMAIL="$2"
shift
shift
;;
*)
shift
;;
esac
done
# Validate required input
if [ -z "$SOURCE_DIR" ]; then
echo "Error: Source directory (--source-dir) is required"
exit 1
fi
if [ -z "$TARGET_REPO" ]; then
echo "Error: Target repository (--target-repo) is required"
exit 1
fi
if [ ! -d "$SOURCE_DIR" ]; then
echo "Error: Source directory '$SOURCE_DIR' does not exist"
exit 1
fi
# Check if running in GitHub Actions
if [ -z "$GITHUB_TOKEN" ] && [ -n "$GITHUB_ACTIONS" ]; then
if [ -n "$SYNC_TOKEN" ]; then
GITHUB_TOKEN="$SYNC_TOKEN"
else
echo "Error: No GitHub token provided. Please set GITHUB_TOKEN or SYNC_TOKEN environment variable."
exit 1
fi
fi
# Set the repository URL with token if available
if [ -n "$GITHUB_TOKEN" ]; then
REPO_URL="https://${GITHUB_TOKEN}@github.com/${TARGET_REPO}.git"
else
REPO_URL="https://github.com/${TARGET_REPO}.git"
echo "Warning: No GitHub token provided. Using public URL. Push may fail if repository is private."
fi
echo "Syncing files from $SOURCE_DIR to $TARGET_REPO..."
# Clone the target repository
echo "Cloning target repository..."
git clone "$REPO_URL" "$TEMP_DIR/target"
# Remove all files from target except .git and .github
echo "Removing existing files from target..."
find "$TEMP_DIR/target" -mindepth 1 -maxdepth 1 ! -name '.git' ! -name '.github' -exec rm -rf {} +
# Copy all files from source directory to target
echo "Copying files from source to target..."
cp -r "$SOURCE_DIR"/* "$TEMP_DIR/target/"
# Set git config
cd "$TEMP_DIR/target"
git config user.name "$GIT_USERNAME"
git config user.email "$GIT_EMAIL"
# Add all changes (including removed files)
git add -A
# Check if there are changes to commit
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to commit"
exit 0
fi
# Commit and push changes
echo "Committing and pushing changes..."
git commit -m "Sync with main repo: ${GITHUB_SHA}"
git push
echo "Sync completed successfully!"
# Clean up
cd - > /dev/null
rm -rf "$TEMP_DIR"