Skip to content

added size limit to resolve AA0139 error#8477

Merged
Michenka6 merged 4 commits into
mainfrom
private/aalimov/bugs/637389
Jun 4, 2026
Merged

added size limit to resolve AA0139 error#8477
Michenka6 merged 4 commits into
mainfrom
private/aalimov/bugs/637389

Conversation

@Michenka6
Copy link
Copy Markdown
Contributor

@Michenka6 Michenka6 commented Jun 4, 2026

@Michenka6 Michenka6 requested a review from a team as a code owner June 4, 2026 09:21
@github-actions github-actions Bot added this to the Version 29.0 milestone Jun 4, 2026
mirouhl
mirouhl previously approved these changes Jun 4, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates web service column insertion logic to enforce a maximum string length for "Field Name", addressing the AA0139 error by ensuring the value written to "Tenant Web Service Columns"."Field Name" fits within its defined Text[250] size.

Changes:

  • Limit "Field Name" assignment during InsertSelectedColumns to 250 characters via CopyStr(..., 1, 250).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Michenka6 Michenka6 requested a review from a team as a code owner June 4, 2026 10:53
@Michenka6
Copy link
Copy Markdown
Contributor Author

@Michenka6 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree company="Microsoft"

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

$\textbf{🟡\ Medium\ Severity\ —\ Style} \quad \color{gray}{\texttt{\small Iteration\ 1}}$

CopyStr silently truncates field name

Adding the third argument 250 to CopyStr prevents a runtime overflow error, but now silently truncates field names longer than 250 characters. A truncated field name will produce an incorrect or non-functional web service column definition with no error or log entry to alert the developer or administrator.

Recommendation:

  • Add a guard or log entry when the value is longer than 250 characters so that truncation is visible. Alternatively, validate that no key name exceeds 250 characters before calling CopyStr.
if StrLen(keyValuePair.Value()) > 250 then
    Error('Field name ''%1'' exceeds the maximum length of 250 characters.', keyValuePair.Value());
TargetTenantWebServiceColumns.Validate("Field Name", CopyStr(keyValuePair.Value(), 1, 250));

Line mapping was unavailable, so this was posted as an issue comment.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why

Comment thread src/rulesets/ruleset.json
@Michenka6 Michenka6 enabled auto-merge (squash) June 4, 2026 12:03
@Michenka6 Michenka6 merged commit bdb0fdf into main Jun 4, 2026
63 of 89 checks passed
@Michenka6 Michenka6 deleted the private/aalimov/bugs/637389 branch June 4, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants