Skip to content

[Bug]: CICD fails on releases/26.x branch - '26.x' cannot be recognized as a semantic version string #1915

@jwikman

Description

@jwikman

AL-Go version

7.3

Describe the issue

We've setup our CI/CD to trigger on main and releases/*, pretty much on BCApps.

But when the CI/CD runs, it fails with this error:
Error: Error trying to locate previous release. Error was '26.x' cannot be recognized as a semantic version string (https://semver.org/)

A bit more context to the error:

Locating previous release
  Getting the latest release from https://api.github.com/repos/nabsolutions-product/Eagle/releases/latest - branch releases/26.x
  Analyzing releases https://api.github.com/repos/nabsolutions-product/Eagle/releases
  Error: Error trying to locate previous release. Error was '26.x' cannot be recognized as a semantic version string (https://semver.org/)
  Test-BcContainer Telemetry Correlation Id: 1734ffa6-da0a-45fe-a6ab-1f315d1fd076
  Applying settings from E:\actions-runner-01\_work\Eagle\Eagle\.github\AL-Go-TemplateRepoSettings.doNotEdit.json
  Applying settings from E:\actions-runner-01\_work\Eagle\Eagle\.github\AL-Go-Settings.json
  Applying settings from E:\actions-runner-01\_work\Eagle\Eagle\.github\AL-Go-TemplateProjectSettings.doNotEdit.json
  No settings found in E:\actions-runner-01\_work\Eagle\Eagle\.AL-Go\settings.json
  No settings found in E:\actions-runner-01\_work\Eagle\Eagle\.github\CICD.settings.json
  No settings found in E:\actions-runner-01\_work\Eagle\Eagle\.AL-Go\CICD.settings.json
  No settings found in E:\actions-runner-01\_work\Eagle\Eagle\.AL-Go\nab-al-go-authentication[bot].settings.json
  Applying conditional settings for workflows: CICD

I have not yet created any release for this app with AL-Go, but I do not think that is the main issue here. It seems to assume that the branch name is a semver string. I also tested with releases/26 with similar error. releases/26.3 did work, though, since 26.3 is a valid semver.

Setting "skipUpgrade": true also works as a workaround, since in that scenario AL-Go do not look for previous release. This seems to be the reason why this work in the BCApps repo...

Expected behavior

It should not throw error. Try to find previous release, and if not write a warning - just as if running in the main branch.

Steps to reproduce

Setup CI/CD to trigger on main and releases/*

    "CICDPushBranches": [
        "main",
        "releases/*"
    ],

Do not set skipUpgrade.
Create a branch from main, called releases/26.x
Push to remote to trigger CI/CD

Should error out on build step

Additional context (logs, screenshots, etc.)

On request, if needed.
Internal work item: AB#609691

Metadata

Metadata

Assignees

Labels

acceptedThe issue has been acceptedbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions