Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
b775577
Copy files from stable/2025-04-01
Mar 25, 2025
4a42de3
Update version to preview/2025-05-01-preview
Mar 25, 2025
1ecb59f
Added tag for 2025-05-01-preview in readme file
Mar 25, 2025
2b47198
Adding format to DiscountPercentage definition (#33456)
ryanmaley310 Mar 25, 2025
040184c
Set pipeline variables used to create SDK PR and refactored loading e…
raych1 Mar 25, 2025
28780ce
Update OperationResults to be location-based in 2024-09-01 (#33035)
minhsuanlee Mar 25, 2025
215c8b0
Revert "New release version stable/2025-03-01 for Microsoft.CostManag…
csurf987 Mar 25, 2025
77c92c8
Microsoft.quota create 2025-03-15-preview version (#33228)
yuxiz1993 Mar 25, 2025
c1be348
Users/curiekim/add 2025 03 01 preview databricks (#32478)
curiekim00 Mar 25, 2025
a8bfa4e
Sync eng/common directory with azure-sdk-tools for PR 10129 (#33486)
azure-sdk Mar 25, 2025
1f5caf4
include no-cluster example
Mar 25, 2025
b5838c4
Add option to create self contained test resources post script (#33366)
azure-sdk Mar 26, 2025
d027cd4
[Az.DataProtection] New ADLS backup parameter (#32616)
IannGeorges Mar 26, 2025
5b080a1
[.github] Add dep for json schema ref parsing (#33494)
mikeharder Mar 26, 2025
bdb83be
[python] switch package-name -> namespace (#32282)
iscai-msft Mar 26, 2025
45924e4
Try to remove hierchyClient configs for typespec-ts in tspconfig (#33…
kazrael2119 Mar 26, 2025
bf75a58
update descriptions
Mar 26, 2025
a216fca
Added retirement banner (#33450)
stevemunk Mar 26, 2025
07e9b41
change empty obj to record<unknown>, sdk regenartion works better thi…
adityareddy305 Mar 26, 2025
3eeb0b3
Split Create and Update examples, because of different clusteringPoli…
Mar 26, 2025
883abbe
Fix enum divergence (#33422)
grizzlytheodore Mar 26, 2025
dcb76e1
[github] Add "cwd" (current working directory) to options bags (#33520)
mikeharder Mar 26, 2025
02a8f54
Import Az powershell module in self contained post script task (#33521)
azure-sdk Mar 26, 2025
6f482f8
Bump @azure-tools/typespec-client-generator-cli (#33491)
dependabot[bot] Mar 27, 2025
0c62aba
Update the Route document to improve the appearance of the overview p…
koyasu221b Mar 27, 2025
e0fa63c
add refs to example
Mar 27, 2025
271494c
Merge pull request #1 from chithams/users/sichitha/no-cluster-examples
koderjoker Mar 27, 2025
34cec47
Support new parameters in pipeline (#33488)
raych1 Mar 27, 2025
bf8a7b6
[.github] Move GITHUB_WORKSPACE into workflows folder (#33528)
mikeharder Mar 27, 2025
2533974
[lint-diff] Only import necessary shared JS files (#33545)
mikeharder Mar 27, 2025
5bf91e9
Skip Publish step if artifact folder variable is not set (#33526)
chidozieononiwu Mar 27, 2025
def415c
Sync eng/common directory with azure-sdk-tools for PR 10004 (#33552)
azure-sdk Mar 28, 2025
988baa3
Sync eng/common directory with azure-sdk-tools for PR 10145 (#33541)
azure-sdk Mar 28, 2025
bf8e942
changed links to point to 'latest' zone pivot in coverage articles in…
stevemunk Mar 28, 2025
763a27e
Bump @azure-tools/spec-gen-sdk from 0.3.1 to 0.3.2 (#33555)
dependabot[bot] Mar 28, 2025
95a0044
update tspconfig (#33557)
v-jiaodi Mar 28, 2025
7c1e8a2
update tspconfig with kebab case style option (#33498)
v-jiaodi Mar 28, 2025
944ab0e
[Microsoft.AzureStackHCI/StackHCI] Public Preview API Version: 2025-0…
priyjain358 Mar 28, 2025
abb96ea
Add ListSkusForScaling API and make the Database.Flush request optional
marianor Mar 28, 2025
fe98314
Updated PR trigger for spec-gen-sdk pipeline (#33539)
raych1 Mar 28, 2025
4b03f0b
[CDN] Add new api version 2025-04-15 (#33163)
ChenglongLiu Mar 28, 2025
0d4b5ed
Address PR comments
marianor Mar 28, 2025
6b5e0e6
Update Spec Gen SDK template (#33556)
chidozieononiwu Mar 28, 2025
dabb59f
Updated the retirement banner to point to the latest version of the R…
stevemunk Mar 29, 2025
5a46b9a
Review request for Microsoft.ContainerService/aks to add version prev…
FumingZhang Mar 31, 2025
1526753
java, weightsandbiases, tspconfig (#33578)
weidongxu-microsoft Mar 31, 2025
0061b8c
Merge pull request #2 from marianor/maro/add-new-apis
koderjoker Mar 31, 2025
45dc6ae
Pushing armchanges to public repo (#32533)
deepakmauryams Mar 31, 2025
edfe576
Update JS configs for March release (#33177)
kazrael2119 Mar 31, 2025
cac5874
Update tspconfig.yaml (#32930)
koen-mertens Mar 31, 2025
1b47f62
[weightsandbiases & arizeaiobservabilityeval] update service-dir for …
ChenxiJiang333 Mar 31, 2025
0f3cc9e
Fix spellcheck and formatting issues
Mar 31, 2025
e3c67b6
Merge branch 'main' into release-redisenterprise-Microsoft.Cache-2025…
koderjoker Mar 31, 2025
933d73c
Fix name in the response of list skus for scaling
marianor Mar 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
42 changes: 37 additions & 5 deletions .github/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions .github/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{
"type": "module",
"_comments": {
"dependencies": "Runtime dependencies must be kept to an absolute minimum for performance, ideally with no transitive dependencies"
},
"dependencies": {
"marked": "^15.0.7",
"yaml": "^2.7.0"
"@apidevtools/json-schema-ref-parser": "^11.9.3",
"js-yaml": "^4.1.0",
"marked": "^15.0.7"
},
"devDependencies": {
"@eslint/js": "^9.22.0",
"@octokit/webhooks-types": "^7.5.1",
"@tsconfig/node20": "^20.1.4",
"@types/github-script": "github:actions/github-script",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.0.0",
"@vitest/coverage-v8": "^3.0.7",
"eslint": "^9.22.0",
Expand Down
15 changes: 11 additions & 4 deletions .github/src/changed-files.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
// @ts-check

import { diff } from "./git.js";

/**
* @param {Object} [options]
* @param {string} [options.baseCommitish] Defaults to "HEAD^"
* @param {string} [options.headCommitish] Defaults to "HEAD"
* @param {string} [options.baseCommitish] Default: "HEAD^".
* @param {string} [options.cwd] Current working directory. Default: process.cwd().
* @param {string} [options.headCommitish] Default: "HEAD".
* @param {import('./types.js').ILogger} [options.logger]
* @returns {Promise<string[]>} List of changed files, relative to the repo root. Example: ["specification/foo/Microsoft.Foo/main.tsp"]
* @returns {Promise<string[]>} List of changed files, using posix paths, relative to options.cwd. Example: ["specification/foo/Microsoft.Foo/main.tsp"].
*/
export async function getChangedFiles(options = {}) {
const { baseCommitish = "HEAD^", headCommitish = "HEAD", logger } = options;
const {
baseCommitish = "HEAD^",
cwd,
headCommitish = "HEAD",
logger,
} = options;

// TODO: If we need to filter based on status, instead of passing an argument to `--diff-filter,
// consider using "--name-status" instead of "--name-only", and return an array of objects like
Expand All @@ -19,6 +25,7 @@
// filter based on status with a single call to `git diff`.
const result = await diff(baseCommitish, headCommitish, {
args: "--name-only",
cwd,
logger: logger,
});

Expand Down
23 changes: 13 additions & 10 deletions .github/src/exec.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
// @ts-check

import child_process from "child_process";
import { promisify } from "util";
const exec = promisify(child_process.exec);
const execImpl = promisify(child_process.exec);

/**
* @param {string} command
* @param {Object} [options]
* @param {string} [options.cwd] Current working directory. Default: process.cwd().
* @param {import('./types.js').ILogger} [options.logger]
* @param {number} [options.maxBuffer]
*/
export async function execRoot(command, options = {}) {
// Node default is 1024 * 1024, which is too small for some git commands returning many entities or large file content.
// To support "git show", should be larger than the largest swagger file in the repo (2.5 MB as of 2/28/2025).
const defaultMaxBuffer = 16 * 1024 * 1024;
export async function exec(command, options = {}) {
const {
cwd,
logger,
// Node default is 1024 * 1024, which is too small for some git commands returning many entities or large file content.
// To support "git show", should be larger than the largest swagger file in the repo (2.5 MB as of 2/28/2025).
maxBuffer = 16 * 1024 * 1024,
} = options;

const { logger, maxBuffer = defaultMaxBuffer } = options;

logger?.info(`execRoot("${command}")`);
logger?.info(`exec("${command}")`);

// TODO: Handle errors
const result = await exec(command, {
cwd: process.env.GITHUB_WORKSPACE,
const result = await execImpl(command, {
cwd,
maxBuffer,
});

Expand Down
28 changes: 15 additions & 13 deletions .github/src/git.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @ts-check

import { buildCmd, execRoot } from "./exec.js";
import { buildCmd, exec } from "./exec.js";

/**
* @typedef {import('./types.js').ILogger} ILogger
Expand All @@ -11,64 +11,66 @@
* @param {string} headCommitish
* @param {Object} [options]
* @param {string} [options.args]
* @param {string} [options.cwd] Current working directory. Default: process.cwd().
* @param {ILogger} [options.logger]
* @returns {Promise<string>}
*/
export async function diff(baseCommitish, headCommitish, options = {}) {
const { args, logger } = options;
const { args, cwd, logger } = options;

const cmd = buildCmd("diff", args, baseCommitish, headCommitish);

return await execGit(cmd, {
logger: logger,
});
return await execGit(cmd, { cwd, logger });
}

/**
* @param {string} treeIsh
* @param {string} path
* @param {Object} [options]
* @param {string} [options.args]
* @param {string} [options.cwd] Current working directory. Default process.cwd().
* @param {ILogger} [options.logger]
* @returns {Promise<string>}
*/
export async function lsTree(treeIsh, path, options = {}) {
const { args, logger } = options;
const { args, cwd, logger } = options;

const cmd = buildCmd("ls-tree", args, treeIsh, path);

return await execGit(cmd, {
logger: logger,
});
return await execGit(cmd, { cwd, logger });
}

/**
* @param {string} treeIsh
* @param {string} path
* @param {Object} [options]
* @param {string} [options.args]
* @param {string} [options.cwd] Current working directory. Default: process.cwd().
* @param {ILogger} [options.logger]
* @returns {Promise<string>}
*/
export async function show(treeIsh, path, options = {}) {
const { args, logger } = options;
const { args, cwd, logger } = options;

const cmd = buildCmd("show", args, `${treeIsh}:${path}`);

return await execGit(cmd, { logger: logger });
return await execGit(cmd, { cwd, logger });
}

/**
* @param {string} args
* @param {Object} [options]
* @param {string} [options.cwd] Current working directory. Default: process.cwd().
* @param {ILogger} [options.logger]
* @returns {Promise<string>}
*/
async function execGit(args, options) {
async function execGit(args, options = {}) {
const { cwd, logger } = options;

// Ensure that git displays filenames as they are (without escaping)
const defaultConfig = "-c core.quotepath=off";

const cmd = buildCmd("git", defaultConfig, args);

return await execRoot(cmd, options);
return await exec(cmd, { cwd, logger });
}
4 changes: 2 additions & 2 deletions .github/src/readme.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-check

import yaml from "js-yaml";
import { marked } from "marked";
import yaml from "yaml";

/**
* @param {string} markdown
Expand All @@ -24,7 +24,7 @@
const tag =
block.lang?.match(/yaml \$\(tag\) == '([^']*)'/)?.[1] || "default";

const obj = yaml.parse(block.text);
const obj = /** @type {any} */ (yaml.load(block.text));
const blockFiles = /** @type string[] */ (obj["input-file"] || []);

logger?.info(`Input files for tag '${tag}': ${JSON.stringify(blockFiles)}`);
Expand Down
18 changes: 9 additions & 9 deletions .github/test/exec.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { EOL } from "os";
import { describe, expect, it } from "vitest";
import { buildCmd, execRoot } from "../src/exec.js";
import { buildCmd, exec } from "../src/exec.js";
import { createMockLogger } from "./mocks.js";

describe("exec", () => {
Expand All @@ -9,21 +9,21 @@
const expected = `${str}${EOL}`;

it.each([{}, { logger: createMockLogger() }])(
"execRoot succeeds with default buffer (options: %o)",
"exec succeeds with default buffer (options: %o)",
async (options) => {
await expect(execRoot(cmd, options)).resolves.toEqual(expected);
await expect(exec(cmd, options)).resolves.toEqual(expected);
},
);

it("execRoot succeeds with exact-sized buffer", async () => {
await expect(
execRoot(cmd, { maxBuffer: expected.length }),
).resolves.toEqual(expected);
it("exec succeeds with exact-sized buffer", async () => {
await expect(exec(cmd, { maxBuffer: expected.length })).resolves.toEqual(
expected,
);
});

it("execRoot fails with too-small buffer", async () => {
it("exec fails with too-small buffer", async () => {
await expect(
execRoot(cmd, { maxBuffer: expected.length - 1 }),
exec(cmd, { maxBuffer: expected.length - 1 }),
).rejects.toThrowError(
expect.objectContaining({ code: "ERR_CHILD_PROCESS_STDIO_MAXBUFFER" }),
);
Expand Down
18 changes: 6 additions & 12 deletions .github/test/git.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// @ts-check

import { describe, expect, it, vi } from "vitest";
Expand Down Expand Up @@ -28,43 +28,37 @@

describe("mocked", () => {
it("diff", async () => {
const execRootSpy = vi
.spyOn(exec, "execRoot")
.mockResolvedValue("test diff");
const execSpy = vi.spyOn(exec, "exec").mockResolvedValue("test diff");

await expect(diff("HEAD^", "HEAD")).resolves.toBe("test diff");

expect(execRootSpy).toBeCalledWith(
expect(execSpy).toBeCalledWith(
"git -c core.quotepath=off diff HEAD^ HEAD",
expect.anything(),
);
});

it("lsTree", async () => {
const execRootSpy = vi
.spyOn(exec, "execRoot")
.mockResolvedValue("test lstree");
const execSpy = vi.spyOn(exec, "exec").mockResolvedValue("test lstree");

await expect(
lsTree("HEAD", "specification/contosowidgetmanager"),
).resolves.toBe("test lstree");

expect(execRootSpy).toBeCalledWith(
expect(execSpy).toBeCalledWith(
"git -c core.quotepath=off ls-tree HEAD specification/contosowidgetmanager",
expect.anything(),
);
});

it("show", async () => {
const execRootSpy = vi
.spyOn(exec, "execRoot")
.mockResolvedValue("test show");
const execSpy = vi.spyOn(exec, "exec").mockResolvedValue("test show");

await expect(
show("HEAD", "specification/contosowidgetmanager/cspell.yaml"),
).resolves.toBe("test show");

expect(execRootSpy).toBeCalledWith(
expect(execSpy).toBeCalledWith(
"git -c core.quotepath=off show HEAD:specification/contosowidgetmanager/cspell.yaml",
expect.anything(),
);
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/src/arm-incremental-typespec.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// @ts-check

// For now, treat all paths as posix, since this is the format returned from git commands
Expand All @@ -18,7 +18,10 @@
* @returns {Promise<boolean>}
*/
export default async function incrementalTypeSpec({ core }) {
const options = { logger: new CoreLogger(core) };
const options = {
cwd: process.env.GITHUB_WORKSPACE,
logger: new CoreLogger(core),
};

const changedFiles = await getChangedFiles(options);

Expand Down
Loading
Loading