Skip to content

Commit

Permalink
Merge pull request #2670 from microsoft/bugfix/flaky-nodes
Browse files Browse the repository at this point in the history
bugfix/flaky nodes
  • Loading branch information
baywet authored May 17, 2023
2 parents 6e9ec1e + 56a09fa commit a324277
Show file tree
Hide file tree
Showing 18 changed files with 84 additions and 43 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

## [1.2.1] - 2023-05-16

### Changed

- Fixed a bug where Operation filters would be greedy and exclude non operation filters. [#2651](https://github.com/microsoft/kiota/issues/2651)
- Shorten Go File names to a max of 252
- Fixed a bug where clean output option would fail because of the log file. [#2645](https://github.com/microsoft/kiota/issues/2645)
- Fixed a bug in the extension where selection in multiple indexers would fail. [#2666](https://github.com/microsoft/kiota/issues/2666)

## [1.2.0] - 2023-05-04

Expand Down
6 changes: 5 additions & 1 deletion src/Kiota.Builder/Kiota.Builder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<Title>Microsoft.OpenApi.Kiota.Builder</Title>
<PackageId>Microsoft.OpenApi.Kiota.Builder</PackageId>
<PackageOutputPath>./nupkg</PackageOutputPath>
<Version>1.2.0</Version>
<Version>1.2.1</Version>
<PackageReleaseNotes>
https://github.com/microsoft/kiota/releases
</PackageReleaseNotes>
Expand All @@ -28,6 +28,10 @@
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>

<PropertyGroup><!-- the source generators emmit warnings -->
<NoWarn>$(NoWarn);CS8785</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="DotNet.Glob" Version="3.1.3" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
Expand Down
20 changes: 10 additions & 10 deletions src/Kiota.Web/wwwroot/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,27 +111,27 @@
"Dependencies": [
{
"Name": "@microsoft/kiota-abstractions",
"Version": "1.0.0-preview.16"
"Version": "1.0.0-preview.18"
},
{
"Name": "@microsoft/kiota-http-fetchlibrary",
"Version": "1.0.0-preview.15"
"Version": "1.0.0-preview.17"
},
{
"Name": "@microsoft/kiota-serialization-form",
"Version": "1.0.0-preview.6"
"Version": "1.0.0-preview.7"
},
{
"Name": "@microsoft/kiota-serialization-json",
"Version": "1.0.0-preview.15"
"Version": "1.0.0-preview.16"
},
{
"Name": "@microsoft/kiota-authentication-azure",
"Version": "1.0.0-preview.12"
"Version": "1.0.0-preview.13"
},
{
"Name": "@microsoft/kiota-serialization-text",
"Version": "1.0.0-preview.14"
"Version": "1.0.0-preview.15"
}
],
"DependencyInstallCommand": "npm install {0}@{1} -S"
Expand All @@ -141,11 +141,11 @@
"Dependencies": [
{
"Name": "microsoft/kiota-abstractions",
"Version": "0.6.5"
"Version": "0.6.7"
},
{
"Name": "microsoft/kiota-http-guzzle",
"Version": "0.6.2"
"Version": "0.6.3"
},
{
"Name": "microsoft/kiota-serialization-json",
Expand All @@ -171,11 +171,11 @@
},
{
"Name": "microsoft-kiota-http",
"Version": "0.4.1"
"Version": "0.4.3"
},
{
"Name": "microsoft-kiota-serialization-json",
"Version": "0.3.2"
"Version": "0.3.3"
},
{
"Name": "microsoft-kiota-authentication-azure",
Expand Down
20 changes: 10 additions & 10 deletions src/kiota/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,27 +111,27 @@
"Dependencies": [
{
"Name": "@microsoft/kiota-abstractions",
"Version": "1.0.0-preview.16"
"Version": "1.0.0-preview.18"
},
{
"Name": "@microsoft/kiota-http-fetchlibrary",
"Version": "1.0.0-preview.15"
"Version": "1.0.0-preview.17"
},
{
"Name": "@microsoft/kiota-serialization-form",
"Version": "1.0.0-preview.6"
"Version": "1.0.0-preview.7"
},
{
"Name": "@microsoft/kiota-serialization-json",
"Version": "1.0.0-preview.15"
"Version": "1.0.0-preview.16"
},
{
"Name": "@microsoft/kiota-authentication-azure",
"Version": "1.0.0-preview.12"
"Version": "1.0.0-preview.13"
},
{
"Name": "@microsoft/kiota-serialization-text",
"Version": "1.0.0-preview.14"
"Version": "1.0.0-preview.15"
}
],
"DependencyInstallCommand": "npm install {0}@{1} -S"
Expand All @@ -141,11 +141,11 @@
"Dependencies": [
{
"Name": "microsoft/kiota-abstractions",
"Version": "0.6.5"
"Version": "0.6.7"
},
{
"Name": "microsoft/kiota-http-guzzle",
"Version": "0.6.2"
"Version": "0.6.3"
},
{
"Name": "microsoft/kiota-serialization-json",
Expand All @@ -171,11 +171,11 @@
},
{
"Name": "microsoft-kiota-http",
"Version": "0.4.1"
"Version": "0.4.3"
},
{
"Name": "microsoft-kiota-serialization-json",
"Version": "0.3.2"
"Version": "0.3.3"
},
{
"Name": "microsoft-kiota-authentication-azure",
Expand Down
6 changes: 5 additions & 1 deletion src/kiota/kiota.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<Title>Microsoft.OpenApi.Kiota</Title>
<PackageId>Microsoft.OpenApi.Kiota</PackageId>
<PackageOutputPath>./nupkg</PackageOutputPath>
<Version>1.2.0</Version>
<Version>1.2.1</Version>
<PackageReleaseNotes>
https://github.com/microsoft/kiota/releases
</PackageReleaseNotes>
Expand All @@ -29,6 +29,10 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup><!-- the source generators emmit warnings -->
<NoWarn>$(NoWarn);CS8785</NoWarn>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Kiota.Builder\Kiota.Builder.csproj" />
</ItemGroup>
Expand Down
7 changes: 5 additions & 2 deletions vscode/microsoft-kiota/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@
"dist": true // set this to false to include "dist" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
"typescript.tsc.autoDetect": "off",
"cSpell.words": [
"Kiota"
]
}
3 changes: 2 additions & 1 deletion vscode/microsoft-kiota/l10n/bundle.l10n.ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@
"Pick a lock file": "اختر ملف قفل",
"Open a lock file": "افتح ملف قفل",
"Filter the API description": "قم بتصفية وصف API",
"Enter a filter": "أدخل عامل التصفية"
"Enter a filter": "أدخل عامل التصفية",
"Searching...": "جاري البحث..."
}
3 changes: 2 additions & 1 deletion vscode/microsoft-kiota/l10n/bundle.l10n.es.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@
"Pick a lock file": "Seleccionar un archivo lock",
"Open a lock file": "Abrir un archivo lock",
"Filter the API description": "Filtrar descripción de API",
"Enter a filter": "Ingresar un filtro"
"Enter a filter": "Ingresar un filtro",
"Searching...": "Buscando..."
}
3 changes: 2 additions & 1 deletion vscode/microsoft-kiota/l10n/bundle.l10n.fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@
"Pick a lock file": "Sélectionnez un fichier verrou",
"Open a lock file": "Ouvrir un fichier verrou",
"Filter the API description": "Filtrer la description d'API",
"Enter a filter": "Entrez un filtre"
"Enter a filter": "Entrez un filtre",
"Searching...": "Recherche en cours..."
}
3 changes: 2 additions & 1 deletion vscode/microsoft-kiota/l10n/bundle.l10n.pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@
"Pick a lock file": "Selecionar um arquivo lock",
"Open a lock file": "Abrir um arquivo lock",
"Filter the API description": "Filtrar descrição da API",
"Enter a filter": "Adicionar um filtro"
"Enter a filter": "Adicionar um filtro",
"Searching...": "Buscando..."
}
3 changes: 2 additions & 1 deletion vscode/microsoft-kiota/l10n/bundle.l10n.ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@
"Pick a lock file": "Выбрать файл блокировки",
"Open a lock file": "Открыть файл блокировки",
"Filter the API description": "Отфильтровать описание API",
"Enter a filter": "Ввести фильтр"
"Enter a filter": "Ввести фильтр",
"Searching...": "Поиск..."
}
3 changes: 2 additions & 1 deletion vscode/microsoft-kiota/l10n/bundle.l10n.sw.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@
"Pick a lock file": "Chagua faili ya kufunga",
"Open a lock file": "Fungua faili ya kufunga",
"Filter the API description": "Chuja maelezo ya API",
"Enter a filter": "Ingiza kichujio"
"Enter a filter": "Ingiza kichujio",
"Searching...": "Inatafuta..."
}
3 changes: 2 additions & 1 deletion vscode/microsoft-kiota/l10n/bundle.l10n.zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@
"Pick a lock file": "请选择一个锁定文件",
"Open a lock file": "请打开一个锁定文件",
"Filter the API description": "筛选API描述",
"Enter a filter": "输入一个筛选项"
"Enter a filter": "输入一个筛选项",
"Searching...": "搜索中..."
}
2 changes: 1 addition & 1 deletion vscode/microsoft-kiota/package-lock.json

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

