Skip to content

Commit 0a14521

Browse files
update skill
1 parent d1fc673 commit 0a14521

File tree

1 file changed

+50
-0
lines changed
  • .github/skills/migrate-sdk-typespec

1 file changed

+50
-0
lines changed

.github/skills/migrate-sdk-typespec/SKILL.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ The "<tsp-project>" would be a relative path to a folder in specs repo. A typica
1818
- For TypeSpec project, only update "client.tsp" file and "tspconfig.yaml" file.
1919
- When updating "client.tsp", always use "java" scope, and add new lines to the end of the file.
2020
- For SDK project, do not modify Java file that contains `// Code generated` in the header comment. These are Java files generated by the emitter from TypeSpec project, and should not be modified by agent individually.
21+
- Run `tsp format <tsp_file>` command, whenever you modify the .tsp file, to make sure the format is correct.
2122

2223
## Required repositories
2324

@@ -104,6 +105,8 @@ in SDK repo root folder.
104105

105106
This script will generate the Java code, and build the Java lib. It may encounter compile error that you need to fix in next step.
106107

108+
PS: this script can take a while to run. If you wait for the command, wait a maximum of 20 minutes.
109+
107110
#### Fix compile error
108111

109112
See [Solve Compile Error](./solve-compile-error.md) for common compile errors and mitigation.
@@ -135,3 +138,50 @@ See [Solve Revapi Error](./solve-revapi-error.md) for mitigation.
135138

136139
When you finished this step, pause and output report on remaining errors.
137140
Use the `git diff` with "main" branch, to provide the details on what you think be the cause of the error.
141+
142+
### Update "CHANGELOG.md"
143+
144+
This step should be invoked by user, not by agent.
145+
146+
Remove all generated content in the section of latest lib version of "CHANGELOG.md" file. Also, update the date to "Unreleased".
147+
148+
Then, add a new "Breaking Changes" sub section in this lib version section. The general items of this would be supplied by user.
149+
150+
```
151+
### Breaking Changes
152+
153+
- Removed `<class>` class. <reason>
154+
- Removed `<method>` method from `<class>` class. <reason>
155+
- Changed `<method>` method to `<new_method>` in class `<class>` class. <reason>
156+
etc.
157+
```
158+
159+
### Create pull request and finalize the sdk lib
160+
161+
This step should be invoked by user, not by agent.
162+
163+
#### Verify filename is consistent on GitHub and on filesystem
164+
165+
Make sure the filename on GitHub is consistent with the filename on filesystem (typical reason is that Windows filename is case-insensitive, but git is case-sensitive). If not, use `git mv` command to rename the file on git to make them consistent.
166+
167+
#### Revert change to "eng/versioning/version_client.txt" file and "sdk/resourcemanager" folder
168+
169+
Checkout the content from "main" branch. We are not releasing the lib, hence no need to update the versions.
170+
171+
Use `git checkout main --no-overlay -- sdk/resourcemanager/azure-resourcemanager` to revert "sdk/resourcemanager" folder.
172+
173+
#### Create pull request on specs repo
174+
175+
Create a draft pull request in specs repo.
176+
177+
#### Update "tsp-location.yaml" file, create pull request on sdk repo
178+
179+
When the pull request on specs repo is ready, get the SHA of the last commit.
180+
181+
Update the "commit" property of the "tsp-location.yaml" file in sdk repo, to make it point to this SHA.
182+
183+
Commit the change, and create a draft pull request in sdk repo.
184+
185+
#### Update "tsp-location.yaml" file the last time
186+
187+
When the pull request on specs repo is merged, update the "commit" property of the "tsp-location.yaml" file in sdk repo to point to the SHA on latest "main" branch of specs repo.

0 commit comments

Comments
 (0)