summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.coderabbit.yaml29
-rw-r--r--.github/PULL_REQUEST_TEMPLATE.md35
l---------.github/copilot-instructions.md1
-rw-r--r--.github/mergify.yml22
-rw-r--r--.github/workflows/cla-check.yml18
-rw-r--r--.github/workflows/codeql.yml2
-rw-r--r--.github/workflows/pr-mirror-repo-sync.yml30
-rw-r--r--.github/workflows/trigger-rebuild-repo-package.yml34
-rw-r--r--AGENTS.md41
-rw-r--r--Jenkinsfile23
-rw-r--r--debian/changelog15
-rw-r--r--requirements.txt42
12 files changed, 247 insertions, 45 deletions
diff --git a/.coderabbit.yaml b/.coderabbit.yaml
new file mode 100644
index 0000000..87e27c3
--- /dev/null
+++ b/.coderabbit.yaml
@@ -0,0 +1,29 @@
+# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
+#
+# Per-repo CodeRabbit override for vyos/vyos-http-api-tools.
+#
+# Most behavior is inherited from the org-level central baseline at
+# https://github.com/vyos/coderabbit/blob/production/.coderabbit.yaml
+# (loaded automatically because the central repo is named `coderabbit`
+# under the same GitHub org as this repo).
+#
+# When this repo has a VyOS-Networks mirror, this file is propagated by
+# the gen-1 mirror pipeline. CodeRabbit's Atlassian/Jira OAuth grant is
+# attached to the VyOS-Networks org only (one GitHub-org → Jira-tenant
+# link per install), so `usage: auto` self-disables on the public source
+# and activates on the private mirror — one file, both orgs.
+
+# Opt this repo into the inheritance chain. Without this, the file below
+# would entirely REPLACE the central baseline rather than merge per-field
+# on top of it — inheritance is disabled by default per CodeRabbit's
+# schema (https://docs.coderabbit.ai/configuration/configuration-inheritance).
+inheritance: true
+
+knowledge_base:
+ jira:
+ # `auto` is the cross-org-safe value: enabled on private/internal
+ # mirror repos where Jira OAuth is connected, disabled on the public
+ # source where it is not.
+ usage: auto
+ project_keys:
+ - VD
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 0000000..e686e18
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,35 @@
+<!-- All PR should follow this template to allow a clean and transparent review -->
+<!-- Text placed between these delimiters is considered a comment and is not rendered -->
+
+## Change summary
+<!--- Provide a general summary of your changes in the Title above -->
+
+## Types of changes
+<!---
+What types of changes does your code introduce? Put an 'x' in all the boxes that apply.
+NOTE: Markdown requires no leading or trailing whitespace inside the [ ] for checking
+the box, please use [x]
+-->
+- [ ] Bug fix (non-breaking change which fixes an issue)
+- [ ] New feature (non-breaking change which adds functionality)
+- [ ] Code style update (formatting, renaming)
+- [ ] Refactoring (no functional changes)
+- [ ] Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
+- [ ] Other (please describe):
+
+## Related Task(s)
+<!-- optional: Link to related other tasks on Phabricator. -->
+<!-- * https://vyos.dev/Txxxx -->
+
+## Related PR(s)
+<!-- Link here any PRs in other repositories that are required by this PR -->
+
+## Checklist:
+<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
+<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
+<!--- The entire development process is outlined here: https://docs.vyos.io/en/latest/contributing/development.html -->
+- [ ] I have read the [**CONTRIBUTING**](https://github.com/vyos/vyos-1x/blob/current/CONTRIBUTING.md) document
+- [ ] I have linked this PR to one or more Phabricator Task(s)
+- [ ] My commit headlines contain a valid Task id
+- [ ] My change requires a change to the documentation
+- [ ] I have updated the documentation accordingly
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
new file mode 120000
index 0000000..be77ac8
--- /dev/null
+++ b/.github/copilot-instructions.md
@@ -0,0 +1 @@
+../AGENTS.md \ No newline at end of file
diff --git a/.github/mergify.yml b/.github/mergify.yml
new file mode 100644
index 0000000..adf2280
--- /dev/null
+++ b/.github/mergify.yml
@@ -0,0 +1,22 @@
+# yaml-language-server: $schema=https://docs.mergify.com/configuration/file-format/
+# Mergify configuration for vyos/vyos-http-api-tools.
+#
+# Inherits the central baseline from vyos/mergify:.mergify.yml. The central
+# baseline provides:
+# - `defaults.actions.backport.ignore_conflicts: false`
+# - `pull_request_rules` → label conflicting PRs with `conflicts`;
+# T-ID format checks on PR title and commit messages.
+# - `commands_restrictions` → restrict @Mergifyio slash commands to the
+# org Maintainers team + vyosbot. Resolves correctly on both sides of
+# the cross-org mirror: vyos/mergify uses @vyos/maintainers,
+# VyOS-Networks/mergify uses @VyOS-Networks/maintainers.
+#
+# Replaces the inline T8531 predecessor config. Rollout context:
+# T8782 (Mergify central-config rollout), T8852 (fleet migration to
+# `extends:`). See https://vyos.dev/T8782, https://vyos.dev/T8852,
+# and the Confluence spec at
+# https://vyos.atlassian.net/wiki/spaces/VYOS/pages/849477640.
+
+extends: mergify
+merge_protections_settings:
+ reporting_method: check-runs
diff --git a/.github/workflows/cla-check.yml b/.github/workflows/cla-check.yml
new file mode 100644
index 0000000..625ff78
--- /dev/null
+++ b/.github/workflows/cla-check.yml
@@ -0,0 +1,18 @@
+name: "CLA Check"
+
+permissions:
+ actions: write
+ contents: read
+ pull-requests: write
+ statuses: write
+
+on:
+ pull_request_target:
+ types: [opened, synchronize, closed]
+ issue_comment:
+ types: [created]
+
+jobs:
+ call-cla-assistant:
+ uses: vyos/vyos-cla-signatures/.github/workflows/cla-reusable.yml@current
+ secrets: inherit \ No newline at end of file
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index a2659e1..4020b87 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -38,7 +38,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v6
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
diff --git a/.github/workflows/pr-mirror-repo-sync.yml b/.github/workflows/pr-mirror-repo-sync.yml
new file mode 100644
index 0000000..0f6c449
--- /dev/null
+++ b/.github/workflows/pr-mirror-repo-sync.yml
@@ -0,0 +1,30 @@
+# .github/workflows/pr-mirror-repo-sync.yml
+# DO NOT EDIT — managed by mirror-pipeline rollout.
+# To opt out: set vars.MIRROR_ENABLED=false in this repo's Actions variables.
+name: PR Mirror and Repo Sync
+
+on:
+ pull_request_target:
+ types: [closed]
+ branches: [current]
+ workflow_dispatch:
+ inputs:
+ sync_branch:
+ required: true
+ type: string
+
+permissions:
+ contents: write
+ pull-requests: write
+ issues: write
+
+jobs:
+ call:
+ if: |
+ github.repository_owner == 'vyos'
+ && (github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch')
+ && vars.MIRROR_ENABLED != 'false'
+ uses: vyos/.github/.github/workflows/pr-mirror-repo-sync.yml@current
+ with:
+ sync_branch: ${{ inputs.sync_branch || github.event.pull_request.base.ref }}
+ secrets: inherit
diff --git a/.github/workflows/trigger-rebuild-repo-package.yml b/.github/workflows/trigger-rebuild-repo-package.yml
new file mode 100644
index 0000000..e26669b
--- /dev/null
+++ b/.github/workflows/trigger-rebuild-repo-package.yml
@@ -0,0 +1,34 @@
+name: Trigger to build a deb package from repo
+
+on:
+ pull_request_target:
+ types:
+ - closed
+ branches:
+ - current
+ - circinus
+ - sagitta
+ workflow_dispatch:
+
+jobs:
+ get_repo_name:
+ runs-on: ubuntu-latest
+ outputs:
+ PACKAGE_NAME: ${{ steps.package_name.outputs.PACKAGE_NAME }}
+ steps:
+ - name: Set variables
+ id: package_name
+ run: |
+ echo "PACKAGE_NAME=$(basename ${{ github.repository }})" >> $GITHUB_OUTPUT
+
+ trigger-build:
+ needs: get_repo_name
+ uses: vyos/.github/.github/workflows/trigger-rebuild-repo-package.yml@current
+ with:
+ branch: ${{ github.event.pull_request.base.ref }}
+ package_name: ${{ needs.get_repo_name.outputs.PACKAGE_NAME }}
+ secrets:
+ REMOTE_OWNER: ${{ secrets.REMOTE_OWNER }}
+ REMOTE_REUSE_REPO: ${{ secrets.REMOTE_REUSE_REPO }}
+ GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}
+ PAT: ${{ secrets.PAT }}
diff --git a/AGENTS.md b/AGENTS.md
new file mode 100644
index 0000000..e7bb274
--- /dev/null
+++ b/AGENTS.md
@@ -0,0 +1,41 @@
+# vyos-http-api-tools — AI coding context
+
+## Project purpose
+Debian packaging wrapper that bundles the Python runtime dependencies of the VyOS HTTP API (FastAPI, uvicorn, ariadne, etc.) as a single `.deb` installed on VyOS images. **Contains no application logic** — the actual HTTP API implementation lives in `vyos-1x/src/services/`. Maintained as a separate package so that not-yet-Debian-packaged Python libraries can ship and update independently of VyOS releases.
+
+## Tech stack
+- Python — runtime dependency staging. `setup.py` + `requirements.in`/`requirements.txt`.
+- Debian packaging with `dh-virtualenv` (≥1.0). `debian/control` build-depends: `debhelper (>= 10)`, `python3`, `python3-setuptools`, `dh-virtualenv (>= 1.0)`, `python3-pip`, `python3-venv`.
+- Top-level `vyos-http-api-tools` directory is the install root copied into the venv.
+
+## Build / test / run
+```
+dpkg-buildpackage -uc -us -tc -b
+# Update pinned versions from requirements.in:
+pip-compile requirements.in # writes requirements.txt by default
+```
+No application-level test runner — the package is exercised at runtime by `vyos-1x`'s API services.
+
+## Repository layout
+- `vyos-http-api-tools/` — payload directory copied into the dh-virtualenv venv.
+- `requirements.in` — un-pinned top-level deps.
+- `requirements.txt` — pinned full graph (regenerate via `pip-compile`).
+- `setup.py` — packaging shim.
+- `debian/` — packaging files (`control`, `rules`, etc.).
+- `README.md` — explains the wrapper-only nature and lists upstream packages.
+
+## Cross-repo context
+- The actual HTTP API server code lives in `vyos/vyos-1x` (`python/vyos/`, `src/services/`, supporting Jinja2 templates and op-mode definitions). This repo only stages the runtime libs.
+- Built into ISOs by `vyos/vyos-build`; listed in an internal repository as one of the 14 canonical source repos.
+- Bundled libraries (per `README.md`): FastAPI, uvicorn, ariadne, makefun, sgqlc, pyjwt, python-pam, python-multipart, wsproto.
+
+## Conventions
+- Commit/PR title: `component: T12345: description` (Phorge task ID at https://vyos.dev). Enforced by `check-pr-message.yml` reusable.
+- Workflows: `pr-mirror-repo-sync.yml`, `trigger-rebuild-repo-package.yml`, `codeql.yml`, `cla-check.yml` (all `vyos/.github@current` reusables).
+- Bumping `requirements.in` → regenerate `requirements.txt` via `pip-compile` (`pip-tools`) in the same PR. Pin full graph for reproducible builds.
+
+## Notes for future contributors
+- Do **not** add application logic here. Anything API-related goes in `vyos-1x`.
+- Any new library required by the HTTP API: append to `requirements.in`, regenerate `requirements.txt`, validate that the version installs cleanly inside `dh-virtualenv` (Python 3 + Debian bookworm).
+- After merge, `trigger-rebuild-repo-package.yml` fires REST `workflow_dispatch` into `$REMOTE_OWNER/vyos-build-packages` (REMOTE_OWNER = the private side) to rebuild the `.deb` as `vyosbot`.
+- Watch FastAPI/uvicorn version pins for compat with the VyOS Python release (currently 3.11/3.12 on bookworm).
diff --git a/Jenkinsfile b/Jenkinsfile
deleted file mode 100644
index 21a6829..0000000
--- a/Jenkinsfile
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (C) 2020-2021 VyOS maintainers and contributors
-//
-// This program is free software; you can redistribute it and/or modify
-// in order to easy exprort images built to "external" world
-// it under the terms of the GNU General Public License version 2 or later as
-// published by the Free Software Foundation.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-@NonCPS
-
-// Using a version specifier library, use 'current' branch. The underscore (_)
-// is not a typo! You need this underscore if the line immediately after the
-// @Library annotation is not an import statement!
-@Library('vyos-build@current')_
-
-// Start package build using library function from https://github.com/vyos/vyos-build
-buildPackage(null, null, null, true)
diff --git a/debian/changelog b/debian/changelog
index b2e5186..7b2bcaf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,18 @@
+vyos-http-api-tools (2.5) unstable; urgency=medium
+
+ * Update version of idna to 3.15
+ * Update version of python-multipart to 0.0.27
+ * Update version of python-dotenv to 1.2.2
+
+ -- VyOS maintainers and contributors <maintainers@vyos.io> Tue, 19 May 2026 19:20:56 -0500
+
+vyos-http-api-tools (2.4) unstable; urgency=medium
+
+ * Update version of python-multipart to 0.0.26
+ * Update version of pyjwt to 2.12.0
+
+ -- VyOS maintainers and contributors <maintainers@vyos.io> Thu, 23 Apr 2026 13:25:07 -0500
+
vyos-http-api-tools (2.3) unstable; urgency=medium
* Update version of FastAPI to 0.92.0
diff --git a/requirements.txt b/requirements.txt
index 4d2a2ea..25a10c5 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -4,9 +4,9 @@
#
# pip-compile requirements.in
#
-annotated-types==0.6.0
+annotated-types==0.7.0
# via pydantic
-anyio==4.3.0
+anyio==4.6.2.post1
# via
# starlette
# watchfiles
@@ -14,57 +14,57 @@ ariadne==0.23.0
# via -r requirements.in
click==8.1.7
# via uvicorn
-fastapi==0.110.1
+fastapi==0.115.5
# via -r requirements.in
-graphql-core==3.2.3
+graphql-core==3.2.5
# via
# ariadne
# sgqlc
-h11==0.14.0
+h11==0.16.0
# via
# uvicorn
# wsproto
-httptools==0.6.1
+httptools==0.6.4
# via uvicorn
-idna==3.7
+idna==3.15
# via anyio
-makefun==1.15.2
+makefun==1.15.6
# via -r requirements.in
-pydantic==2.7.0
+pydantic==2.10.2
# via fastapi
-pydantic-core==2.18.1
+pydantic-core==2.27.1
# via pydantic
-pyjwt==2.8.0
+pyjwt==2.12.0
# via -r requirements.in
-python-dotenv==1.0.1
+python-dotenv==1.2.2
# via uvicorn
-python-multipart==0.0.9
+python-multipart==0.0.27
# via -r requirements.in
python-pam==2.0.2
# via -r requirements.in
-pyyaml==6.0.1
+pyyaml==6.0.2
# via uvicorn
-sgqlc==16.3
+sgqlc==16.4
# via -r requirements.in
sniffio==1.3.1
# via anyio
-starlette==0.37.2
+starlette==0.41.3
# via
# ariadne
# fastapi
-typing-extensions==4.11.0
+typing-extensions==4.12.2
# via
# ariadne
# fastapi
# pydantic
# pydantic-core
-uvicorn[standard]==0.29.0
+uvicorn[standard]==0.32.1
# via -r requirements.in
-uvloop==0.19.0
+uvloop==0.21.0
# via uvicorn
-watchfiles==0.21.0
+watchfiles==1.0.0
# via uvicorn
-websockets==12.0
+websockets==14.1
# via uvicorn
wsproto==1.2.0
# via -r requirements.in