Skip to content

Refactor: introduce shared constants for dev mode strings #2061

@jlaneve

Description

@jlaneve

Summary

The dev mode strings "standalone" and "docker" are scattered as raw string literals across multiple packages:

  • cmd/airflow.go (flag handling, mode resolution)
  • airflow/standalone.go (mode field in PSStatus)
  • airflow/docker.go (mode field in PSStatus)
  • airflow/types/ps.go (referenced in comments)

A modeStandalone constant was added in cmd/airflow.go to fix a goconst lint warning, but ideally these should be shared constants in a central location like airflow/types so all packages reference the same values.

Suggested approach

  • Define ModeDocker and ModeStandalone constants in airflow/types
  • Replace all raw "standalone" / "docker" mode string literals across the codebase
  • Keep flag name strings (e.g. "standalone" in PersistentFlags) as literals since those are UI concerns

Came out of review on #ai-84 (structured output support).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions