Azure / Azure/azure-sdk-tools

[azsdk-cli] [TypeSpec Authoring]Scope azsdk_customized_code_update Customization tool

Closed
#16,780 0 comments 0 reactions 1 assignee Claimed by @chunyu3 View on GitHub
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
143

Description

azsdk_customized_code_update customization tool will support three edit scope, each edit scope will apply different customization and verification and required repo environment.

** Three edit-scope**
customization tool will handle customization request this in three edit-scope modes:
- edit-scope = tsp: allow edits to typespec only, with no code customization, so package-path is not required.
- edit-scope = customizeCode: allow edits to sdk code only, with no typespec changes, so tsp-project-path is not required.
- edit-scope = all: require both package-path and tsp-project-path.

**Action, repo for each edit scope**
the details about repo required, customization task, and the verification mechanism to use after applying the customization for
Stage | Repo | scope | customization | verification | fallback
-- | -- | -- | -- | -- | --
local dev | spec repo + SDK repo | all/ specInput | typespec customization, SDK code customization | typespec compileSDK re-generateSDK build | code customization
Spec PR | Spec repo | specInput | Typespec customization | typespec compile | No
SDK PR | SDK repo | CustomCode | SDK code customization | SDK build | No

To apply scoped customization, the whole customization flow will be:

```mermaid
flowchart TD

Entry["Entry Point
Customize Request"] --> Classify["Classifier
Analyze request &
route to next action"]

Classify -- Stalled/complex --> Failure
Classify -- TypeApplicable Request --> SpecInputInScope{SpecInput in Scope?}
Classify -- CodeCustomization Request --> CustomCodeInScope
CustomCodeInScope --Yes --> CodeCustomization["Code Repair
Apply Code Customization
Max 2 Iterations"]
CustomCodeInScope --No --> Failure

CodeCustomization --> BuildAfterCodeCustomization[Build SDK after CodeCustomization]
BuildAfterCodeCustomization --> BuildAfterCodeCustomizationOK{Build Successful?}
BuildAfterCodeCustomizationOK -- No --> Failure
BuildAfterCodeCustomizationOK -- Yes --> Success
SpecInputInScope -- No --> Failure
SpecInputInScope -- Yes --> ApplyTypespecCustomization["Apply TypeSpec
Customization"]
ApplyTypespecCustomization --> CustomCodeInScopeForSpec
CustomCodeInScopeForSpec -- No --> Success
CustomCodeInScopeForSpec -- Yes --> Regen[Regen SDK]
Regen --> RegenOK{Regen Successfully?}
RegenOK -- Yes --> Build[Build SDK]
RegenOK -- No --> AppendRegenFailure["Append Regen Failure
to Customization Request"]
AppendRegenFailure --> M{has more customization request?}
Build --> BuildOK{Build Successful?}
BuildOK -- No --> AppendBuildFailure["Append Build Failure
to Customization Request"]
AppendBuildFailure --> M
BuildOK -- Yes --> M
M -- No --> Success
M -- Yes --> Classify

Success[Success
Return change summary]
Failure[Failure
Return manual guidance]
CustomCodeInScope{CustomCode
in Scope?}
CustomCodeInScopeForSpec{CustomCode
in Scope?}

style Entry fill:#fff9c4
style Classify fill:#e1f5fe
style Success fill:#c8e6c9
style Failure fill:#ffcdd2
style CodeCustomization fill:#ffccbc
style ApplyTypespecCustomization fill:#ffccbc
style Regen fill:#ffe082
style Build fill:#ffe082
style BuildAfterCodeCustomization fill:#ffe082

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.