Skip to main content

upgrade-fab-provider

Upgrade the pinned Flask-AppBuilder (FAB) dependency in the Apache Airflow FAB provider (`providers/fab/`). Bumps the exact `flask-appbuilder==` pin and its mirror constant, regenerates `uv.lock`, drives the `test_fab_alignment.py` drift tripwire, reviews the vendored security-manager `override.py` against the new upstream FAB, and conditionally re-vendors static assets / DB migrations. Use when asked to "upgrade FAB", "bump flask-appbuilder", or move the FAB provider to a newer Flask-AppBuilder release.

v1.0.0New

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install apache-airflow-upgrade-fab-provider
Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/apache-airflow-upgrade-fab-provider/SKILL.md

Setup guide →

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiCryptographically signed by the skills-hub.ai distributor key at publish time.
Signed
0Save

Instructions

upgrade-fab-provider

Airflow's FAB provider is tightly coupled to a specific Flask-AppBuilder
release because it vendors-in and subclasses large parts of FAB's security
manager. A version bump is therefore never "just change the pin" — it must be
reconciled against the vendored code, and that reconciliation is enforced by a
pytest alignment test, not a prek hook.

The canonical reference for a real bump is PR #66841 ("Bump flask-appbuilder
to 5.2.1 and mirror new auth event hooks") — commit c72b6613fd. Read its diff
first when in doubt: git show c72b6613fd.

The coupling — why this is not a one-line change

  • providers/fab/pyproject.toml:75-80 explains it: Airflow vendored FAB's
    security-manager code into
    providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py
    (~2700 lines) as FabAirflowSecurityManagerOverride. Every bump must review
    that class against upstream FAB for new / changed / removed methods.
  • test_fab_alignment.py mechanically detects drift between the installed
    FAB package and the vendored override, and fails CI until the developer
    reconciles it.

Inputs

  • Target version — the FAB version to move to. If not given, use the latest
    release on PyPI (https://pypi.org/pypi/flask-appbuilder/json → info.version).
    Confirm the target with the user if it is a major or minor bump (higher
    reconciliation risk); a patch bump can proceed.

The files a bump touches

Always:

  1. providers/fab/pyproject.toml — line ~80, the flask-appbuilder==X.Y.Z pin
    (the only real dependency pin in the repo).
  2. providers/fab/tests/unit/fab/auth_manager/security_manager/test_fab_alignment.py
    — EXPECTED_FAB_VERSION = "X.Y.Z" (line ~43). Must move in lockstep with the pin.
  3. providers/fab/docs/index.rst — the dependency table row
    ``flask-appbuilder`` ``==X.Y.Z`` (line ~114).
  4. providers/fab/README.rst — the Requirements table row (line ~60). Do
    not hand-edit
    — it is auto-generated. Regenerate it from the bumped
    pyproject.toml with the sync-provider-readme prek hook (Step 8); the hook
    re-renders the table whenever pyproject.toml changes. (Pre-existing bumps
    that predate this hook left it to release-time regeneration; today the hook is
    per-commit, so CI flags the drift — run it.)
  5. uv.lock — regenerated (see Step 4 for the pinned-uv caveat).

Conditionally:

  1. providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py
    — transplant any relevant upstream FAB changes (new auth hooks, changed
    signatures, ported fixes). The reference bump added +37 lines here. Note:
    a green alignment test does not prove the transplant is unnecessary — a
    security fix may live inside a method Airflow vendors (see the 5.2.2 worked
    example below).
  2. providers/fab/src/airflow/providers/fab/www/** + providers/fab/www-hash.txt
    — only if the new FAB ships changed static assets / templates that are
    re-vendored (see Step 6).
  3. providers/fab/src/airflow/providers/fab/migrations/versions/** — only if the
    new FAB version ships DB migrations (see Step 7).

Never: no newsfragment, and do not hand-edit providers/fab/docs/changelog.rst
— providers are released from main and the release manager regenerates the
changelog from git log (per providers/AGENTS.md). The commit subject is the
changelog entry.

Procedure

Step 1 — Determine the target version and current state

  • Read the current pin: grep flask-appbuilder== providers/fab/pyproject.toml.
  • Resolve the target (PyPI latest, or the user's requested version).
  • Classify the jump: patch / minor / major. For minor/major, skim the FAB
    release notes (https://github.com/dpgaspar/Flask-AppBuilder/releases) for
    security-manager / model / template changes before editing.

Step 2 — Bump the three source pins

Edit in lockstep:

  • providers/fab/pyproject.toml — the flask-appbuilder==X.Y.Z line (keep the
    trailing # Whenever updating the version, run test_fab_alignment.py to verify.
    comment).
  • test_fab_alignment.py — EXPECTED_FAB_VERSION = "X.Y.Z". It is the tripwire;
    editing it now is fine — you will keep re-running the test until it and the
    other three tests pass.
  • providers/fab/docs/index.rst — the dependency-table ==X.Y.Z row.

Step 3 — Install the new FAB into the provider venv

uv --project providers/fab sync installs the new pin. Confirm the installed
version:

uv run --project providers/fab python -c \
  "import importlib.metadata as m; print(m.version('flask-appbuilder'))"

Step 4 — Regenerate uv.lock (pinned uv!)

The lock must be regenerated with the repo's pinned uv version, or it drifts
hundreds of unrelated marker lines:

AIRFLOW_UV_VERSION=$(grep -oE 'AIRFLOW_UV_VERSION=[0-9.]+' Dockerfile.ci | head -1 | cut -d= -f2)
uvx --from uv==$AIRFLOW_UV_VERSION uv lock

If a conflict is irrecoverable, delete uv.lock and re-run uv lock with the
pinned version. Confirm the diff is limited to the FAB bump, not a wholesale
marker rewrite.

Step 5 — Run the alignment test and reconcile override.py

uv run --project providers/fab pytest \
  providers/fab/tests/unit/fab/auth_manager/security_manager/test_fab_alignment.py -xvs

Under the host sandbox the test needs a writable AIRFLOW_HOME and the
rerun-failures socket disabled — if it errors on a socket bind or on
~/airflow, run it as:

AIRFLOW_HOME="$TMPDIR/fab_home" uv run --project providers/fab pytest \
  providers/fab/tests/.../test_fab_alignment.py -q -p no:rerunfailures

The four tests and how to fix each:

  1. test_fab_version_matches_expected — trips on the version mismatch. It
    passes once EXPECTED_FAB_VERSION == installed version, but only after you
    have done the review below.
  2. test_no_unaudited_fab_methods — a new FAB public method exists that is
    neither implemented in override.py nor listed in AUDITED_EXCLUSIONS.
    Fix: either implement/override it in override.py, or add it to
    AUDITED_EXCLUSIONS with a justification comment.
  3. test_no_stale_exclusions — AUDITED_EXCLUSIONS lists a method the new
    FAB no longer has. Fix: remove that entry.
  4. test_shared_method_signatures_compatible — FAB changed a method
    signature (new required param). Fix: update the override.py signature, or
    add to KNOWN_SIGNATURE_DEVIATIONS if the divergence is intentional.

The manual review that the test cannot fully automate: diff the vendored
override.py against the new FAB's flask_appbuilder/security/sqla/manager.py
and BaseSecurityManager and transplant behavioural changes (bug fixes, new
auth event hooks), not just signatures — the test only checks method presence
and required params. Locate the installed source:

uv run --project providers/fab python -c \
  "import flask_appbuilder.security.sqla.manager as m; print(m.__file__)"

Step 6 — Re-vendor static assets / templates (only if changed)

If the new FAB changed frontend assets that Airflow vendors under
providers/fab/src/airflow/providers/fab/www/ (templates in
templates/appbuilder/, static JS/CSS), re-vendor them, then regenerate the
fingerprint:

prek run compile-fab-assets --all-files

This runs scripts/ci/prek/compile_provider_assets.py fab (pnpm build over
www/) and rewrites providers/fab/www-hash.txt. A patch bump usually does
not touch assets — skip this step unless FAB's templates/static changed.
Commit the regenerated www-hash.txt if it changed.

Step 7 — DB migrations (only if FAB ships them)

If the new FAB adds/changes security-model tables, add the corresponding
migration under providers/fab/src/airflow/providers/fab/migrations/versions/
and run:

prek run update-migration-references-fab check-revision-heads-map-fab --all-files

Patch bumps normally have no migrations — skip unless the release notes mention
schema changes.

Step 8 — Static checks + tests

prek run --from-ref main --stage pre-commit
uv run --project providers/fab pytest providers/fab/tests/unit/fab/auth_manager -xvs

The pre-commit stage runs sync-provider-readme (regenerating README.rst) and
other FAB hooks. Re-run the alignment test until all four tests pass. The full
provider suite is breeze testing providers-tests --test-type "Providers[fab]".

Step 9 — Self-review and commit

  • git diff main...HEAD — verify only the intended files changed, and uv.lock
    is a clean FAB-scoped diff.
  • Commit subject in imperative mood, plain prose, no Conventional-Commits
    prefix, e.g. Bump flask-appbuilder to X.Y.Z in FAB provider. Body explains
    why (what upstream changes were mirrored), not what.
  • No newsfragment, no changelog edit (provider release manager regenerates from
    git log).
  • Prepend your PR to the history list in providers/fab/CONTRIBUTING.rst so the
    FAB-upgrade record stays current.
  • Push to origin and open the PR per the repo's PR conventions.

Gotchas

  • EXPECTED_FAB_VERSION is a second pin. Forgetting it makes
    test_fab_alignment.py fail even when everything else is correct.
  • uv.lock marker drift. Always use the pinned uv (Step 4) — a bare
    uv lock rewrites hundreds of environment-marker lines and buries the real diff.
  • The alignment test uses AST, not import, to read FAB's SecurityManager
    (to avoid SQLAlchemy model-registry collisions with Airflow's vendored models).
    A green test proves structural alignment; it does not prove behavioural
    parity — Step 5's manual transplant review is still required.
  • docs/index.rst dependency table may look auto-generated but the reference
    PR edited it by hand; if a docs-regen prek hook rewrites it, let the hook win.
  • README.rst is generated, but the sync hook is per-commit. Don't hand-edit
    it; run prek run sync-provider-readme (or the full pre-commit stage) after
    bumping pyproject.toml — CI fails on the drift otherwise.
  • Don't touch providers/fab/docs/upgrading.rst — that is end-user guidance
    for upgrading the provider package in a deployment, not the developer bump
    workflow.

Worked example — 5.2.1 to 5.2.2 (patch)

A patch bump that needed no override.py change, but only after a real
behavioural review — the green alignment test alone was not sufficient evidence:

  • FAB 5.2.2 shipped three security-manager fixes: LDAP search-filter escaping,
    OAuth email-allowlist regex anchoring (email + "$"), and API-login provider
    validation.
  • All three touch methods Airflow vendors (_search_ldap, auth_user_ldap,
    auth_user_oauth) — so the alignment test passing did not mean "nothing to
    do". Each had to be checked by hand:
    • LDAP escaping — Airflow's vendored _search_ldap already escapes via
      ldap.filter.escape_filter_chars (and adds filter-parenthesis validation); it
      was ahead of FAB. No transplant.
    • OAuth allowlist anchoring — the match lives in FAB's AuthOAuthView
      (views.py), and Airflow's CustomAuthOAuthView.oauth_authorized delegates
      via super().oauth_authorized(), so the fix is inherited from the installed
      FAB 5.2.2. No transplant.
    • API-login validation / Azure-JWT warning / uuid4 — in FAB core Airflow
      doesn't vendor. Inherited.
  • Net change set: pyproject.toml, test_fab_alignment.py, docs/index.rst,
    README.rst (via hook), uv.lock. Commit: Bump flask-appbuilder to 5.2.2 in FAB provider.

The lesson the skill encodes: for every security/behavioural fix in the FAB
release notes, locate the method and check whether Airflow vendors it
— the
alignment test guards structure, you guard behaviour.

This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →
airflow-new-sdkGuide for implementing a brand-new language SDK for Airflow (AIP-108). Use this skill when a contributor wants to add support for a new programming language — designing the Python coordinator, implementing the wire protocol in the target language, writing the bundle format, and structuring the PR. Trigger on phrases like "new language SDK", "new SDK", "add support for [language]", "implement coordinator for", "SubprocessCoordinator", "BaseCoordinator", "new runtime", "AFBNDL01", "supervisor schema", or anything about bringing a new language into the Airflow executor ecosystem.0 installsaip-user-storiesGenerate verified recipe playbooks from AIPs with PR implementations (post mode), or speculative user stories from AIPs without implementations (pre mode). Use when the user provides an AIP URL or AIP content, optionally with PR URLs and file paths.0 installsmagpie-setupAdopt and maintain the apache-magpie framework in a project repo via the snapshot-based adoption mechanism. The only framework skill committed in an adopter's repo; every other skill is a symlink the adopt sub-action wires up. Sub-actions: `/magpie-setup` - first-time adoption (default; main-checkout only) `/magpie-setup upgrade` - refresh the gitignored snapshot per the committed lock (main-checkout only) `/magpie-setup worktree-init` - symlink a worktree's snapshot to the main's `/magpie-setup verify` - health check + drift detection `/magpie-setup skill-sources` - fetch/pin/symlink skills from trusted external sources listed in the adopter trust list (main-checkout only) `/magpie-setup override <skill>` - open or scaffold an agentic override in `.apache-magpie-overrides/` `/magpie-setup unadopt` - reverse the adoption (snapshot, locks, symlinks, hook, doc sections); preserves `.apache-magpie-overrides/` by default (main-checkout only)0 installs

More from Apache Airflow

View source →
airflow-performance-harnessMeasure a scheduler or executor-path change under load with the performance harness in airflow-core/tests/integration/performance. Use when asked to benchmark, load test or compare the performance of a change to the scheduler, the executors or task scheduling. Covers putting the change behind the flag, shaping the load, running the harness in breeze, reading its dashboard, and dropping the scratch changes afterwards.0 installsairflow-translationsAdd or update translations for the Apache Airflow UI. Guides through setting up locales, scaffolding translation files, translating with locale-specific guidelines, and validating results. Use when working with i18n tasks in airflow-core/src/airflow/ui/public/i18n/locales/.0 installsprepare-providers-documentationReplace the manual commit-by-commit classification step in `breeze release-management prepare-provider-documentation` with AI-driven classification. For each provider with pending changes, analyze every PR (batched into one sub-agent per provider, not one per PR), pay special attention to potentially breaking changes by inspecting the actual diff, scope multi-provider PRs to the current provider's slice, ask the release manager when uncertain, and apply version bumps + changelog entries. Use during the regular provider release cycle as an alternative to the interactive breeze prompts.0 installsairflow-publish-changesPrepare or carry out authorized publication of Apache Airflow changes, including remote checks, pre-push verification, PR creation, and tracking deferred work. Also use when planning these steps or managing contribution issues.0 installsairflow-java-sdkGuide for contributing to the Airflow Java SDK (AIP-108). Use this skill whenever a contributor is working in the `java-sdk/` directory or on the Java coordinator in `task-sdk/src/airflow/sdk/coordinators/java/` — whether they want to add a feature, write tests, fix a bug, understand the architecture, or prepare a PR. Trigger on phrases like "Java SDK", "JavaCoordinator", "java-sdk", "annotation processor", "Airflow.Task", "BundleBuilder", or anything about running JVM tasks in Airflow.0 installsairflow-pr-draft-summaryDraft Apache Airflow commit messages, PR titles and descriptions, or GitHub comments and reviews. Also use for release-note decisions when preparing a contribution.0 installs

More Build skills

Browse category →
senior-frontendBuild and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle size. Use whenever the user wants a new component or app, a page feels slow, the bundle is too big, or asks for a frontend code review.631 installsui-design-systemUse when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens with design_token_generator.py.530 installsfrontend-designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.341 installssenior-backendBuild and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load tests. Use whenever the user's API is slow or broken, needs login or auth added, a schema change, or a new endpoint or service scaffolded.244 installsself-improving-agentCurate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill. Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.172 installsusing-superpowersUse when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions144 installs

Frequently asked questions about upgrade-fab-provider

What does the upgrade-fab-provider skill do?

Upgrade the pinned Flask-AppBuilder (FAB) dependency in the Apache Airflow FAB provider (`providers/fab/`). Bumps the exact `flask-appbuilder==` pin and its mirror constant, regenerates `uv.lock`, drives the `test_fab_alignment.py` drift tripwire, reviews the vendored security-manager `override.py` against the new upstream FAB, and conditionally re-vendors static assets / DB migrations. Use when asked to "upgrade FAB", "bump flask-appbuilder", or move the FAB provider to a newer Flask-AppBuilder release. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the upgrade-fab-provider skill?

Run `npx @skills-hub-ai/cli install apache-airflow-upgrade-fab-provider` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/apache-airflow-upgrade-fab-provider/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does upgrade-fab-provider work with?

upgrade-fab-provider runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the upgrade-fab-provider skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use upgrade-fab-provider after installing it?

In Claude Code, type `/apache-airflow-upgrade-fab-provider` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the upgrade-fab-provider skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.