AL-Go icon indicating copy to clipboard operation
AL-Go copied to clipboard

How do you enabled breaking change check in AL-GO

Open gntpet opened this issue 2 years ago • 4 comments

Hey @freddydk,

Do you have some docs about 'braking change' detection. I see that our pipeline downloads previous release app. But, I don't see any error or warning regarding breaking changes. Is it mandatory to use container for breaking change detection?

Our configuration is like this:

{
  "type": "PTE",
  "templateUrl": "https://github.com/microsoft/AL-Go-PTE@main",
  "treatTestFailuresAsWarnings": true,
  "doNotRunBcptTests": true,
  "enableCodeCop": true,
  "rulesetFile": "../al.ruleset.json",
  "companyName": "TNM Automated Test",
  "runs-on": "srs-eid",
  "githubRunner": "srs-eid",
  "environments": [
    "QA"
  ],
  "CICDPushBranches": [
    "main",
    "release/*"
  ],
  "CICDPullRequestBranches": [
    "main",
    "release/*",
    "features/*",
    "bug/*"
  ],
  "DeployToQA": {
    "EnvironmentType": "SaaS",
    "EnvironmentName": "QA",
    "Projects": "SRS.nl,SRS.base",
    "Branches": [
      "main"
    ],
    "ContinuousDeployment": true,
    "runs-on": "srs-eid"
  },
  "DeployToUAT": {
    "EnvironmentType": "SaaS",
    "EnvironmentName": "UAT",
    "Projects": "SRS.nl,SRS.base",
    "Branches": [
      "release/*"
    ],
    "ContinuousDeployment": false,
    "runs-on": "srs-eid"
  },
  "DeployToPROD": {
    "EnvironmentType": "SaaS",
    "EnvironmentName": "PROD",
    "Projects": "SRS.nl,SRS.base",
    "Branches": [
      "release/*"
    ],
    "ContinuousDeployment": false,
    "runs-on": "srs-eid"
  },
  "EnableTaskScheduler": true,
  "doNotRunTests": true,
  "useCompilerFolder": true,
  "doNotPublishApps": true,
  "alwaysBuildAllProjects": true,
  "PullRequestTrigger": "pull_request",
  "templateSha": "1e6ebb58fc629cc134759f996f9be9ab6ada7fb4"
}

Best Regards, Gintautas

gntpet avatar Feb 27 '24 12:02 gntpet

Hi @gntpet and thank you for your question.

Currently, AL-Go and BCContainerHelper do not support running breaking changes validation. It could be an enhancement we can consider for future versions.

You can check how we did it in BCApps, using a PreCompileApp.ps1 override. Key function is Enable-BreakingChangesCheck that creates the AppSourceCop.json, that is needed to trigger the breaking changes checks when compiling the app. See more info about it here.

Let me know if you have more questions.

mazhelez avatar Mar 18 '24 07:03 mazhelez

Note that the AppSourceCop.json is automatically created if the repo is an AppSource app, with breaking change validation.

freddydk avatar Mar 18 '24 09:03 freddydk

I have an app that is still in the pre-release stages and as a result I want breaking changes to be allowed. Al-go is failing to build due to breaking changes. How can I ignore this to get the build to run?

bcapps-co avatar Apr 26 '24 19:04 bcapps-co

I have an app that is still in the pre-release stages and as a result I want breaking changes to be allowed. Al-go is failing to build due to breaking changes. How can I ignore this to get the build to run?

OK, I've figured this out. I added "skipUpgrade" : true to .AL-Go/settings.json and it worked. Yay!

bcapps-co avatar Apr 27 '24 00:04 bcapps-co