14 changes: 7 additions & 7 deletions vscode/microsoft-kiota/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Microsoft Kiota",
"publisher": "ms-graph",
"description": "Client generator for HTTP REST APIs described by OpenAPI which helps eliminate the need to take a dependency on a different API client for every API that you need to call, as well as limiting the generation to the exact API surface area you're interested in, thanks to a filtering capability.",
"version": "1.1.3",
"version": "1.2.0",
"icon": "images/logo.png",
"engines": {
"vscode": "^1.78.0"
Expand All @@ -21,7 +21,7 @@
"main": "./dist/extension.js",
"l10n": "./l10n",
"contributes": {
"viewsWelcome":[
"viewsWelcome": [
{
"view": "kiota.openApiExplorer",
"contents": "%kiota.openApiExplorer.welcome%"
Expand Down Expand Up @@ -271,23 +271,23 @@
"runtimeDependencies": [
{
"platformId": "win-x64",
"sha256": "46FD2CFA88340AF8A9DED5BD2643DA7A4E28FEDC5C4FFC9A2414041027DB288B"
"sha256": "CAF3532A21568481A730E62475E683BC30AA596BB47284AD42F395D6AE898D79"
},
{
"platformId": "win-x86",
"sha256": "FCE85F9310967728431461C0DDD6864041EA262081930494F8D4B8A3B7C180C9"
"sha256": "E3205AA7FEDF868746EB5165098D12843E29367D0E43A6B397AEDCF9A024CF55"
},
{
"platformId": "linux-x64",
"sha256": "6E6763B7D855F43B8C6F4659C13C4D3E9EB085B60A0806E9B6B18BEE828CF2CC"
"sha256": "9261D5F803862B01D9777B74D59D446899AD54C5644B6F04772F067A4DBB2842"
},
{
"platformId": "osx-x64",
"sha256": "6266A2E02247461EB8C4B7FF0EA45E34DDC6AF05490D5CA26F838DE73D984ACA"
"sha256": "6DCCF6D6239A80029F8363E0664155306764E3E865CC288FDABD99C9CD27C500"
},
{
"platformId": "osx-arm64",
"sha256": "909D2888AD236EE4D7B7A30D09C73C30C0B9957643FB71CC3C77DB66E9B7C11C"
"sha256": "2FD7BE327786962B53D3CDDD7D9C0CFE4B7D608E9B8ED4D3D3342A8DD8DDE62A"
}
]
}
8 changes: 7 additions & 1 deletion vscode/microsoft-kiota/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,13 @@ export async function activate(
vscode.commands.registerCommand(
`${extensionId}.searchApiDescription`,
async () => {
const config = await searchSteps(x => searchDescription(context, x));
const config = await searchSteps(x => vscode.window.withProgress({
location: vscode.ProgressLocation.Notification,
cancellable: false,
title: vscode.l10n.t("Searching...")
}, (progress, _) => {
return searchDescription(context, x);
}));
if (config.descriptionPath) {
await openApiTreeProvider.setDescriptionUrl(config.descriptionPath);
await vscode.commands.executeCommand(`${treeViewId}${focusCommandId}`);
Expand Down
16 changes: 14 additions & 2 deletions vscode/microsoft-kiota/src/openApiTreeProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,13 @@ export class OpenApiTreeProvider implements vscode.TreeDataProvider<OpenApiTreeN
public async setDescriptionUrl(descriptionUrl: string): Promise<void> {
this.closeDescription(false);
this._descriptionUrl = descriptionUrl;
await this.loadNodes();
await vscode.window.withProgress({
location: vscode.ProgressLocation.Notification,
cancellable: false,
title: vscode.l10n.t("Loading...")
}, (progress, _) => {
return this.loadNodes();
});
this.refreshView();
}
public get descriptionUrl(): string {
Expand Down Expand Up @@ -110,9 +116,15 @@ export class OpenApiTreeProvider implements vscode.TreeDataProvider<OpenApiTreeN
}
const segment = segments.shift();
if (segment) {
const child = currentNode.children.find(x => x.segment === segment);
let child = currentNode.children.find(x => x.segment === segment);
if (child) {
return this.findApiNode(segments, child);
} else if (segment.startsWith('{') && segment.endsWith('}')) {
// in case there are multiple single parameters nodes with different names at the same level
child = currentNode.children.find(x => x.segment.startsWith('{') && x.segment.endsWith('}'));
if (child) {
return this.findApiNode(segments, child);
}
}
}
return undefined;
Expand Down
2 changes: 1 addition & 1 deletion vscode/microsoft-kiota/src/steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export async function filterSteps(existingFilter: string, filterCallback: (searc
return state;
}

export async function searchSteps(searchCallBack: (searchQuery: string) => Promise<Record<string, KiotaSearchResultItem> | undefined>) {
export async function searchSteps(searchCallBack: (searchQuery: string) => Thenable<Record<string, KiotaSearchResultItem> | undefined>) {
const state = {} as Partial<SearchState>;
const title = l10n.t('Search for an API description');
let step = 1;
Expand Down

0 comments on commit a324277

Please sign in to comment.