Azure / Azure/static-web-apps-cli

swa deploy fails in Bazel

Offen
#877 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
668
Forks
156
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**Describe the bug**
I am trying to move the `swa deploy` command to Bazel. But I consistently get an unknown error.

Everything works without Bazel.

I suppose it could be related to the strict path to binary folders. But I am not fully sure about it.

It looks like the issue happens during creating a child process.

**To Reproduce**
1. Setup calling `swa cli` as binary in Bazel config. Like this:
```
swa_bin.swa_binary(
name = "release",
args = ["deploy"],
data = ["/.out"],
env = {
"SWA_CLI_OUTPUT_LOCATION": "./out",
"SWA_CLI_DEPLOY_ENV": "production",
},
chdir = native.package_name(),
)
```
2. Call `bazel run release`

**Screenshots**
With Bazel:
image

Without:
image

**Desktop (please complete the following information):**

- OS: MacOS
- Version 14.5

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, das bereitgestellte Bazel-Ziel mit `bazel run release` zu reproduzieren, und vergleiche anschließend seine Ausgabe mit einem direkten `swa deploy`-Lauf unter macOS. Verfolge den Fehler im Kindprozess sowie das strikt eingehaltene Verhalten bezüglich Binärpfad oder Arbeitsverzeichnis; abgeschlossen ist die Aufgabe, wenn dieselbe Bereitstellung über Bazel ohne den unbekannten Fehler erfolgreich ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
azure, typescript
Bereich
build-system, cli, cloud
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.