Skip to content

[26.x] Bug 572343: [26.x][BCApps #3186]Fixes #3034#3450

Closed
JesperSchulz wants to merge 33 commits intomainfrom
bugs/572343-26xBackportOf568527
Closed

[26.x] Bug 572343: [26.x][BCApps #3186]Fixes #3034#3450
JesperSchulz wants to merge 33 commits intomainfrom
bugs/572343-26xBackportOf568527

Conversation

@JesperSchulz
Copy link
Contributor

@JesperSchulz JesperSchulz commented Apr 7, 2025

Summary

Backport of #3186

Work Item(s)

Fixes AB#572343

aholstrup1 and others added 30 commits February 25, 2025 13:27
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md
-->
#### Summary <!-- Provide a general summary of your changes -->
New Version number 26.1

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Related to
[AB#566616](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/566616)

Co-authored-by: aholstrup1 <aholstrup1@users.noreply.github.com>
…657 (+ 1 more update(s)) (#3077)

This PR contains the following changes:
- Update app baselines package version. New value: 26.0.30643.30657
- Update translation package version. New value: 26.0.20250224.2


[AB#539394](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/539394)

Co-authored-by: aholstrup1 <aholstrup1@users.noreply.github.com>
This PR contains the following changes:
- Update BCArtifact version. New value: 26.1.30654.0


[AB#539394](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/539394)

Co-authored-by: mazhelez <mazhelez@users.noreply.github.com>
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md -->
#### Summary <!-- Provide a general summary of your changes -->

Allow discarding input messages in the Agent Task Timeline.

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes

[AB#566842](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/566842)

Co-authored-by: Esteban Ardaya Heckl <esardaya@microsoft.com>
This PR contains the following changes:
- Update BCArtifact version. New value: 26.1.30740.0


[AB#539394](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/539394)

---------

Co-authored-by: mazhelez <mazhelez@users.noreply.github.com>
Co-authored-by: Alexander Holstrup <117829001+aholstrup1@users.noreply.github.com>
Exposing the EnvironmentSettings for Microsoft published callers.


[AB#565525](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/565525)

---------

<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md
-->
#### Summary <!-- Provide a general summary of your changes -->

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes #

Co-authored-by: diegojoshuam <diegojoshuam@microsoft.com>
…994 (#3150)

This PR contains the following changes:
- Update app baselines package version. New value: 26.0.30643.30994


[AB#539394](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/539394)

Co-authored-by: aholstrup1 <aholstrup1@users.noreply.github.com>
… are emitted in default language (#3134)

<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md
-->
#### Summary <!-- Provide a general summary of your changes -->
Custom dimensions for data movement are emitted in local language. They
should always be emitted in default language.

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#567744](https://dynamicssmb2.visualstudio.com/Dynamics%20SMB/_workitems/edit/567744)
…3062) (#3161)

#### Summary <!-- Provide a general summary of your changes -->
Changes were reverted in #3045 due to failing tests.

Re-apply changes to web service management and fix failing tests.

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#567980](https://dynamicssmb2.visualstudio.com/Dynamics%20SMB/_workitems/edit/567980)
…sts (#3191)

<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md
-->
#### Summary <!-- Provide a general summary of your changes -->
Ensure feature key is always on in tests so there's no dependency on the
feature key being setup for tests to pass.

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#568406](https://dynamicssmb2.visualstudio.com/Dynamics%20SMB/_workitems/edit/568406/)
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md
-->
#### Summary <!-- Provide a general summary of your changes -->
replace the misleading text in agent quote page
#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#568396](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/568396)

Co-authored-by: wenjiefan <wenjiefan@microsoft.com>
…360 (+ 1 more update(s)) (#3209)

This PR contains the following changes:
- Update app baselines package version. New value: 26.0.30643.31360
- Update translation package version. New value: 26.1.20250310.7


[AB#539394](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/539394)

Co-authored-by: aholstrup1 <aholstrup1@users.noreply.github.com>
…471 (#3264)

This PR contains the following changes:
- Update app baselines package version. New value: 26.0.30643.31471


[AB#539394](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/539394)

Co-authored-by: mazhelez <mazhelez@users.noreply.github.com>
Every time SafeApplyRetentionPolicy is called, the number of records
deleted more than doubles. This is because we first set number of
deleted records to the number already deleted ex. 1000, then cleanup
records (it will increase this value further say it deletes 100, now
1100), then TotalNumberOfRecordsDeleted is incremented to 2100 instead
of just 1100.
Fixes
[AB#571357](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/571357)
…770 (#3292)

This PR contains the following changes:
- Update app baselines package version. New value: 26.0.30643.31770


[AB#539394](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/539394)

Co-authored-by: aholstrup1 <aholstrup1@users.noreply.github.com>
…o-PTE@preview - 81401b5 / Related to AB#539394 (#3312)

## v6.4

### Deprecations

- `alwaysBuildAllProjects` will be removed after October 1st 2025.
Please set the `onPull_Request` property of the `incrementalBuilds`
setting to false to force full builds in Pull Requests.
- `<workflow>Schedule` will be removed after October 1st 2025. The old
setting, where the setting key was a combination of the workflow name
and `Schedule` (dynamic setting key name) is deprecated. Instead you
need to use a setting called
[workflowSchedule](https://aka.ms/algosettings#workflowSchedule) and
either use [Conditional
Settings](https://aka.ms/algosettings#conditional-settings) or place the
setting in a workflow specific settings file.

### Issues

- Issue 1433 Publish to Environment - DependencyInstallMode not found
- Issue 1440 Create Release fails due to recent changes to the AL-Go
- Issue 1330 CompilerFolder doesn't transfer installed Apps to NuGet
resolution
- Issue 1268 Do not throw an un-understandable error during nuGet
download
- Performance test sample code in 25.4 contains objects with ID 149201
and 149202, which are not renumbered
- Issue 798 Publish To Environment breaks CI/CD pipelines
- Issue 1182 Runs-on setting type is ambiguous - string or array
- Issue 1502 NuGet dependency version is always LatestMatching

### New Workflow specific settings

- `workflowSchedule` - can be structure with a property named `cron`,
which must be a valid crontab, defining the CRON schedule for when the
specified workflow should run. Default is no scheduled runs, only manual
triggers. Build your crontab string here:
[https://crontab.guru](https://crontab.guru). You need to run the Update
AL-Go System Files workflow for the schedule to take
effect.<br/>**Note:** If you configure a WorkflowSchedule for the CI/CD
workflow, AL-Go will stop triggering CICDs on push unless you have also
added CICDPushBranches to your settings.<br/>**Note also:** If you
define a schedule for Update AL-Go System Files, it uses direct Commit
instead of creating a PR.
- `workflowConcurrency` - is used to control concurrency of workflows.
Like with the `workflowSchedule` setting, this setting should be applied
in workflow specific settings files or conditional settings. By default,
all workflows allows for concurrency, except for the Create Release
workflow. If you are using incremental builds in CI/CD it is also
recommented to set WorkflowConcurrency to:<br/>`[ "group: ${{
github.workflow }}-${{ github.ref }}", "cancel-in-progress: true" ]`<br
/>in order to cancel prior incremental builds on the same branch.<br
/>Read more about workflow concurrency
[here](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/control-the-concurrency-of-workflows-and-jobs).

### New Repository Settings

- `nuGetFeedSelectMode` determines the select mode when finding Business
Central app packages from NuGet feeds, based on the dependency version
specified in app.json. Options are: `Earliest` for earliest version of
the package, `EarliestMatching` for earliest version of the package also
compatible with the Business Central version used, `Exact` for the exact
version of the package, `Latest` for the latest version of the package,
`LatestMatching` for the latest version of the package also compatible
with the Business Central version used.
- `deployTo<environment>` now has two additional properties:
- `includeTestAppsInSandboxEnvironment`, which deploys test apps and
their dependencies to the specified sandbox environment if set to
`true`. Deployment will fail if used on a Prod environment or if the
test app has a dependency on Tests-TestLibraries. Default value is
`false`.
- `excludeAppIds`, which is an array of app ids which will be excluded
from deployment. Default value is `[]`
- `incrementalBuilds` - is a structure defining how you want AL-Go to
handle incremental builds. When using incremental builds for a build,
AL-Go will look for the latest successful build, newer than the defined
`retentionDays` and only rebuild projects or apps (based on `mode`)
which needs to be rebuilt. Properties in the structure includes:
- `onPush` - set this property to **true** in order to enable
incremental builds in CI/CD triggered by a merge/push event. Default is
**false**.
- `onPull_Request` - set this property to **false** in order to disable
incremental builds in Pull Request workflows. Default is **true**.
- `onSchedule` - set this property to **true** in order to enable
incremental builds in CI/CD when running on a schedule. Default is
**false**.
- `retentionDays` - number of days a successful build is good (and can
be used for incremental builds). Default is **30**.
- `mode` - defines the mode for incremental builds. Currently, two
values are supported. Use **modifiedProjects** when you want to rebuild
all apps in modified projects and depending projects or **modifiedApps**
if you only want to rebuild modified apps and depending apps.

> [!NOTE]
> The projects mentioned here are AL-Go projects in a multi-project
repository. A repository can contain multiple projects and a project can
contain multiple apps.

### Run "Update AL-Go System Files" on multiple branches

_Update AL-Go System Files_ has a new input to specify a list of
branches to be updated in a single workflow run.
When running the workflow on a schedule, you can now also specify
`includeBranches` in `workflowSchedule` setting, which allows you to
update the specified branches. Read more at
https://aka.ms/algosettings#workflowSchedule.

> [!NOTE]
> When running "Update AL-Go System Files" on multiple branches, the
template repository URL will be determined based on the branch the
workflow runs on and it will be used for all of the specified branches.

### Support for incremental builds

AL-Go for GitHub now supports incremental builds, which means that
unchanged projects or apps will be reused from the previous good build.
Read [this](https://aka.ms/algosettings#incrementalBuilds) to learn
more.

> [!NOTE]
> When using incremental builds it is recommended to also set
`workflowConcurrency` as defined
[here](https://aka.ms/algosettings#workflowConcurrency).

### Support for GitHub App authentication

AL-Go for GitHub now supports using a GitHub App specification as the
GhTokenWorkflow secret for a more secure way of allowing repositories to
run Update AL-Go System Files and other workflows which are creating
commits and pull requests. See [this
description](https://github.com/microsoft/AL-Go/blob/main/Scenarios/GhTokenWorkflow.md)
to learn how to use GitHub App authentication.

### Support for embedded secrets in installApps and installTestApps
settings

If your installApps or installTestApps are secure URL, containing a
secret token, you can now use a GitHub secret specification as part of
or as the full URL of apps to install. An example could be:

`"installApps": [ "https://www.dropbox.com/${{SECRETNAME}}&dl=1" ]`

Which would hide the secret part of your URL instead of exposing it in
clear text.

Related to
[AB#539394](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/539394)

Co-authored-by: bcbuild-github-agent <bcbuild-github-agent@users.noreply.github.com>
…sary telemetry for cross-geo switch (#3337)

<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md
-->
#### Summary <!-- Provide a general summary of your changes -->
Ensure that we don't emit unnecessary telemetry for cross-geo switch by
checking upgrade tag for the database, not per company.

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#572295](https://dynamicssmb2.visualstudio.com/Dynamics%20SMB/_workitems/edit/572295)
…100 (+ 1 more update(s)) (#3345)

This PR contains the following changes:
- Update app baselines package version. New value: 26.0.30643.32100
- Update translation package version. New value: 26.1.20250321.1


[AB#539394](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/539394)

Co-authored-by: aholstrup1 <aholstrup1@users.noreply.github.com>
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md
-->
#### Summary Backporting the change approved for BC27 to BC26.x:
#3184 Importing Permissions with
Overwrite Option

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#572384](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/572384)
…o-PTE@preview - ad07b06 / Related to AB#539394 (#3368)

## preview

Note that when using the preview version of AL-Go for GitHub, we
recommend you Update your AL-Go system files, as soon as possible when
informed that an update is available.

### Issues

- Issue 1519 Submitting to AppSource WARNING: AuthContext.Scopes is ..
should be
- Issue 1521 Dependencies not installed for multi project incremental PR
build
- Issue 1522 Strange warnings in Deploy job post update to AL-Go 6.4
- BcContainerHelper settings were only read from
.github/AL-Go-Settings.json, not allowing global settings in
ALGoOrgSettings for TrustedNuGetFeeds, MemoryLimit and other things that
should be possible to define globally
- Issue 1526 When updating AL-Go system files, the update process
(creating a PR or directly pushing to the branch) fails when there is a
file or directory in the repo with the same name as the branch that is
to be updated

### Support for deploying to sandbox environments from a pull request

AL-Go for GitHub now supports deploying from a PR. When using the
'Publish To Environment' workflow, it is now possible to input 'PR_X' as
the App version, where 'X' is the PR Id. This will deploy the artifacts
from the latest PR build to the chosen environment, if that build is
completed and successful.

All apps, which were not built by the PR build will be deployed from the
last known good build. You can find a notification on the PR build
explaining which build is used as the last known good build.

> [!NOTE]
> When deploying a PR build to a sandbox environment, the app will get a
special version number, which is: major.minor.maxint.run-number. This
means that the sandbox environment likely needs to be deleted after the
testing has ended.

Related to
[AB#539394](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/539394)

Co-authored-by: bcbuild-github-agent <bcbuild-github-agent@users.noreply.github.com>
…de format (#3375)

Adding support for CameraBarcodeScannerProviderAddIn to allow AL
developers to provide barcode formats when requesting the camera barcode
scanner.

Fixes
[AB#572612](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/572612)
…o-PTE@preview - 31fd2c3 / Related to AB#539394 (#3423)

## v7.0

### Issues

- Issue 1519 Submitting to AppSource WARNING: AuthContext.Scopes is ..
should be
- Issue 1521 Dependencies not installed for multi project incremental PR
build
- Issue 1522 Strange warnings in Deploy job post update to AL-Go 6.4
- BcContainerHelper settings were only read from
.github/AL-Go-Settings.json, not allowing global settings in
ALGoOrgSettings for TrustedNuGetFeeds, MemoryLimit and other things that
should be possible to define globally
- Issue 1526 When updating AL-Go system files, the update process
(creating a PR or directly pushing to the branch) fails when there is a
file or directory in the repo with the same name as the branch that is
to be updated
- Legacy code signing stopped working

### Page Scripting visualizer

Page scripting tests have been available for AL-Go for GitHub for a
while but required manual inspection of the Page scripting artifact to
see the results. It is now possible to get a quick overview in the job
summary section of a CICD build, similar to how regular and bcpt test
results are displayed.

No new settings are required. Test results will automatically be
displayed if tests are enabled via the existing setting
[pageScriptingTests](https://aka.ms/algosettings#pageScriptingTests).

### Support for deploying to sandbox environments from a pull request

AL-Go for GitHub now supports deploying from a PR. When using the
'Publish To Environment' workflow, it is now possible to input 'PR_X' as
the App version, where 'X' is the PR Id. This will deploy the artifacts
from the latest PR build to the chosen environment, if that build is
completed and successful.

All apps, which were not built by the PR build will be deployed from the
last known good build. You can find a notification on the PR build
explaining which build is used as the last known good build.

> [!NOTE]
> When deploying a PR build to a sandbox environment, the app will get a
special version number, which is: major.minor.maxint.run-number. This
means that the sandbox environment likely needs to be deleted after the
testing has ended.

Related to
[AB#539394](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/539394)

Co-authored-by: bcbuild-github-agent <bcbuild-github-agent@users.noreply.github.com>
JesperSchulz and others added 3 commits April 4, 2025 12:53
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md -->
#### Summary <!-- Provide a general summary of your changes --> Rule

https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/analyzers/appsourcecop-as0077
should only be enabled in release branches, as the rule only applies in
hotfix scenarios.

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes
[AB#568822](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/568822)
<!-- Thank you for submitting a Pull Request. If you're new to
contributing to BCApps please read our pull request guideline below
* https://github.com/microsoft/BCApps/Contributing.md
-->
#### Summary <!-- Provide a general summary of your changes -->
Changed EmailScenarioAttachments record to be by var in an event to be
able to set filters.

#### Work Item(s) <!-- Add the issue number here after the #. The issue
needs to be open and approved. Submitting PRs with no linked issues or
unapproved issues is highly discouraged. -->
Fixes #3034 






Fixes
[AB#568527](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/568527)

Co-authored-by: Frederik Pas <fp@tcog.be>
@JesperSchulz JesperSchulz requested review from a team as code owners April 7, 2025 09:33
@github-actions github-actions bot added Build: Automation Workflows and other setup in .github folder AL: System Application Build: scripts & configs Build scripts and configuration files AL: Tools AL: Business Foundation labels Apr 7, 2025
@github-actions github-actions bot added this to the Version 27.0 milestone Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Business Foundation AL: System Application AL: Tools Build: Automation Workflows and other setup in .github folder Build: scripts & configs Build scripts and configuration files

Projects

None yet

Development

Successfully merging this pull request may close these issues.