-
Notifications
You must be signed in to change notification settings - Fork 183
Description
AL-Go Bug Report: Workflow names contain leading spaces breaking CLI usage
AL-Go version
v8.2
Describe the issue
Many AL-Go workflow files have names that begin with a leading space character, making them incompatible with GitHub CLI (gh) workflow commands. This breaks automation scripts and CLI-based workflows.
Affected workflows in AL-Go AppSource template:
CI/CD(space before CI/CD)Publish To Environment(space before Publish)Create release(space before Create)Create Online Dev. Environment(space before Create)Test Current(space before Test)Deploy Reference Documentation(space before Deploy)Increment Version Number(space before Increment)Test Next Major(space before Test)Test Next Minor(space before Test)Publish To AppSource(space before Publish)Update AL-Go System Files(space before Update)
Not affected (no leading space):
Add existing app or test appCreate a new appCreate a new performance test appCreate a new test appPull Request BuildTroubleshooting_Build AL-Go project
The inconsistency suggests this was unintentional.
Why this is a problem
1. GitHub CLI incompatibility
The gh CLI tool is the official GitHub command-line interface and is widely used for automation. When workflow names contain leading spaces, CLI commands fail:
# This fails:
gh workflow run "CI/CD" --ref main
# Error:
# could not find any workflows named CI/CD
# This works, but is unintuitive:
gh workflow run " CI/CD" --ref mainUsers must discover through trial and error that workflows have hidden leading spaces. The GitHub web UI provides no visual indication that spaces exist in workflow names.
2. Breaks automation scripts
DevOps scripts that trigger AL-Go workflows programmatically must hardcode the leading space:
# Fragile - space is invisible in code
gh workflow run " Publish To Environment" --ref epic/hotfix `
-f environmentName=UAT `
-f appVersion=latestIf AL-Go later fixes the workflow names (removes spaces), all automation scripts break.
3. Inconsistent with GitHub conventions
GitHub's own workflows and examples do not use leading spaces in workflow names. AL-Go's inconsistency with platform conventions makes the framework harder to learn and use.
4. No visual indication
The leading space is invisible in:
- GitHub Actions UI
- Workflow run logs
gh workflow listoutput (appears as normal indentation)- Code editors (easy to accidentally remove during edits)
Users have no way to know the space exists without reading the YAML source files directly.
Steps to reproduce
- Create an AL-Go for GitHub AppSource repository using v8.2 template
- Install GitHub CLI (
gh) - Authenticate:
gh auth login - List workflows:
gh workflow list- Observe output shows workflows with apparent leading spaces
- Attempt to trigger CI/CD workflow:
gh workflow run "CI/CD" --ref main - Observe error:
could not find any workflows named CI/CD - Try with leading space:
gh workflow run " CI/CD" --ref main - Observe workflow triggers successfully
Expected behavior
Workflow names should not contain leading or trailing whitespace. This aligns with:
- GitHub's workflow naming conventions
- CLI tool expectations
- Standard software naming practices
Expected workflow names:
CI/CD(no space)Publish To Environment(no space)Create Release(no space)- etc.
Actual behavior
Workflow YAML files define names with leading spaces:
Example from .github/workflows/CICD.yaml:
name: ' CI/CD'Example from .github/workflows/PublishToEnvironment.yaml:
name: ' Publish To Environment'Example from .github/workflows/CreateRelease.yaml:
name: ' Create release'The space character is intentional in the YAML source but serves no functional purpose and breaks CLI compatibility.
Impact on users
Real-world scenario
A development team uses AL-Go for continuous deployment. Their DevOps pipeline includes:
- Developer merges code to epic branch
- CI/CD script automatically triggers "Publish To Environment" workflow via
ghCLI - Script fails with "could not find any workflows named Publish To Environment"
- Developer spends 30+ minutes debugging
- Developer discovers leading space exists through trial and error
- Developer updates all automation scripts to include invisible leading space
- Future AL-Go updates may break scripts if spaces are removed
This wastes developer time and reduces confidence in AL-Go automation.
Affected use cases
- CI/CD pipelines: Automated workflow triggering via GitHub CLI
- Release automation: Scripts that orchestrate multi-step release processes
- Environment management: Scripts that deploy to multiple environments sequentially
- Integration testing: Workflows that trigger AL-Go builds from external systems
Additional context
Comparison with standard GitHub workflows
GitHub's own workflow examples:
name: CI
name: Deploy to Production
name: ReleaseAL-Go workflows:
name: ' CI/CD'
name: ' Publish To Environment'
name: ' Create release'GitHub does not use leading spaces in any official examples or documentation.
Why leading spaces may have been added
Possible original intent:
- Visual separation in GitHub UI workflow list (but this doesn't work - spaces are invisible)
- Sorting/grouping workflows alphabetically (but this is fragile and doesn't work as intended)
Neither use case justifies breaking CLI compatibility.
Suggested fix
Remove leading spaces from all AL-Go workflow names:
Before:
name: ' CI/CD'After:
name: 'CI/CD'This change should be applied to:
- AL-Go for GitHub AppSource template
- AL-Go for GitHub PTE template
- All AL-Go system workflow files
Breaking change considerations
This is technically a breaking change for users who have hardcoded the leading space in automation scripts. However:
- The current behavior is already broken (doesn't work with CLI)
- Most users likely don't use CLI triggering due to this bug
- The fix aligns with platform conventions
- Users can easily update scripts (remove space from workflow name string)
Recommended migration:
- Document the change in AL-Go release notes
- Provide clear before/after examples
- Update AL-Go documentation to show correct workflow names
- Consider adding workflow name validation to AL-Go template linter
Verification after fix
After removing leading spaces, verify:
gh workflow list
# Should show: CI/CD, Publish To Environment, etc. (no leading spaces)
gh workflow run "CI/CD" --ref main
# Should succeed without requiring leading spaceRelated issues
This issue is separate from but related to:
- Workflow input logging (separate issue filed)
- False positive SUCCESS when EnvironmentCount=0 (issue [Bug]: Publish To Environment workflow does not log user inputs and reports false success when environments are skipped #2147)
All three issues stem from AL-Go workflows not following standard GitHub/PowerShell/CLI conventions and best practices.