Skip to content

Restructure project: unify backend and frontend into single repo - #106

Open
arthur-flam wants to merge 4486 commits into
Samsung:masterfrom
arthur-flam:claude/fix-integrations-links-Pc6P5
Open

Restructure project: unify backend and frontend into single repo#106
arthur-flam wants to merge 4486 commits into
Samsung:masterfrom
arthur-flam:claude/fix-integrations-links-Pc6P5

Conversation

@arthur-flam

Copy link
Copy Markdown
Member

Summary

This PR restructures the QA-Board project by consolidating the previously separate qaboard-backend and qaboard-webapp directories into a unified monorepo structure with backend/, qaboard/, and services/ directories at the root level.

Key Changes

Directory Reorganization

  • Backend migration: Moved qaboard-backend/slamvizapp/backend/backend/

    • API modules: auth.py, integrations.py, export_to_folder.py, tuning.py, image.py, image_diff.py, outputs.py, batch.py, commit.py, webhooks.py, api.py, tasks.py, milestones.py
    • Models: CiCommit.py, Output.py, Project.py, Batch.py, User.py, TestInput.py
    • Database and utilities: database.py, config.py, utils.py, fs_utils.py, git_utils.py, hybrid_cache.py, clean_big_files.py
    • Migration scripts and database management tools
  • Frontend removal: Deleted qaboard-webapp/ directory entirely (React/Redux components, package.json, npm-shrinkwrap.json)

  • CLI tool migration: Moved qatools/qaboard/ with restructured runners and utilities

  • Services consolidation: Reorganized deployment files under services/ and deployments/ directories

Configuration & Deployment

  • Added docker-compose.yml, development.yml, production.yml at root
  • Added deployment overlays: deployments/sirc/, deployments/dsk/, deployments/example.yml
  • New backend-specific files: backend/Dockerfile, backend/uwsgi.ini, backend/pyproject.toml
  • Updated .gitlab-ci.yml with new CI/CD structure
  • Added GitHub Actions workflows: .github/workflows/ci.yaml, .github/workflows/website.yml, .github/workflows/pypy.yml

Documentation & Metadata

  • Added CLAUDE.md, CONTRIBUTING.md, MIGRATION.md, SIDEBAR.md
  • Updated README.md with new project structure
  • Added .gitmodules for submodule management
  • Updated .gitignore and .dockerignore

Database & Alembic

  • Reorganized alembic migrations under backend/backend/alembic/
  • Added new migration files for schema updates (JSONB conversion, token table, SSO fields, etc.)

Notable Implementation Details

  • Backend now uses Flask with SQLAlchemy ORM
  • Authentication system supports LOCAL, LDAP, and SAML
  • Database migrations managed through Alembic
  • Docker-based deployment with compose overlays for different sites (SIRC, DSK)
  • Unified Python package structure with pyproject.toml for dependency management
  • Removed npm/Node.js frontend build from main repo (likely moved to separate frontend repository)

https://claude.ai/code/session_01FaCabY2EDzyBb9LeXLoY6K

arthur-flam and others added 30 commits March 1, 2026 21:07
The cde package requires access to SIRC's internal GitLab.
Open-source users should not need it.
YAML interprets unquoted braces as mappings. Quote
QABOARD_IMAGE_SERVERS values to preserve JSON strings.
Show pip install qaboard[sirc] and qaboard[dsk] site extras.
Document compose overlay deployment pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
LDAP config (host, base DN, bind DN, password), Sentry DSN/auth token,
and PostHog token are now read from environment variables (via .env file)
instead of being hardcoded in deployments/sirc.yml.

Added .env.sirc.example template.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
actions/cache v2 (used internally by setup-node v2) is being shut down.
Update checkout, setup-python, and setup-node to v4. Also bump Node
from 14 to 18 and Python from 3.7 to 3.11.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update all workflows to use current action versions (checkout@v4,
setup-python@v5, setup-node@v4, cache@v4, gh-pages@v4), bump Python
from 3.7 to 3.11 and Node from 16.x to 18.x, and replace removed
docker-compose command with docker compose v2.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace hardcoded SIRC proxy/cert/SSH config in all Dockerfiles with
conditional ARG defaults. When args are empty (open-source), all
proxy/cert blocks are no-ops. SIRC/DSK pass values via compose overlay
build args.

Changes per Dockerfile:
- backend: conditional proxy/cert/git-proxy/sslVerify, restore
  --mount=type=ssh, add QABOARD_EXTRA arg for site extras, clear
  proxy env at end of build
- webapp: both stages parameterized, sentry-cli guarded behind
  SENTRY_AUTH_TOKEN check
- website: conditional apk http repos and yarn strict-ssl
- nginx: straightforward proxy parameterization
- cantaloupe: fix $$ typo to &&, guard cert COPY, add .gitkeep +
  .gitignore for cert dir
- flower: conditional pip.conf trusted-host
- metabase: stripped to minimal conditional proxy/cert
- fluentd: conditional proxy/cert

Compose overlays:
- sirc.yml: YAML anchor x-sirc-build-args with all proxy/cert values,
  build args added to backend/frontend/website/proxy/flower
- dsk.yml: YAML anchor x-dsk-build-args pulling from .env vars

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Docker Builds sections for SIRC and DSK users explaining that
proxy/cert is now passed via build args from compose overlays.
Note cantaloupe cert gitignore change and open-source clean build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move hardcoded SIRC path mappings out of compat.py into
site_config (env var / site package). Replace fix_linux_permissions
with entry point hook dispatch. Serve path_mappings from
/api/v1/config and consume them in the frontend instead of
hardcoded JS replacements.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
uv fails to parse wheel metadata containing relative file: URLs
(e.g. "qaboard-site-dsk @ file:deployments/cli/dsk") because
relative paths have no working directory context in built wheels.

Move local path references to [tool.uv.sources] sections in both
root and backend pyproject.toml files, which is the uv-native way
to declare local path dependencies. Also fixes the inverted paths
(deployments/cli/dsk -> deployments/dsk/cli).

Additionally updates the backend Dockerfile to Python 3.14 and
uv 0.10.6.

https://claude.ai/code/session_01KpAG6ii5U2LrzhAd3MMbQ7
…ser prefs

- Reset registration state when commit/batch changes to prevent stale data
- Reset visualizations_with_files on filter change so panel reflects filtered outputs
- Show visualization section immediately instead of waiting for manifest loads
- Preserve user's show/hide preferences when config changes
- Remove 1000-path truncation limit in calculateOptionValues
- Remove stray console.log in OutputCard

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add /webhook/github endpoint that normalizes GitHub push payloads
- Support GitHub clone auth (x-access-token) alongside GitLab (oauth2)
- Add GitHub avatar resolution via API with Redis caching
- Proxy all avatar URLs unconditionally (fixes mixed-content for any host)
- Auto-detect GitHub Enterprise API base from repository URL
- Document deferred items (CLI integration, Actions, webhook signing)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The integration menu had several bugs. The most visible one: artifact
download links were 404ing because `recursively_apply` in utils.js
mutated the integration config in-place. Integration configs come from
qatools_config state and are reused across renders, so templates like
`${commit.repo_artifacts_url}/...` were replaced with a concrete URL on
the first render. When the user then switched commits, no template
remained to re-evaluate, so clicks went to the *previous* commit's URL
(404 or, worse, wrong artifact).

Fixes:
- utils.js: make recursively_apply return a new object/array instead of
  mutating its input, so templates are re-evaluated on every render with
  fresh commit/branch/batch context.
- integrations.js: stop spreading yaml-only fields (`sub`, `webhook`,
  `src`, `alt`, `only`, `in_menu`, `allow_failed`, etc.) onto <MenuItem>,
  which produced React warnings and unknown DOM attrs on the <a>.
- integrations.js: only attach an onClick when the item actually has a
  trigger (webhook); gitlabCI/jenkins items already go through their own
  render branch. Parent items that only carry a `sub` no longer get a
  no-op onClick on every render.
- integrations.js: drop a leftover `console.log(status)` in StatusTag.
- integrations.js: replace `!!!integration.href` with `!integration.href`.
updateIntegrationStatuses iterated a flat list and never recursed into
`sub:` blocks, so only top-level integrations got a HEAD request via
/api/v1/webhook/proxy/ and the resulting status tag. Nested links
rendered as clickable but silently, with no broken-link indicator.

Flatten the integration tree before filtering so sub-menu entries get
the same status probe as top-level ones.
The status-map key was `integration.id || .text || .name || .alt`, so
two sub-menu items that happened to share a text/name with a sibling
elsewhere in the tree (e.g. two "Executable" entries under different
parents) ended up sharing a single entry in integrationStatuses -
their status tags and loading state were tied together.

Carry the parent path as a prefix so keys are unique across the tree:
- key(integration, prefix) and this.key(integration, prefix) accept a
  parent-path prefix.
- IntegrationsMenus takes a `key_prefix` prop, passes
  `${integration_key}/` down to nested IntegrationsMenus, and threads
  the full path-aware key through triggerIntegration.
- updateIntegrationStatuses' flatten now yields
  {integration, integration_key} tuples with path-aware keys, used
  everywhere instead of recomputing key(integration).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants