Skip to content

Scripts: upper-case extensions (e.g. .PY) are accepted, but batch runs mark every host incompatible #58774

Open

Description

@Brajim20

Fleet versions

  • Discovered: main (7b711fc)
  • Reproduced: rc-minor-fleet-v4.95.0 (20e1bbb)

Web browser and operating system: Chromium running on macOS, and the API


💥 Actual behavior

Add script accepts a script with an upper-case extension, like HELLO.PY, as a Python script, and running it on a single macOS host works. But the batch run marks every macOS host as incompatible, and Controls › Scripts shows it with a generic icon and no platform.

image

🛠️ Expected behavior

An upper-case extension is handled the same as a lower-case one everywhere, as Add script and single-host runs already do.

🧑‍💻 Steps to reproduce

These steps:

  • Have been confirmed to consistently lead to reproduction in multiple Fleet instances.
  • Describe the workflow that led to the error, but have not yet been reproduced in multiple Fleet instances.
  1. Controls › Scripts › Add script: upload HELLO.PY containing #!/usr/bin/env python3 and print("hi"). It's saved, but the list shows no icon or "macOS & Linux".
  2. Run it on a macOS host in a batch (POST /api/latest/fleet/scripts/run/batch with script_id and host_ids). The batch reports the host as incompatible.
  3. Do the same with a hello.py copy. That host is pending, and running HELLO.PY on that host alone is queued.

🕯️ More info (optional)

Saving a script lower-cases the extension (server/fleet/scripts.go:45, ValidateNewScript), but ValidateScriptPlatform (server/fleet/scripts.go:985, used by batch runs) and ScriptListItem.tsx:31 compare it case-sensitively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    #g-auto-patchingProduct group focused on auto patching softwarebugSomething isn't working as documented~backendBackend-related issue.~frontendFrontend-related issue.~released bugThis bug was found in a stable release.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions