Commit graph

240 commits

Author SHA1 Message Date
f4efd47ae9 Fix: Remove non-ASCII characters from YAML (v12-clean)
Some checks failed
BotServer CI/CD / build (push) Failing after 0s
Changes:
- Removed all accented characters and special UTF-8
- Comments in English only
- Clean ASCII-only YAML
- Should parse correctly now
2026-04-18 17:55:18 -03:00
4b8e19d9e9 Pull-Only: Assume Rust/Node/Python já instalados (v12)
Mudanças:
- Remove setup do Rust (assume já instalado no runner)
- Remove instalação de sccache (opcional)
- Verifica dependências no início do build
- Foco: apenas clone + build + deploy
- Mais rápido (~3-4 min total)

Pré-requisitos no runner:
- Rust (cargo, rustc) já instalado
- Git já configurado
- SSH keys já configuradas
- Acesso ao repositório ALM

Fluxo:
1. Clone limpo do repositório gb
2. Inicializa submodules botserver + botlib
3. cargo build -p botserver
4. Deploy automático
5. Cleanup

Tempo estimado: ~3-4 minutos
2026-04-18 17:45:41 -03:00
7115cb3e19 Completo: Rust setup + Clone + Build + Deploy (v11)
Some checks failed
BotServer CI/CD / build (push) Has been cancelled
Mudanças:
- Adiciona setup completo do Rust (rustup, cargo, rustc)
- Instala sccache para cache de build
- Configura PATH e variáveis de ambiente
- Clone limpo do workspace
- Inicializa submodules botserver e botlib
- Build com sccache
- Deploy automático no system container
- Cleanup após build

Fluxo completo:
1. Setup Rust (instala se necessário)
2. Clone limpo do repositório gb
3. Inicializa submodules
4. cargo build -p botserver
5. Deploy via SSH
6. Cleanup

Tempo estimado: ~4-5 minutos
- Setup Rust: ~30s (se instalar)
- Clone: ~30s
- Submodules: ~15s
- Build: ~2-3min (com cache)
- Deploy: ~30s
2026-04-18 17:41:53 -03:00
7f4774a88a Simplificação total: Clone limpo sempre (v10)
Some checks failed
BotServer CI/CD / build (push) Failing after 3s
Mudanças principais:
- Remove dependência de estado anterior (/opt/gbo/work/botserver)
- Sempre clona repositório gb do zero em /opt/gbo/work/build/workspace
- Inicializa apenas botserver e botlib submodules
- Prepara Cargo.toml removendo members desnecessários
- Adiciona step de deploy automático
- Cleanup após build (sucesso ou falha)
- Hash buster v10 para reavaliação completa
- Caminho simplificado e à prova de falhas

Fluxo:
1. rm -rf /opt/gbo/work/build (limpeza)
2. git clone --depth 1 gb.git workspace
3. git submodule update --init botserver botlib
4. cargo build -p botserver
5. Deploy no system container
6. Cleanup
2026-04-18 17:27:23 -03:00
020af83308 Fix: Refaz clone completo se estrutura inválida (v9)
Some checks failed
BotServer CI/CD v2 / build (push) Failing after 3s
- Se botserver/Cargo.toml não existir, refaz clone do gb
- Usa git reset --hard após pull para garantir sincronização
- Clona botserver e botlib diretamente se submodule falhar
- Remove Cargo.toml.bak do logging para simplificar
- Hash buster v9 força reavaliação completa
- Foco: garantir que Cargo.toml do workspace exista
2026-04-18 17:22:44 -03:00
f47f9ade82 Fix: Adiciona fallback para clone direto (v8)
Some checks failed
BotServer CI/CD v2 / build (push) Failing after 1s
- Se git submodule falhar, faz clone direto do repositório
- Verifica se botserver/Cargo.toml existe após tentativa de init
- Fallback: git clone --depth 1 se submodule falhar
- Prepara Cargo.toml do workspace removendo members desnecessários
- Adiciona logging extensivo para debug
- Hash buster v8 força reavaliação completa
2026-04-18 17:19:45 -03:00
c3545055e5 Fix: Otimiza clone de submodules (v7)
Some checks failed
BotServer CI/CD v2 / build (push) Failing after 3s
- Clone APENAS botserver e botlib (não todos os submodules)
- Remove --recursive para evitar clone desnecessário
- Inicializa submodules individualmente com --depth 1
- Adiciona logging para verificar estrutura após clone
- Reduz tempo de CI de ~5min para ~1min
- Hash buster v7 força reavaliação
2026-04-18 17:13:32 -03:00
741ce488f8 Fix: Usa git workspace com submodules (v6)
Some checks failed
BotServer CI/CD v2 / build (push) Has been cancelled
- Repositório raiz é 'gb' (não 'botserver')
- Usa 'git submodule update --init' para sincronizar submodules
- Build usa 'cargo build -p botserver' (workspace mode)
- Cargo.toml do workspace fica em /opt/gbo/work/botserver/
- Código do botserver fica em /opt/gbo/work/botserver/botserver/
- Adiciona logging para debug do Cargo.toml
- Hash buster v6 força reavaliação completa
2026-04-18 17:09:03 -03:00
fa40b28824 Fix: Corrige lógica de setup do repositório (v5)
Some checks failed
BotServer CI/CD v2 / build (push) Failing after 1s
- Adiciona verificação se repositório existe antes de pull
- Se não existir, inicializa com git init + fetch (clone alternativo)
- Adiciona verificação de Cargo.toml antes do build
- Mantém compatibilidade com estrutura existente no runner
- Hash buster para v5 força reavaliação do workflow
2026-04-18 16:48:24 -03:00
eb1240368e Fix: Corrige caminho do build (remove /src incorreto)
Some checks failed
BotServer CI/CD v2 / build (push) Failing after 1s
- Remove referência para /opt/gbo/work/botserver/src (não existe)
- Usa /opt/gbo/work/botserver como caminho base (onde está Cargo.toml)
- Remove dependência do botlib (não necessário para build)
- Incrementa hash-buster para v4 para forçar refresh do cache no CI
2026-04-18 16:33:51 -03:00
097dc2dbc9 ci: Adicionar hash-buster para forçar novo workflow
Some checks failed
BotServer CI/CD v2 / build (push) Failing after 1s
2026-04-18 16:25:23 -03:00
dac663dad8 ci: Renomear workflow para botserver-v2.yaml para forçar novo registro
Some checks failed
BotServer CI/CD v2 / build (push) Failing after 1s
2026-04-18 16:21:47 -03:00
f388e5b380 ci: Forçar refresh do workflow (v2) e remover erros de sintaxe
Some checks failed
BotServer CI/CD v2 / build (push) Failing after 1s
- Renomeado para 'BotServer CI/CD v2'
- Estrutura totalmente reescrita
- Removido blocos if/else quebrados
- Adicionado variáveis de ambiente para cache isolado
2026-04-18 16:20:38 -03:00
005de5bba7 fix: Build debug (rápido) e remoção total de clones
Some checks are pending
BotServer CI/CD / build (push) Waiting to run
- Alterado para cargo build (debug) para compilação mais rápida
- Removido lógica de if/else quebrada
- Caminho fixo: /opt/gbo/work/botserver/src
- Apenas git pull + build
2026-04-18 16:11:27 -03:00
b39dc3e268 fix: Remover git clone e usar path /opt/gbo/work/botserver/src
Some checks failed
BotServer CI/CD / build (push) Failing after 0s
2026-04-18 16:07:29 -03:00
fed92acaab Fix git clone handling for existing directories
All checks were successful
BotServer CI/CD / build (push) Successful in 27m5s
2026-04-17 21:02:26 -03:00
c697b97943 Fix Cargo.toml filtering to preserve botserver member
Some checks failed
BotServer CI/CD / build (push) Failing after 1s
2026-04-17 20:58:27 -03:00
41b502ef9a Fix workspace directory structure
Some checks failed
BotServer CI/CD / build (push) Failing after 2s
2026-04-17 20:52:44 -03:00
29a87e3694 Fix PATH environment for cargo command
Some checks failed
BotServer CI/CD / build (push) Failing after 2s
2026-04-17 20:46:59 -03:00
5272b308f7 Update CI: use sccache, separate target dir per project, shared cargo cache
Some checks failed
BotServer CI/CD / build (push) Failing after 3s
2026-04-17 19:53:47 -03:00
3a027e6619 Fix CI workflow to cache dependencies and preserve workspace between runs
Some checks failed
BotServer CI/CD / build (push) Has been cancelled
2026-04-17 19:45:18 -03:00
867ba98585 Fix CI: Combine all steps into single atomic run block
Some checks failed
BotServer CI/CD / build (push) Failing after 10s
2026-04-17 18:47:01 -03:00
98dde8cba2 Fix CI: Separate step for Cargo.toml setup
Some checks failed
BotServer CI/CD / build (push) Failing after 16s
2026-04-17 18:45:15 -03:00
059a7c6584 Fix CI: Use gbuser home directory, fresh sources + cached target
Some checks failed
BotServer CI/CD / build (push) Failing after 1s
2026-04-17 18:37:22 -03:00
be410f4faa Fix CI: Remove sudo from Install deps (packages already installed)
Some checks failed
BotServer CI/CD / build (push) Failing after 2s
2026-04-17 18:33:05 -03:00
1782fd95ec Restore working CI with persistent directories
Some checks failed
BotServer CI/CD / build (push) Failing after 4s
2026-04-17 18:24:55 -03:00
e3ca478461 Rewrite CI: Clean clone every time, no caching issues
Some checks failed
BotServer CI/CD / build (push) Failing after 1s
2026-04-17 18:15:40 -03:00
0e8e416284 Simplify CI - remove sccache and simplify build step
Some checks failed
BotServer CI/CD / build (push) Failing after 1s
2026-04-17 18:11:15 -03:00
5783d2e784 Fix CI: Remove chown causing permission errors
Some checks failed
BotServer CI/CD / build (push) Failing after 1s
2026-04-17 18:05:30 -03:00
3f11122eb7 Fix CI: Remove tee that causes permission error
Some checks failed
BotServer CI/CD / build (push) Failing after 1s
2026-04-17 17:55:44 -03:00
ceac526bc5 Fix CI: Use git reset to preserve timestamps for incremental builds
Some checks failed
BotServer CI/CD / build (push) Failing after 10m1s
2026-04-17 17:43:04 -03:00
3cc6521146 Fix CI: Fresh clone source, keep cached target for fast builds
Some checks failed
BotServer CI/CD / build (push) Failing after 1s
2026-04-17 17:17:26 -03:00
4785f8b1d7 Fix CI workflow - add git config for botserver update
Some checks failed
BotServer CI/CD / build (push) Failing after 1s
2026-04-17 17:13:48 -03:00
c6d2f19458 Fix git config in CI workflow 2026-04-17 17:04:52 -03:00
e8e1b7d65b ci: Move workspace to /tmp to avoid permission issues
All checks were successful
BotServer CI/CD / build (push) Successful in 1m37s
- Use /tmp/persistent-botserver instead of /opt/gbo/data
- Use /tmp/sccache and /tmp/cargo for caches
- Runner has full permissions on /tmp
- Fixes 'Operation not permitted' on chown
2026-04-17 12:53:30 -03:00
2b432c763c ci: Use HOME/USER env vars instead of su/sudo
Some checks failed
BotServer CI/CD / build (push) Failing after 0s
- Remove su - and sudo -u which require passwords
- Set HOME=/home/gbuser and USER=gbuser as env vars
- Run git/cargo with proper HOME prefix
- Fix runner hanging on authentication
2026-04-17 12:49:13 -03:00
f67de0e85c ci: Use /home/gbuser instead of /opt/gbo/data to avoid permission issues
Some checks failed
BotServer CI/CD / build (push) Failing after 3s
- Move CI workspace to /home/gbuser/persistent-botserver
- Cache now in /home/gbuser/.cache and /home/gbuser/.cargo
- No more permission conflicts with /opt/gbo/data
2026-04-17 12:39:57 -03:00
e59892f9b4 ci: Use su - instead of sudo -u for runner compatibility
Some checks failed
BotServer CI/CD / build (push) Failing after 6s
- Replace sudo with su - gbuser -c for proper user switching
- Simplify permission handling with chown/chmod as root
- Use su - for all gbuser operations
2026-04-17 12:03:47 -03:00
7673eccc59 ci: Fix workflow to run as gbuser with proper permissions
Some checks failed
BotServer CI/CD / build (push) Has been cancelled
- Use sudo -u gbuser for all git operations
- Add chown/chmod for cache directories
- Use git pull instead of fetch/reset for cleaner updates
- Ensure consistent gbuser ownership
2026-04-17 11:57:22 -03:00
a826be35f7 ci: Update workflow permissions handling
Some checks failed
BotServer CI/CD / build (push) Failing after 1s
2026-04-17 11:40:45 -03:00
9be8e6d788 ci: Use persistent directories for incremental builds
All checks were successful
BotServer CI/CD / build (push) Successful in 28m1s
2026-04-16 10:06:35 -03:00
823a4fbddf fix(ci): Fix YAML syntax errors
Some checks failed
BotServer CI/CD / build (push) Has been cancelled
2026-04-16 09:58:38 -03:00
a46bee361b fix(ci): Remove log redirection, output directly to console 2026-04-16 09:55:01 -03:00
04bfd668a4 Fix: simple redirect to /tmp/build.log
All checks were successful
BotServer CI/CD / build (push) Successful in 1m10s
2026-04-16 08:49:50 -03:00
5960126d6a Fix: use script to redirect build output to /tmp/build.log 2026-04-16 08:47:52 -03:00
de14de0a73 Fix: create build.log with proper permissions before build
Some checks failed
BotServer CI/CD / build (push) Failing after 6s
2026-04-16 08:46:11 -03:00
a884c650a3 fix: CI deploy reliability — stop before transfer, enable after, health endpoint fix
All checks were successful
BotServer CI/CD / build (push) Successful in 1m3s
2026-04-14 10:37:23 -03:00
03f060680e fix: CI git path for BOTSERVER_COMMIT + deploy health check wait
All checks were successful
BotServer CI/CD / build (push) Successful in 4m16s
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 10:01:41 -03:00
d20ecdb89c fix: enterprise-grade reliability — three changes
Some checks failed
BotServer CI/CD / build (push) Failing after 6s
1. CI: restart system container instead of just systemctl restart botserver
   — ensures full env reload, Vault re-auth, DriveMonitor fresh state

2. Health endpoint: add 'commit' field with short git SHA
   — build.rs passes BOTSERVER_COMMIT from CI via rustc-env
   - Both /health and /api/health now report the running commit

3. WebSocket recv_task: spawn stream_response in separate tokio task
   - prevents one hung LLM from freezing all message processing
   - each WebSocket connection can now handle multiple messages
     concurrently regardless of LLM latency

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 09:51:54 -03:00
d1652fc413 feat: add build_date to health endpoint for CI deploy verification
All checks were successful
BotServer CI/CD / build (push) Successful in 4m21s
- Add BOTSERVER_BUILD_DATE env var to /api/health response
- Set build date during CI compilation via environment variable
- Enables checking deployed binary age without SSH access

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-13 11:49:10 -03:00