profile
viewpoint
Brian Terlson bterlson @Microsoft Redmond, WA

bterlson/constant-contact-ruby 10

Interface with the Constant Contact api

bterlson/blimlimb 8

blimLimb, the travelling IRC bot troupe, running on yail

Azure/amqp-common-js 2

Azure AMQP abstractions for javascript/typescript that contains common types and interfaces for use in Service Bus and Event Hubs.

bterlson/autumn 2

Easy, fresh, feature-rich IRC bots in Ruby

bterlson/dm-more 2

Extras for DataMapper, including bridges to DataObjects::Migrations and Merb::DataMapper

bterlson/agendas 0

TC39 meeting agendas

bterlson/amqp-common-js 0

Azure AMQP abstractions for javascript/typescript that contains common types and interfaces for use in Service Bus and Event Hubs.

pull request commentAzure/azure-sdk-for-js

Update runtime dependency "tough-cookie"

Looks good here too. FWIW I trust @xirzec on such matters, but more eyes can't hurt!

mikeharder

comment created time in 17 hours

create barnchbterlson/standards-participation

branch : master

created branch time in 17 hours

created repositorybterlson/standards-participation

Presentation for Participating in Standards presented at DevDiv Developer Days

created time in 17 hours

pull request commentcensus-instrumentation/opencensus-web

Add package.json metadata for ES6 module imports

@ad-m I think a better fix is to update the tsconfig.json module entry to "commonjs" so the package doesn't need ES modules.

ad-m

comment created time in 6 days

push eventAzure/azure-sdk-for-js

Brian Terlson

commit sha 3620781b37646dd2ba2dd86c17df8961718afc9d

Fix overzealous deawaiting

view details

push time in 6 days

pull request commentAzure/azure-sdk-for-js

Move '@opencensus/web-types' as devDependencies

@ad-m, thanks for explaining further. This looks to be an issue with the @opencensus/web-types package.

The @opencensus/web-types/build/src/index.js file is valid JS. The problem is it contains ES6 module imports which you will probably need to configure pkg to understand and only recently landed in Node (you need I think v12 at a minimum).

Additionally, @opencensus/web-types doesn't have the correct package.json metadata to contain ES6 module imports. Probably they need to change their tsconfig to emit cjs modules instead. @xirzec what do you think?

ad-m

comment created time in 6 days

pull request commentAzure/azure-sdk-for-js

Move '@opencensus/web-types' as devDependencies

I believe this should be a regular dependency, not a dev dependency. We are presently producing a type definition file (d.ts) that includes the following imports:

import { Span as OpenCensusSpan } from '@opencensus/web-types';
import { Tracer as OpenCensusTracer } from '@opencensus/web-types';
import { TracerBase } from '@opencensus/web-types';

These types are then referenced by the types for core-tracing. In other words, if @opencensus/web-types moved to a dev dependency, TypeScript users would find necessary type information missing.

ad-m

comment created time in 6 days

pull request commentAzure/azure-sdk-for-js

[storage-blob] clean up container iteration readme

Ok I think I found everything, or close to everything anyway. Please take a look!

bterlson

comment created time in 6 days

push eventAzure/azure-sdk-for-js

Brian Terlson

commit sha f02abba095a9339e70aaa6ec74a8e269aa0b978c

Fix other storage readmes

view details

Brian Terlson

commit sha b6e07cbfd6230a418ccee08eae6102eb0dd7426b

Fix a bunch of needless awaits

view details

push time in 6 days

push eventbterlson/azure-sdk

Jon Gallant

commit sha 72e2b5a0907bbabd1eb46264ed55e312ddbcfca8

add cosmos ga (#1352)

view details

Azure SDK Bot

commit sha aa6bf66a933421388caa8c86b471c0a55df1b175

Update package index with latest published versions (#1348)

view details

Brian Terlson

commit sha 0ccce6761f7b38f0ce9bb99e5370c6a5e5c682d9

Add blog on async iterators

view details

push time in 6 days

PR opened Azure/azure-sdk

Reviewers
Add async iterator blog

I'll continue to noodle on this (generally cleaning things up, adding more realistic samples, and trimming content where I can), but getting this out there for feedback!

+143 -0

0 comment

1 changed file

pr created time in 6 days

create barnchbterlson/azure-sdk

branch : add-async-iterator-blog

created branch time in 6 days

push eventbterlson/azure-sdk

Azure SDK Bot

commit sha eb00c2c7d4844384d6af594d30278854a9740ee3

Update package index with latest published versions (#1318)

view details

Connie Yau

commit sha 95c3246391168ba18d24635fba2dd7a9c4039858

Update Release Notes for Service Bus preview 2 (#1313) * Update Release Notes * Fix header

view details

Adrian Hall

commit sha ffa89e2c62cea1debaa25022faaec3fd878a6721

Added App Insights Instrumentation Key (#1317) Co-authored-by: Adrian Hall <adrian.hall@microsoft.com>

view details

David R. Williamson

commit sha 95c3b8e9ec6939f6a8b2e175f262f5d2db0ccd02

Update documentation for Azure.DigitalTwins namespace (#1320)

view details

Azure SDK Bot

commit sha fe33a252000ff25467770e7d8901f08ea4cdee12

Update package index with latest published versions (#1325)

view details

Alan Zimmer

commit sha ff0a4d06da14c5225b92f59554a8f1752be3f6bc

Add language release owners as /release CODEOWNERS (#1324)

view details

Jianghao Lu

commit sha dc052c2f5240c3f0249208837a9a536d6eb750f7

Add initial draft for 20200512 blog - New Azure Identity Features (#1277) * Add initial draft for 20200512 blog - New Azure Identity Features * Add title * Add IntelliJCredential instructsions for Windows * Address feedback * KeyPass -> KeePass * Address Adrian's feedback * Typo * Combine sentences * Added prelude to release blog * Per czubair updates * Remove logging * Fixed May 2020 releases folder * Fixes for language Co-authored-by: Adrian Hall <adrian.hall@microsoft.com>

view details

Xiang Yan

commit sha 4fac887bbee45d2cb96fe64096cfe3b1d8cd588d

add python link (#1256) * add python link * Update docs/policies/README-TEMPLATE.md Co-Authored-By: Jeremy Meng <jeremy.ymeng@gmail.com> * Update docs/policies/README-TEMPLATE.md Co-Authored-By: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com> * Update README-TEMPLATE.md Co-authored-by: Jeremy Meng <jeremy.ymeng@gmail.com> Co-authored-by: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com>

view details

Sima Zhu

commit sha c77eb74430d5d34dba8d971dd20b8b7ed0248168

Update search change log release notes (#1321)

view details

Xiang Yan

commit sha e9f3cd5803ed0ea47988a2f0914a0d0b58dbc823

formatting (#1327) * formatting * Update README-TEMPLATE.md

view details

Sameeksha Vaity

commit sha e467ad7987841ffde909dbf7d2722487b5da1cf5

Update release notes for Form Recognizer beta 2 (#1326)

view details

Azure SDK Bot

commit sha d56e4d2aa7dabd237ca59ec88e07fd4ec06695f1

Update package index with latest published versions (#1328)

view details

Srikanta

commit sha c4fbb602f597a22131dc49ec1ede6dec995876c8

Release notes for Event Hubs (#1331)

view details

vcolin7

commit sha 208c48fcdd28e98d7beb2f3aab12be42a85e27be

Updated Java README for the KeyVault May 2020 release. (#1330)

view details

Vinay Gera

commit sha 203f23e23dfc6d47373269ab0c7812cc7f2f493f

update java identity release notes (#1334)

view details

Azure SDK Bot

commit sha d9edb7fe5d6c5ce4a4cf400b9dcf0e275d51bda4

Update package index with latest published versions (#1336)

view details

Azure SDK Bot

commit sha c7730ce4f73edd483938a641071c3899fcb7af8e

Update package index with latest published versions (#1338)

view details

Brian Terlson

commit sha fe77349debec78e90411fcfa4b11a3452f051c25

[JS/TS] We use begin for lro (#1319)

view details

Azure SDK Bot

commit sha 7f8b7b761e77f4f3d010ce6700855ea648876ccc

Update package index with latest published versions (#1339)

view details

Jon Gallant

commit sha 0ca29b6dbb1f36979b20108a5f445435d4501aac

Add contributing guide (#1316)

view details

push time in 6 days

PR opened Azure/azure-sdk-for-js

Reviewers
[storage-blob] clean up container iteration readme

The async iterator is returned synchronously, so no need for the await.

+2 -2

0 comment

1 changed file

pr created time in 6 days

create barnchAzure/azure-sdk-for-js

branch : bterlson-patch-1

created branch time in 6 days

Pull request review commentAzure/azure-sdk-for-js

[ai-text-analytics] Changes for service GA, SDK preview.5

 export interface RecognizeLinkedEntitiesSuccessResult extends TextAnalyticsSucce // @public export interface SentenceSentiment {     confidenceScores: SentimentConfidenceScores;-    graphemeLength: number;-    graphemeOffset: number;     sentiment: SentenceSentimentLabel;-    warnings?: string[];+    text?: string;

👍

willmtemple

comment created time in 8 days

Pull request review commentAzure/azure-sdk-for-js

[ai-text-analytics] Changes for service GA, SDK preview.5

 export interface DocumentError {   error: TextAnalyticsError; } +/**+ * An interface representing TextAnalyticsWarning.+ */+export interface TextAnalyticsWarning {+  /**+   * Error code. Possible values include: 'LongWordsInDocument', 'DocumentTruncated'+   */+  code: WarningCode;+  /**+   * Warning message.+   */+  message: string;+  /**+   * A JSON pointer reference indicating the target object.
   * An RFC 6901 JSON pointer indicating the target object.

"Reference" seems a bit confusing, and seems good to call out the relevant spec.

willmtemple

comment created time in 8 days

Pull request review commentAzure/azure-sdk-for-js

[ai-text-analytics] Changes for service GA, SDK preview.5

 export interface RecognizeLinkedEntitiesSuccessResult extends TextAnalyticsSucce // @public export interface SentenceSentiment {     confidenceScores: SentimentConfidenceScores;-    graphemeLength: number;-    graphemeOffset: number;     sentiment: SentenceSentimentLabel;-    warnings?: string[];+    text?: string;

When is text omitted from this type?

willmtemple

comment created time in 8 days

Pull request review commentAzure/azure-sdk-for-js

storage-internal-avro parser

+export interface Metadata {+  /**+   * A name-value pair.+   */+  [propertyName: string]: string;+}++export interface Dictionary<T> {

Could be type Dictionary<T> = Record<string, T>, although not sure the alias offers much (same as above).

ljian3377

comment created time in 8 days

Pull request review commentAzure/azure-sdk-for-js

storage-internal-avro parser

+export interface Metadata {

This is Record<string, string>

ljian3377

comment created time in 8 days

Pull request review commentAzure/azure-sdk-for-js

storage-internal-avro parser

+export abstract class IReadable {

Drop the I prefix too, it's not a TypeScript convention. AvroReadable seems good to me!

ljian3377

comment created time in 8 days

pull request commentAzure/azure-sdk-for-js

storage-internal-avro parser

Since this is just sharing source code, probably all of the top level files to support e.g. rollup, package.json, etc. should be removed. Package.json especially, as otherwise you could be satisfying dependencies by installing them in the node_modules of the "virtual" package, and since users won't have that package, the dependencies will be missing. When using the shared source approach, any dependencies have to be declared by thew packages importing them.

ljian3377

comment created time in 8 days

Pull request review commentAzure/azure-sdk-for-js

Update to TypeScript 3.9

 export function padStart(   targetLength: number,   padString: string = " " ): string {+  // TS doesn't know this code needs to run downlevel sometimes.

I find this change unexpected (TS3.8 should complain as much) but it should complain and so having the expect error is good.

xirzec

comment created time in 8 days

Pull request review commentAzure/azure-sdk-for-js

[Storage,Doc] Add additional info on bundling for IE11

 There are differences between Node.js and browsers runtime. When getting started  ### JavaScript Bundle -To use this client library in the browser, you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).+To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).++#### Special bundling notes for IE11++Currently only `Parcel` and `Rollup` work well with Storage client libraries.++If `Parcel` is used  then no further work is needed. Otherwise, an additional step is needed to transform the bundled output to the format that IE11 supports:
If `Parcel` is used  then no further work is needed. If using Rollup, an additional step is needed to transform the bundled output to the format that IE11 supports.
jeremymeng

comment created time in 8 days

Pull request review commentAzure/azure-sdk-for-js

[Storage,Doc] Add additional info on bundling for IE11

 There are differences between Node.js and browsers runtime. When getting started  ### JavaScript Bundle -To use this client library in the browser, you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).+To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).++#### Special bundling notes for IE11++Currently only `Parcel` and `Rollup` work well with Storage client libraries.
Currently only `Parcel` and `Rollup` work well with Storage client libraries for IE11.
jeremymeng

comment created time in 8 days

Pull request review commentAzure/azure-sdk-for-js

[Storage,Doc] Add additional info on bundling for IE11

 There are differences between Node.js and browsers runtime. When getting started  ### JavaScript Bundle -To use this client library in the browser, you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).+To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).++#### Special bundling notes for IE11++Currently only `Parcel` and `Rollup` work well with Storage client libraries.++If `Parcel` is used  then no further work is needed. Otherwise, an additional step is needed to transform the bundled output to the format that IE11 supports:++(Assuming `bundled-output.js` is the result from `Rollup`.)
Assuming `bundled-output.js` is the result from `Rollup`:
jeremymeng

comment created time in 8 days

pull request commentAzure/azure-sdk-for-js

[storage] add convenience methods exists, createIfNotExists, deleteIfExists

I was thinking more along the lines of an actual BlobDeleteResponse (which is a subtype of RestResponse, without the indexer, and with the headers). Users could check _response.statusCode to determine if the entity existed in the first place or not. We could add a friendly property in the future if so desired.

Unfortunately I don't think returning void for now will help much - users will still take a dependency on the falsey value indicating that the object didn't exist in the first place, so moving to anything non-falsy like some RestResponse subtype would be breaking.

ljian3377

comment created time in 8 days

Pull request review commentAzure/azure-sdk-for-js

[core-amqp] Fixing typos

 export interface CbsResponse {     // (undocumented)     correlationId: string;     // (undocumented)-    satusDescription: string;-    // (undocumented)     statusCode: string;+    // (undocumented)+    statusDescription: string;

If today you have:

let obj = {
  ...
  satusDescription: str
}

you would change it to

let obj = {
  statusDescription: str
}

Object.defineProperty(obj, 'satusDescription', {
  get() {
    logger.warning(`CbsResponse's property "satusDescription" has been renamed to "statusDescription". "satusDescription" will be removed in v2.0.0.`)
    return this.statusDescription;
  }
});
sadasant

comment created time in 8 days

Pull request review commentAzure/azure-sdk-for-js

[storage] add convenience methods exists, createIfNotExists, deleteIfExists

 export class ShareClient extends StorageClient {         fileClient: ShareFileClient;         fileCreateResponse: FileCreateResponse;     }>;+    createIfNotExists(options?: ShareCreateOptions): Promise<ShareCreateResponse | null>;     createPermission(filePermission: string, options?: ShareCreatePermissionOptions): Promise<ShareCreatePermissionResponse>;     createSnapshot(options?: ShareCreateSnapshotOptions): Promise<ShareCreateSnapshotResponse>;     delete(options?: ShareDeleteMethodOptions): Promise<ShareDeleteResponse>;     deleteDirectory(directoryName: string, options?: DirectoryDeleteOptions): Promise<DirectoryDeleteResponse>;     deleteFile(fileName: string, options?: FileDeleteOptions): Promise<FileDeleteResponse>;+    deletIfExists(options?: ShareDeleteMethodOptions): Promise<ShareDeleteResponse | null>;

deleteIfExists

ljian3377

comment created time in 9 days

Pull request review commentAzure/azure-sdk-for-js

[core-amqp] Fixing typos

 export interface CbsResponse {     // (undocumented)     correlationId: string;     // (undocumented)-    satusDescription: string;-    // (undocumented)     statusCode: string;+    // (undocumented)+    statusDescription: string;

A new proposal: TypeScript will soon learn to display members with @deprecated tag in a way that makes it obvious the thing is deprecated (at least in vscode). We can do a more conservative thing in that case:

  1. Add statusDescription
  2. Deprecate satusDescription by adding @​deprecated. Ensure docs will call out deprecated members/hide by default. Install it as a non-enumerable getter that logs a warning on access.
  3. Remove satusDescription in next major.

This will have the unfortunate effect of showing the deprecated member until likely TS4.0, but doesn't break anyone and makes sure the good name is present for those that don't want to opt in to a future break by using a typo'd property and likely reduces confusion overall.

Given that this is core-amqp and it's unlikely anyone but us is using it directly, this can probably wait for next major too.

sadasant

comment created time in 9 days

Pull request review commentAzure/azure-sdk-for-js

[core-amqp] Fixing typos

 export interface CbsResponse {     // (undocumented)     correlationId: string;     // (undocumented)-    satusDescription: string;-    // (undocumented)     statusCode: string;+    // (undocumented)+    statusDescription: string;

I think we should fix this - it's not super clear that this is typo'd, I might just not even realize what it is.

There is a hybrid approach here - we can support both, but have the typings (and docs) only show latest. That way JS users don't need to do anything, and TS builds break but the fix is easy - it will offer a "did you mean" error since the string is only off-by-one, and the user could just cast to any without any code changes to make the error go away and things work...

sadasant

comment created time in 9 days

Pull request review commentAzure/azure-sdk-for-js

[core-auth] target ES5

 {   "extends": "../../../tsconfig.package",

Since only some packages have a need for IE11 support, only core packages need to target ES5. Non-core should remain ES6 at a minimum. ES5 emit is massive relative to ES6 emit for things like async functions, and so should be avoided unless absolutely necessary.

jeremymeng

comment created time in 9 days

Pull request review commentAzure/azure-sdk-for-js

[core-http] support text media type serialization

 export interface OperationSpec {    */   readonly contentType?: string; +  /**+   * The media type of the request body.+   * This value can be used to aide in serialization if it is provided.+   */+  readonly mediaType?: string;

Note that this doesn't really do anything since string is a supertype of all the string literals. TypeScript sadly doesn't even offer parameter help for the known string values, though I consider this a bug.

chradek

comment created time in 9 days

push eventAzure/azure-sdk

Brian Terlson

commit sha fe77349debec78e90411fcfa4b11a3452f051c25

[JS/TS] We use begin for lro (#1319)

view details

push time in 12 days

PR merged Azure/azure-sdk

[TS] We use begin for lro

Realized this was never pinned down, so doing so now. We'll be joining our python bretheren.

+1 -1

0 comment

1 changed file

bterlson

pr closed time in 12 days

pull request commentAzure/azure-sdk-for-js

[KeyVault] Idea for testing tracing functionalities

We should not use decorators, sadly. There be dragons.

sadasant

comment created time in 12 days

issue commentAzure/azure-sdk-for-js

[Cognitive Services Text Analytics] Error Object not fully typed

+1 for re-exporting RestError. Storage is already doing this too for the record, probably others as well. Importing from core-* shouldn't be on the happy path for any important scenarios 😀

@NoelAbrahams another approach I've considered, curious what you think: exporting custom type guards like isRestError, isTextAnalyticsError, etc., so you can do:

declare function isRestError(e: unknown): e is RestError;
catch(e) {
  if (isRestError(e)) {
    // e is now typed appropriately.
  }
}

Do you prefer one or the other approach here?

NoelAbrahams

comment created time in 12 days

push eventbterlson/azure-sdk-for-js

Brian Terlson

commit sha d0fcdccbd206b8e06dba55becee37fc6a2d3832f

Update api extraction

view details

push time in 16 days

push eventbterlson/azure-sdk-for-js

Brian Terlson

commit sha c1a6902eb72dd21b07173596572429356a2e525c

rename connectionExists -> hasConnection, add recorded tests

view details

push time in 16 days

push eventbterlson/azure-sdk-for-js

Brian Terlson

commit sha aa13d509c5c21e8cc09c469b4cdfc205f77e8136

fix swapped doc comments

view details

push time in 16 days

push eventbterlson/armdsl

Anders Hejlsberg

commit sha 9efa5467886f01676f45fc749ac503c42006848b

A couple of refinements to handling of 'undefined' in types

view details

Brian Terlson

commit sha 91da57a5d802fc1682cde078994799df8be35f36

Merge pull request #1 from bterlson/type-refinements A couple of refinements to handling of 'undefined' in types

view details

push time in 19 days

MemberEvent

push eventbterlson/armdsl

Brian Terlson

commit sha 9799bcf3b8b6e517a6d030db6e2db395f4b468ce

support for loops, implement compute

view details

push time in 19 days

PR opened Azure/azure-sdk

[TS] We use begin for lro

Realized this was never pinned down, so doing so now. We'll be joining our python bretheren.

+1 -1

0 comment

1 changed file

pr created time in 19 days

push eventbterlson/azure-sdk

Jeffrey Richter

commit sha 3a0479b738239a7397c650f503ad41fe8604f4d2

Updated Telemetry sdk_name string

view details

Jeffrey Richter

commit sha 44ecaf88806290d0f59dc9a5ed8377baa4f08622

Added rule about client-generated request ids

view details

Jeffrey Richter

commit sha d22cb9928a7bc6f8c59c214f9c88c3418228d34c

Added link to retry guideline

view details

Jeffrey Richter

commit sha 586ea513744e52f0ce0aecf4488be6d8c0d2f440

Merge branch 'master' of https://github.com/Azure/sdk

view details

Jeffrey Richter

commit sha ec5dd7975d82829e1e3fcf8b5cb668db0c13da4a

Added credentials guideline

view details

Jeffrey Richter

commit sha ef6f42827a7b7110f129d17022d494b8a6fa7c3f

Updated Logging and added Errors

view details

Jeffrey Richter

commit sha 0bbc2fa333c4ccd79e46635f48b814cd6e7efa34

Updated retry guideline

view details

Brian Terlson

commit sha 020df38bf7bc8b9c10c47a98e8340ff70a461af6

Update template links

view details

Jeffrey Richter

commit sha f98c44f04e9dd5466e0d7e5fb5c17393500d48ff

Merge branch 'master' of https://github.com/Azure/sdk

view details

Jeffrey Richter

commit sha e1b5cf48b81c8451c7b156f751221af61a771b83

Updated Telemetry

view details

Wes Haggard

commit sha 2f189aa64ff642587b5fa386741f61198f3db463

Add document outlining our repo branching strategy (#241)

view details

Wes Haggard

commit sha df7e4221988b9ad84966ac88b7f8e3db5d0ab4e0

Update repo-structure.md

view details

Adrian Hall

commit sha d500f19dbb452710715e094f646e67fca42c4560

Added design principles to introduction (#248) * Added design principles to introduction * Updates based on the Architecture Board Review * Fixes from review * Fixes converting component to client library

view details

Jonathan Giles

commit sha 8e8c19f8a3c4af0f4477e163de20aa56cb5bb446

Update Java spec (#253) * Introduce more spec requirements around code structure, naming patterns, and exception handling Rename from 'sdk components' to 'client libraries' * Clarify to prioritise throwing azure-specific exceptions when appropriate, rather than general Java exceptions.

view details

Jonathan Giles

commit sha 30763e225635d18587f02fdf82d0316d2a75f34f

Adding champion scenarios requirement to review guidelines (#247) * Adding champion code path requirement to review guidelines * Update ReviewProcess.md Updating to change ordering. To make reading and referencing the samples cleaner, I have put it in second place rather than first place (and I've moved 'code samples' into first place). * Renaming 'SDK component' to 'client library'

view details

Adrian Hall

commit sha 722078affd7508d2cbac9e11e67ed7c479c3270a

Changes to error/exception handling from JR (#254) * Changes to error/exception handling from JR * Updates based on 3/26 architecture review board * Updated from JonathanGiles review * More error => error type conversions

view details

Adrian Hall

commit sha 3220163408d563a3b46e8b1f550fbc850862b53b

Updated retry guidelines from architecture board review (#262) * Updated retry guidelines from architecture board review * Updates from KC review * Adjustment of configuration setting descriptions * Fixes for JG review * Added maximum retry delay back in

view details

Adrian Hall

commit sha 47f5fc69abc242148f1bfe3bd828295a3d8d5e65

Review Process adjustments (#268) * Review Process adjustments * Corrected link to ApiReviewer * Added exemption clause to what triggers a full review * Reworded exemption clause

view details

Alex Ghiondea

commit sha b8e02791db2c3aecc5f8186c115a9d709fc3679c

Update location for Service Bus code (#274)

view details

Adrian Hall

commit sha 190a4c2150f6b21d7b7d22920a9e52dcb941032f

Added HDinsight to the README (#271) * Added HDinsight to the README

view details

push time in 19 days

Pull request review commentAzure/azure-sdk-for-js

Standardizing the tsconfig.json files

 {+  "extends": "../../../tsconfig.package",   "compilerOptions": {-    "target": "es6",-    "module": "es6",-    "moduleResolution": "node",-    "strict": true,-    "sourceMap": true,-    "inlineSources": true,-    "declarationMap": true,-    "declaration": true,+    "target": "es5",     "declarationDir": "./types",-    "esModuleInterop": true,-    "allowSyntheticDefaultImports": true,-    "forceConsistentCasingInFileNames": true,     "outDir": "./dist-esm",-    "importHelpers": true,-    "newLine": "LF"+    "downlevelIteration": true   },-  "exclude": ["node_modules", "types/**", "./samples/**/*.ts"],+  "compileOnSave": true,

Agree on removing, I don't think it serves a purpose. I also disagree with that preference being specified in tsconfig to begin with, but that's a separate story 😁

sadasant

comment created time in 21 days

push eventbterlson/armdsl

Brian Terlson

commit sha a14fb256b317a69200e230741f20a7299e33aa8a

Add support for conditional

view details

push time in 21 days

push eventbterlson/armdsl

Brian Terlson

commit sha 69a387cd09723310ed2054d36081092bbffab9f7

add readme

view details

Brian Terlson

commit sha 82067bfca90abcc9ef2917e38d4bacd846713ba0

remove positional args

view details

Brian Terlson

commit sha 6fdf29379d7170b12285dcaa4a62324931b42e4e

new type system

view details

Brian Terlson

commit sha 26ffea784f7f4b2d7411eff3b476aa14404e656a

Type system updates and new emit

view details

push time in 21 days

create barnchbterlson/armdsl

branch : new-type-system

created branch time in 22 days

issue openedAzure/azure-sdk

Board Review: SignalR

The Basics

  • Service team responsible for the client library: adparch
  • Link to documentation describing the service:
  • Contact email (if service team, provide PM and Dev Lead): @bterlson (ADP contact), @davidfowl (PM stand-in), @vicancy (Dev)

About this client library

  • Name of the client library: SignalR (name is presently up for debate)
  • Languages for this review: TS, C#, Java, Python
  • Link to the service REST APIs: here

Artifacts required (per language)

.NET

  • apiview.
  • @KrzysztofCwalina please share champion scenarios

Java

  • apiview
  • @JonathanGiles please share champion scenarios

Python

  • TBD (@johanste please share when you get a chance)

TypeScript

Champion Scenarios

  • Broadcast text messages to hubs and groups
    • Nearly everyone using this library will be doing this.
    • https://github.com/Azure/azure-sdk-for-js/pull/8652/files#diff-62dfd9a31f6e34b54fac79d76e0e24aa
  • Broadcast binary messages to hubs and groups
    • Much less common (maybe < 10%).
    • https://github.com/Azure/azure-sdk-for-js/pull/8652/files#diff-62dfd9a31f6e34b54fac79d76e0e24aa
  • Sending messages to specific users and connections
    • Maybe 50% of users will do this.
    • https://github.com/Azure/azure-sdk-for-js/pull/8652/files#diff-62dfd9a31f6e34b54fac79d76e0e24aa
  • Add and removing users and connections to groups
    • Maybe 50% of users will do this.
    • https://github.com/Azure/azure-sdk-for-js/pull/8652/files#diff-62dfd9a31f6e34b54fac79d76e0e24aahttps://github.com/Azure/azure-sdk-for-js/pull/8652/files#diff-62dfd9a31f6e34b54fac79d76e0e24aa

created time in a month

push eventbterlson/azure-sdk-for-js

Brian Terlson

commit sha c22316ab6d979ab76f2fd0ea7b4915a9dafaf7ec

Add a few samples for champion scenarios.

view details

push time in a month

PR opened Azure/azure-sdk-for-js

Add a client library for serverless SignalR

This PR adds a new client library for Azure SignalR's new serverless capabilities.

Draft because there is still work to be done, but I want to get this out for an upcoming API review.

Remaining work:

  • [ ] Find an appropriate name for this package (@azure/signalr is likely too generic)
  • [ ] Comprehensive tests (since the service doesn't return much useful information, it's questionable if normal testing is sufficient)
  • [ ] Support ports in connection strings
  • [ ] Create unique option types for each method
  • [ ] Fix need for modifying autorest output to include contentType: "text/plain" on the operation specs for text/plain endpoints (without this, core-http will serialize strings as json) /cc @chradek
  • [ ] Fix duplicate parameter types in autorest output (contentType 0 and 1, excluded 0-3, and a few others) /cc @chradek
  • [ ] Node 8 support (presently depends on WhatWG URL)
  • [ ] Optional - browser support? (presently depends on jwt signing with an API key, which should maybe never happen in the browser)
+3739 -2

0 comment

35 changed files

pr created time in a month

push eventbterlson/azure-sdk-for-js

chunyu3

commit sha aca6b230501ce14f3e91fa336df36185b9db79ac

Generated from 93b740901ffff1df0fe936b9c6a2d9d83961df1d (#7910) Fix typo Co-authored-by: SDK Automation <sdkautomation@microsoft.com>

view details

openapi-sdkautomation[bot]

commit sha badc847aa85b6f627871023bcc3f0fd3fde519d4

[ReleasePR @azure/arm-support] update package name and output f… (#7917) update package name and output folder in readme.typescript.md Co-authored-by: SDK Automation <sdkautomation@microsoft.com>

view details

Richard Park

commit sha 95e06ce85e2a818d4389a3c59912154809f30f58

[service-bus] Preview.1 - create separate rule manager and dead letter receiver methods. (#7908) - Added in ability to get a dead letter receiver. - Allow users to get a subscription rule management client from the ServiceBusClient.

view details

KarishmaGhiya

commit sha 86b174ebea741187ec3307c40d3dc03f58230b8b

separate unit tests for browser and node (#7909)

view details

Azure SDK Bot

commit sha 96820b02c1d9c9c9bf3a0865873e569dc2839c44

Sync eng/common directory with azure-sdk-tools repository (#7925)

view details

Harsha Nalluru

commit sha 1fa687aaedc339e7b2bd7869b99db11976b0e958

[Service Bus] Remove entityType param everywhere (#7906) * Remove entityType param everywhere * update API report * Update sdk/servicebus/service-bus/src/session/sessionManager.ts * update API report

view details

Jeff Fisher

commit sha cac21805d3a9bf222c931bfde7e6047de5a2d8d4

[search] Add SearchServiceClient with index-related methods (#7758) * Add SearchServiceClient with index-related methods

view details

Jeff Fisher

commit sha 4555a454b5effde0d7e52b39e6b4996861c4d8d1

Convert core-http to use interfaces for requests (#7873) * Convert core-http to use interfaces for requests * Update version and CHANGELOG

view details

chunyu3

commit sha 9c6b6fe025ad56023492b00c4b5dc04aa9faf066

policyinsights release (#7916) Co-authored-by: qiaozha <qiaozha@microsoft.com>

view details

chunyu3

commit sha fa61d52c14659409dd1896ed54e2b1093779a7f2

release network package-2019-12 (#7890) * Sync eng/common directory with azure-sdk-tools repository (#7876) * network package-2019-12 * update network version * update network version * update version * bump client context version * bump policy insight client context version Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Co-authored-by: qiaozha <qiaozha@microsoft.com>

view details

Wei Dong

commit sha 5d177414233a486f8c15f2f43d6e36f14c101ed0

Release for azure arm appservice (#7948) * Generated from a85bbb4b1fba32c60b98f68be7abb367f0c16c24 Ensure PUTs include config * bump version * bump version Co-authored-by: SDK Automation <sdkautomation@microsoft.com>

view details

chunyu3

commit sha bea510ccb44a25ab80a1e358ca9af3a460bb9e5a

kusto release (#7950) * kusto release * update version

view details

Azure SDK Bot

commit sha bab964b271a1db78a8efcb7052ae9d0769fea8a1

Sync eng/common directory with azure-sdk-tools repository (#7956)

view details

Jose Manuel Heredia Hidalgo

commit sha 86a15aeaac17d9a7ee43e3ecab1a051d13be9302

Fix two typos (#7955)

view details

Wei Dong

commit sha 4cb09619273fe5bb8063df4ff14ba94b850a3c3a

Release azure arm recoveryservicesbackup (#7982) * Generated from 10fb274f126929fa62be579fe1b03eb5b3ec7722 Fixed PrettierCheck failures * bump version * bump version Co-authored-by: SDK Automation <sdkautomation@microsoft.com>

view details

Jeff Fisher

commit sha 99b6d4603a07654b6afb6ce85af94a818ecc19e1

Fix default deserialization policy (#7965) Replaces the fix done by #4975 to only apply to the identity package.

view details

Richard Park

commit sha 3e5e2da1a318e97d7d0889e4312658b6f579cdee

[service-bus] deadletter() changes for API compliance and bugs (#7960) - deadLetter() wasn't setting the reason or description properly when you deadLetter()'d a message on the management link (ie, deadlettering a deferred message) - There was a slight (but annoying) mis-casing in the DeadLetterOptions for deadLetterReason - Plumb custom properties through for dead lettering as well

view details

Harsha Nalluru

commit sha fdbd2ef5c12df1d27d0cececfda9e47cddd7021a

Alternative custom reporter to mocha-multi (#7931) * mocha-multi-reporter.js * update test commands in package.json to not use mocha-multi * remove mocha-multi from devDependencies * Update mocha to ^7.1.1 * ts-mocha@6.0 doesn't support mocha@7.0.0 - removing since not being used ERROR  @rush-temp/event-hubs: ts-mocha@6.0.0 requires a peer of mocha@^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X but version 7.1.1 was installed. * generate pnpm-lock file * `rush update --full` since mocha-multi has been removed * rollback mocha to 6.2.2 since some of the tests require updates * generate pnpm-lock file * update core-http's reporter * unit-test:browser and unit-test:node commands for eslint plugin to nullify errors thrown by rush * update core-arm reporter * Add copyright header * Remove console.logs * pnpm-lock from master

view details

Jeff Fisher

commit sha aa8d4ebdc8012481d7a11894bee22edfef929465

[core-http] Support dashes in parameter names (#7988) * Support dashes in parameter names Porting fix from Azure/azure-sdk-for-node#5143

view details

Jeremy Meng

commit sha 78917a5683c0119a738468a649dd45d563e49d72

[core-http] support disabling decompression in node-fetch client (#7878) Azure Blob Storage allows setting content encoding of a blob that stores compressed data. Browsers or other web clients can decompress accordingly when consuming the content of the blob. For NodeJS our node-fetch http client supports gzip/defalte content encoding by default thus de-compress the data in `download()` and similar methods. This causes problems, mainly, - upload and download using storage sdk clients are inconsistent. - retry for partial response wouldn't work in the decompressed stream. This change adds support to set the `compress` option to false using a request policy. Related to #6411.

view details

push time in a month

MemberEvent

Pull request review commentAzure/azure-sdk-for-js

[core-lro] README improvements

 # Azure Core LRO client library for JavaScript -Azure's Core LRO is a JavaScript library that provides an API that aims to-allow the azure-sdk-for-js public libraries to implement fully featured pollers-to manage Long Running Operations (LROs) with the Azure services.+`@azure/core-lro` is a JavaScript library that allows developers to build pollers that keep track of Long Running Operations (LROs) against Azure services. Until completion, such operations require consecutive calls to Azure services to update a local representation of the remote operation status. -@azure/core-lro is made following our guidelines here: https://azure.github.io/azure-sdk/typescript_design.html#ts-lro+**Please note:** This library is intended to be used as a dependency of official Azure SDK packages and not intended for inclusion in your projects directly.
**Please note:** This library is included with other Azure SDK libraries that need it. It should not be used as a direct dependency in your projects.

Want to be more clear that users shouldn't be manually npm-installing this thing.

sadasant

comment created time in a month

Pull request review commentAzure/azure-sdk-for-js

[core-lro] README improvements

 # Azure Core LRO client library for JavaScript -Azure's Core LRO is a JavaScript library that provides an API that aims to-allow the azure-sdk-for-js public libraries to implement fully featured pollers-to manage Long Running Operations (LROs) with the Azure services.+`@azure/core-lro` is a JavaScript library that allows developers to build pollers that keep track of Long Running Operations (LROs) against Azure services. Until completion, such operations require consecutive calls to Azure services to update a local representation of the remote operation status.
`@azure/core-lro` is a JavaScript library that manages long running operations (LROs) against Azure services. Until completion, such operations require consecutive calls to Azure services to update a local representation of the remote operation status.
sadasant

comment created time in a month

pull request commentAzure/azure-sdk-for-js

Code change to check if delimiter is tabs-spaces & value is null/undefined

@sarangan12 really appreciate the clear write-up in the gist, thank you 😀 +1 on these changes.

I did some research just to double-check, and thought I'd share what I found. From an RFC3986 perspective, whitespace cannot be present in a URI. Reason being that a URI might have whitespace added when it is e.g. broken across lines and so it should be safe to just remove any whitespace found there:

Hi, please see our github page at <https://github.com/azure/
azure-sdk-for-js>

HTML5 adds spaces and tabs and a few other things to the <unreserved> production to allow parsing of URIs with spaces in them, however they are always percent-encoded when sent across the wire. You can observe this behavior by by running e.g. new URL('http://azure.com/hi there') and note it percent-encodes the spaces for you "automatically".

I suspect this means the form with literal spaces and tabs would work if you actually sent the request (since the http stack would percent-encode for you), but since we're validating the constructed URIs rather than the URI actually used to send the request, the tests were failing.

sarangan12

comment created time in a month

issue openedAzure/adl

ADL generators

I would like to generate interfaces for many/all arm RPs for a TS/JS-based arm template DSL I'm working on. I want to build off of ADL and its OM. Filing an issue to help keep track of any work that is needed for me to start working on this!

created time in a month

push eventbterlson/armdsl

Brian Terlson

commit sha 540408b9545abf4b4f9e3c79db51a6355c8262d2

Add demo sample

view details

push time in a month

push eventbterlson/armdsl

Brian Terlson

commit sha bb692b221478346210ae863e4dc1491afc789c68

Add some doc comments and a demo file

view details

push time in a month

issue openedmicrosoft/TypeScript

Rename refactoring doesn't handle changing a member to a non-Identifier

TypeScript Version: 3.8.3 Search Terms: refactor rename space identifier Code

interface Foo {
  x: number;
}
var obj: Foo = {
  x: 1,
};
obj.x = 2;

Rename the x member of Foo to x (prefixed with space).

Expected behavior:

interface Foo {
  " x": number;
}
var obj: Foo = {
  " x": 1,
};
obj[" x"] = 2;

Actual behavior:

interface Foo {
   x: number;
}
var obj: Foo = {
   x: 1,
};
obj. x = 2;

My use case was I decided to hide some members from intellisense using this trick, but the same thing applies if you want to rename to anything that's not a valid identifier (e.g. things with spaces or invalid identifier characters).

created time in a month

push eventbterlson/armdsl

Brian Terlson

commit sha cb9469ed9387c8b347adb3f5ea02a99f7ca904c2

latest prototype

view details

push time in a month

issue commentAzure/azure-sdk

Board Review: Event Hubs - Send batch API for collection of events

API listing is good here too.

srnagar

comment created time in a month

issue commentAzure/azure-sdk-for-js

This package depends on node-fetch@2.6.0 which doesn't play well with WebPack

Since we aren't using node-fetch in the browser I hope that change won't affect us? We already map to an xhr implementation by default in browsers.

MTCMarkFranco

comment created time in a month

Pull request review commentAzure/azure-sdk-for-js

[WIP] session manager sample preview.1

+import { ServiceBusClient, delay, ReceivedMessageWithLock } from "@azure/service-bus";+import * as dotenv from "dotenv";+import { env } from "process";+import { AbortController, AbortSignalLike } from "@azure/abort-controller";++dotenv.config();++const serviceBusConnectionString =+  env["SERVICEBUS_CONNECTION_STRING"] || "<service bus connection string not in environment>";+const queueName = env["QUEUE_NAME_WITH_SESSIONS"] || "<queue name not in environment>";+const maxSessionsToProcessSimultaneously = 8;+const sessionIdleTimeoutMs = 3 * 1000;+const delayWhenNoSessionsAvailableMs = 5 * 1000;++interface SessionMessageHandlers {+  processInitialize(sessionId: string);+  processMessage(msg: ReceivedMessageWithLock);+  processError(err: Error, sessionId: string);+  processClose(reason: "error" | "idle_timeout", sessionId: string);+}

I worry people will expect they need to write this interface. Can we just make process* bare functions and call them from the appropriate places? It might be a bit more verbose but simpler usage.

richardpark-msft

comment created time in a month

Pull request review commentAzure/azure-sdk-for-js

[WIP] session manager sample preview.1

+import { ServiceBusClient, delay, ReceivedMessageWithLock } from "@azure/service-bus";+import * as dotenv from "dotenv";+import { env } from "process";+import { AbortController, AbortSignalLike } from "@azure/abort-controller";++dotenv.config();++const serviceBusConnectionString =+  env["SERVICEBUS_CONNECTION_STRING"] || "<service bus connection string not in environment>";+const queueName = env["QUEUE_NAME_WITH_SESSIONS"] || "<queue name not in environment>";+const maxSessionsToProcessSimultaneously = 8;+const sessionIdleTimeoutMs = 3 * 1000;+const delayWhenNoSessionsAvailableMs = 5 * 1000;++interface SessionMessageHandlers {+  processInitialize(sessionId: string);+  processMessage(msg: ReceivedMessageWithLock);+  processError(err: Error, sessionId: string);+  processClose(reason: "error" | "idle_timeout", sessionId: string);+}++function _createIdleTimer(+  timeoutMs: number+): { refresh(): void; expirationPromise: Promise<void> } {+  let resolveExpirationPromise;++  const expirationPromise = new Promise<void>((res, _rej) => {+    resolveExpirationPromise = res;+  });++  let timer = setTimeout(resolveExpirationPromise, timeoutMs);++  return {+    refresh() {+      clearTimeout(timer);+      timer = setTimeout(resolveExpirationPromise, timeoutMs);+    },+    expirationPromise+  };+}++async function _noSessionsAvailable(err: Error) {

I'm not sure the leading underscore is warranted here

richardpark-msft

comment created time in a month

Pull request review commentAzure/azure-sdk-for-js

[service-bus] recreate Connection object on disconnect

 # Release History -## 1.1.6 (TBD)+## 1.1.6 (2020-04-23)  - Removes the `@azure/ms-rest-nodeauth` dependency.   This allows users to use any version of `@azure/ms-rest-nodeauth` directly with `@azure/service-bus` without TypeScript compilation errors.   Fixes [bug 8041](https://github.com/Azure/azure-sdk-for-js/issues/8041). - Fixes an issue where non-retryable errors caused by a connection disconnecting were not getting surfaced to the user's registered error handler   when using the `registerMessageHandler` method on a receiver.   [PR 8401](https://github.com/Azure/azure-sdk-for-js/pull/8401)+- Updates the way connection disconnects are handled to create a new connection object rather than re-using the existing one.+  This should reduce some issues caused when the existing connection gets into an unexpected state.

"Some issues" has me worried. Are there any more known issues? Otherwise I'd say "Fixes reconnection issues by..."

chradek

comment created time in a month

issue commentAzure/azure-sdk-for-js

This package depends on node-fetch@2.6.0 which doesn't play well with WebPack

I'm not aware of anything blocking the upgrade fwiw.

MTCMarkFranco

comment created time in a month

issue commentAzure/azure-sdk-for-js

Readme content and Sample of Azure Identity is unclear

string -> string | undefined shouldn't be a breaking change and so you can feel free to go that route if you need to.

JerryPei1997

comment created time in a month

create barnchbterlson/armdsl

branch : master

created branch time in a month

created repositorybterlson/armdsl

created time in a month

Pull request review commentAzure/azure-sdk-for-js

Avoid exporting types from core-auth that belong elsewhere

 # Release History  ## 1.1.2 (Unreleased)-+- Remove the below interfaces from the public API surface as they have their source of truth defined elsewhere.
- Remove the below interfaces from the public API of this package as they are defined elsewhere.
ramya-rao-a

comment created time in a month

Pull request review commentAzure/azure-sdk-for-js

[Cosmos] Allows container create with string partitionKey

+export type VerboseOmit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;

A comment along the lines of "Shim for Omit which was added in TypeScript 3.5" would be helpful for the future1

zfoster

comment created time in a month

Pull request review commentAzure/azure-sdk-for-js

[service-bus] Update track 2 readme to fix samples

 async function receiveMessage() {     );     // Deadletter the message received     await messages[0].deadLetter({-      deadletterReason: "Incorrect Recipe type",+      deadLetterReason: "Incorrect Recipe type",       deadLetterErrorDescription: "Recipe type does not  match preferences."
      deadLetterErrorDescription: "Recipe type does not match preferences."
richardpark-msft

comment created time in a month

Pull request review commentAzure/azure-sdk-for-js

[service-bus] Update track 2 readme to fix samples

 async function receiveMessage() {     );     // Deadletter the message received     await messages[0].deadLetter({-      deadletterReason: "Incorrect Recipe type",+      deadLetterReason: "Incorrect Recipe type",       deadLetterErrorDescription: "Recipe type does not  match preferences."
      deadLetterErrorDescription: "Recipe type does not match preferences."
richardpark-msft

comment created time in a month

Pull request review commentAzure/azure-sdk-for-js

[service-bus] surface disconnect errors to streaming receiver error handler

 describe("Streaming - Not receive messages after receiver is closed", function()     await testReceiveMessages();   }); });++describe("Streaming - onDetached", function(): void {+  this.afterEach(async () => {+    await afterEachTest();+  });++  it("doesn't call user's error handler on non-retryable errors", async function(): Promise<void> {+    /**+     * If onDetached is called with a non-retryable error, it is assumed that+     * the onSessionError or onAmqpError has already called the user's+     * error handler.+     */+    // Create the sender and receiver.+    await beforeEachTest(+      TestClientType.UnpartitionedQueue,+      TestClientType.UnpartitionedQueue,+      ReceiveMode.receiveAndDelete+    );+    // Send a message so we can be sure when the receiver is open and active.+    await sender.send(TestMessage.getSample());+    const receivedErrors: any[] = [];++    let receiverIsActiveResolver: Function;+    const receiverIsActive = new Promise((resolve) => {+      receiverIsActiveResolver = resolve;+    });+    // Start the receiver.+    receiver.registerMessageHandler(+      async () => {+        // Since we've received a message, mark the receiver as active.+        receiverIsActiveResolver();+      },+      (err) => {+        receivedErrors.push(err);+      }+    );++    // Wait until we're sure the receiver is open and receiving messages.+    await receiverIsActive;++    // Simulate onDetached being called with a non-retryable error.+    const nonRetryableError = translate(new Error(`I break systems.`));+    nonRetryableError.retryable = false;+    await (receiver as any)._context.streamingReceiver.onDetached(nonRetryableError);

I mean, fine for any time you would otherwise cast to any to reach into a private field. Fine for test code in the sense that hopefully you only want to do that in test code...

chradek

comment created time in a month

Pull request review commentAzure/azure-sdk-for-js

[service-bus] surface disconnect errors to streaming receiver error handler

 describe("Streaming - Not receive messages after receiver is closed", function()     await testReceiveMessages();   }); });++describe("Streaming - onDetached", function(): void {+  this.afterEach(async () => {+    await afterEachTest();+  });++  it("doesn't call user's error handler on non-retryable errors", async function(): Promise<void> {+    /**+     * If onDetached is called with a non-retryable error, it is assumed that+     * the onSessionError or onAmqpError has already called the user's+     * error handler.+     */+    // Create the sender and receiver.+    await beforeEachTest(+      TestClientType.UnpartitionedQueue,+      TestClientType.UnpartitionedQueue,+      ReceiveMode.receiveAndDelete+    );+    // Send a message so we can be sure when the receiver is open and active.+    await sender.send(TestMessage.getSample());+    const receivedErrors: any[] = [];++    let receiverIsActiveResolver: Function;+    const receiverIsActive = new Promise((resolve) => {+      receiverIsActiveResolver = resolve;+    });+    // Start the receiver.+    receiver.registerMessageHandler(+      async () => {+        // Since we've received a message, mark the receiver as active.+        receiverIsActiveResolver();+      },+      (err) => {+        receivedErrors.push(err);+      }+    );++    // Wait until we're sure the receiver is open and receiving messages.+    await receiverIsActive;++    // Simulate onDetached being called with a non-retryable error.+    const nonRetryableError = translate(new Error(`I break systems.`));+    nonRetryableError.retryable = false;+    await (receiver as any)._context.streamingReceiver.onDetached(nonRetryableError);

Yep, fine for test code.

chradek

comment created time in a month

issue commentAzure/azure-sdk-for-js

[core-auth] shouldn't export `OperationOptions`

I think the odds of someone depending on this type by name are so low that we can just consider this a bug fix.

xirzec

comment created time in a month

pull request commentAzure/azure-sdk

Updates for inlineSourcemaps

Rebased and implemented suggestions. Will merge, as I don't think any of the subsequent changes are controversial.

bterlson

comment created time in a month

push eventbterlson/azure-sdk

Heath Stewart

commit sha 1846dc473da925bb0476841d4c2916a4c0f18c45

Add release notes for Key Vault for .NET (#1088)

view details

Azure SDK Bot

commit sha 7d13ac896ccf00d3ca0d9e53b4d36b9a9438e130

Update package index with latest published versions (#1092)

view details

Jeremy Meng

commit sha fd431044b2bd4546f2e4a1a584a9a620262f137c

Update JavaScript March 2020 release notes (#1072) * Update JavaScript March 2020 release notes * Add changelog for event hubs and keyvault * Add changes for text analytics and cognitive search

view details

Krzysztof Cwalina

commit sha 1900749be93b5eff14a1fb22c49ee37eec6af553

Mics updates to the .NET Design Guidelines (#1091) * Mics updates to the .NET Design Guidelines * PR feedback incorporated

view details

tg-msft

commit sha 2955278bfe8730580dc7b0dac3422c44487e2a75

Release Notes for Search on .NET in March (#1093)

view details

Shawn Fang

commit sha a8f5ea85767e93660c62b9fc558753a4b4c02933

Update java.md (#1095) Add App config minor version changelog and version bump up

view details

Azure SDK Bot

commit sha d08a4989c78611d86eeaa6be1da5bd61eba7a9f4

Update package index with latest published versions (#1097)

view details

Alan Zimmer

commit sha 100a502b74380987b425e4325542fff8282008be

Java March 2020 Release (#1099) * Added templates for each release this month * Fixed naming and added the top level release information * Added KeyVault and Identity beta releases, added some release notes

view details

Wes Haggard

commit sha c0cb7389e4e5fa24b373f8827c66e18eb67a9904

Add an all packages list for each lanaguage Add a script to query each package manager for azure-sdk published packages and then put them into a csv data file so we can display them in a table.

view details

Wes Haggard

commit sha 9c4ac0ed3ec502ee1ace2e79b5b726803919800d

Switch to a better supported linkchecker

view details

Jon Gallant

commit sha aa1f7c9b7f1ef3596d98cffc1a73b1eb9c255314

Add sub nav from all <-> new (#1102)

view details

Wes Haggard

commit sha 701170889581ccb3e8e5169112f7dbe734b97cae

Update New/All links in package index (#1105)

view details

Wes Haggard

commit sha 7ba8b81dbab41a88f3c936a8c2bf3ddd8a813d44

Add hide and notes column for all packages (#1108)

view details

Azure SDK Bot

commit sha a65fa7cb137c4663491c292c7d9db4d86cd102b9

Update package index with latest published versions (#1103)

view details

Wes Haggard

commit sha d8901e49491cfd0b98bf012f27f7e053460691c5

Add all package library update script to update pipeline

view details

Azure SDK Bot

commit sha 4dcbbb513d85c80e07e7c9a0e8b2bf3ed5f4a2dd

Update package index with latest published versions (#1111)

view details

Adrian Hall

commit sha 2704d54a361d63849dfb5423027d566d937135af

Mar17 blog (#1100) * Added march17 blog * Updates from basic acrolinx * Updated per Bruce comment * Update _posts/2020-03-17-march-release.md Co-Authored-By: Brian Terlson <brian.terlson@microsoft.com> * Update _posts/2020-03-17-march-release.md Co-Authored-By: Brian Terlson <brian.terlson@microsoft.com> * Update _posts/2020-03-17-march-release.md Co-Authored-By: Brian Terlson <brian.terlson@microsoft.com> * Update 2020-03-17-march-release.md * Update 2020-03-17-march-release.md * Switched to camelCase * Added best practice note * Update _posts/2020-03-17-march-release.md Co-Authored-By: Bruce Johnston <bruce.johnston@microsoft.com> * Updates from lily Co-authored-by: Adrian Hall <adrian.hall@microsoft.com> Co-authored-by: Brian Terlson <brian.terlson@microsoft.com> Co-authored-by: Bruce Johnston <bruce.johnston@microsoft.com>

view details

Wes Haggard

commit sha 840dfecfff5a108fc67a5825a76f61a2e7753129

Update owner path to _data There are other data paths outside of releases that are interesting now so expanding the ownership paths.

view details

Azure SDK Bot

commit sha 15416a0e4f792ed3c9a38536523d43429f9afe0d

Update package index with latest published versions (#1112)

view details

Wes Haggard

commit sha 5c7a0e183c6d495bf2bbb26ff234f2aa301003e9

Cleanup unlisted packages (#1113) Also use a more stable sort so the order doesn't bounce around

view details

push time in a month

pull request commentAzure/azure-sdk

Add blog post for cancellation in JS

@adrianhall can you check out the new intro paragraph?

bterlson

comment created time in a month

push eventbterlson/azure-sdk

Brian Terlson

commit sha ce1a6ce841d47b8e9ccad80aa97531ac39aee5f7

no longer interested -> you'd like to cancel it

view details

Brian Terlson

commit sha 4a663aeae133eb05026c0c144ec7c3d6e6f730ad

remove confusing point about separation of concerns

view details

Brian Terlson

commit sha 19f4026ce017f191772d564a4448a57cb4089507

Update intro graf

view details

push time in a month

Pull request review commentAzure/azure-sdk

Add blog post for cancellation in JS

+---+title: How to use abort signals to cancel operations in the Azure SDK for JavaScript/TypeScript+layout: post+date: 21 apr 2020+sidebar: releases_sidebar+author_github: bterlson+repository: azure/azure-sdk+---++Cancelling in-progress network operations is critical for many applications to maintain responsiveness and avoid waiting for pointless work to complete. For example, when downloading a large blob from Azure Storage, a user might want to cancel the download, and it would be nice if we could tell the Storage library that it doesn't need to download any more. Or, maybe your process got an interrupt signal because the server is no longer needed or needs to upgrade and you need to stop any in-progress operations and shut down as soon as possible.++The new Azure SDK libraries for JavaScript and TypeScript have adopted abort signals for just these purposes.++## AbortController &amp; AbortSignal++`AbortController` and `AbortSignal` are [standard features in the browser](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) and are used with the [`fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch) to abort in-progress network requests. The controller is responsible for triggering the cancellation, and signals are responsible for notifying when a cancellation has been triggered. This separation of concerns enables you to safely pass an abort signal without delegating the ability to cancel the signal as well.

I like that. I'll replace classes with "other parts of your application", though. Not everyone likes classes 😀

bterlson

comment created time in a month

Pull request review commentAzure/azure-sdk

Add blog post for cancellation in JS

+---+title: How to use abort signals to cancel operations in the Azure SDK for JavaScript/TypeScript+layout: post+date: 21 apr 2020+sidebar: releases_sidebar+author_github: bterlson+repository: azure/azure-sdk+---++Cancelling in-progress network operations is critical for many applications to maintain responsiveness and avoid waiting for pointless work to complete. For example, when downloading a large blob from Azure Storage, a user might want to cancel the download, and it would be nice if we could tell the Storage library that it doesn't need to download any more. Or, maybe your process got an interrupt signal because the server is no longer needed or needs to upgrade and you need to stop any in-progress operations and shut down as soon as possible.++The new Azure SDK libraries for JavaScript and TypeScript have adopted abort signals for just these purposes.++## AbortController &amp; AbortSignal++`AbortController` and `AbortSignal` are [standard features in the browser](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) and are used with the [`fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch) to abort in-progress network requests. The controller is responsible for triggering the cancellation, and signals are responsible for notifying when a cancellation has been triggered. This separation of concerns enables you to safely pass an abort signal without delegating the ability to cancel the signal as well.

Do you think the point is even worth keeping? I feel like it doesn't add much.

bterlson

comment created time in a month

Pull request review commentAzure/azure-sdk

Add blog for JS abort controller

+---+title: Cancel operations in the Azure SDK with abort signals+layout: post+date: 21 apr 2020+sidebar: releases_sidebar+author_github: bterlson+repository: azure/azure-sdk+---++Cancelling in-progress network operations is critical for many applications to maintain responsiveness and avoid waiting for pointless work to complete. For example, when downloading a large blob from Azure Storage, a user might want to cancel the download, and it would be nice if we could tell the Storage library that it doesn't need to download any more. Or, maybe your process got an interrupt signal because the node is no longer needed or needs to upgrade and you need to stop any in-progress operations and shut down as soon as possible.

Is your goal here to reduce sentence length/complexity? I will simplify. "it would be nice if" is a little wordy too, I'll try to get rid of it.

bterlson

comment created time in a month

Pull request review commentAzure/azure-sdk

Add blog for JS abort controller

+---+title: Cancel operations in the Azure SDK with abort signals+layout: post+date: 21 apr 2020+sidebar: releases_sidebar+author_github: bterlson+repository: azure/azure-sdk+---++Cancelling in-progress network operations is critical for many applications to maintain responsiveness and avoid waiting for pointless work to complete. For example, when downloading a large blob from Azure Storage, a user might want to cancel the download, and it would be nice if we could tell the Storage library that it doesn't need to download any more. Or, maybe your process got an interrupt signal because the node is no longer needed or needs to upgrade and you need to stop any in-progress operations and shut down as soon as possible.++The new Azure SDK libraries for JavaScript and TypeScript have adopted abort signals for just these purposes.++## AbortController &amp; AbortSignal++`AbortController` and `AbortSignal` are [standard features in the browser](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) and are used with the [`fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch) to abort in-progress network requests. The controller is responsible for triggering cancellation, and signals are responsible for notifying when cancellation is requested. This separation of concerns enables you to safely pass an abort signal without delegating the ability to cancel the signal as well.

It's kind of a useless point I think. Objections to just deleting the last sentence "This separation of concerns enables you to safely pass an abort signal without delegating the ability to cancel the signal as well."?

bterlson

comment created time in a month

pull request commentAzure/azure-sdk

Add blog post for cancellation in JS

@jongio in the mangeld #1226 pointed out two things I want to make sure are reflected in the discussion

  1. The point about separation of concerns between controller and signal isn't clear. Any suggestions on how to improve would be appreciated!
  2. In the intro, we could use a bulleted list instead of prose (and maybe add more scenarios besides). Anyone feel strongly here?
bterlson

comment created time in a month

pull request commentAzure/azure-sdk

Add blog for JS abort controller

@jongio Thanks so much for the feedback, I addressed most of this feedback over in #1240.

I'm open to changing the intro paragraph to a bullet list and also interested in how to improve the point about separation of concerns between signal and controller.

bterlson

comment created time in a month

Pull request review commentAzure/azure-sdk

Add blog for JS abort controller

+---+title: Cancel operations in the Azure SDK with abort signals+layout: post+date: 21 apr 2020+sidebar: releases_sidebar+author_github: bterlson+repository: azure/azure-sdk+---++Cancelling in-progress network operations is critical for many applications to maintain responsiveness and avoid waiting for pointless work to complete. For example, when downloading a large blob from Azure Storage, a user might want to cancel the download, and it would be nice if we could tell the Storage library that it doesn't need to download any more. Or, maybe your process got an interrupt signal because the node is no longer needed or needs to upgrade and you need to stop any in-progress operations and shut down as soon as possible.++The new Azure SDK libraries for JavaScript and TypeScript have adopted abort signals for just these purposes.++## AbortController &amp; AbortSignal++`AbortController` and `AbortSignal` are [standard features in the browser](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) and are used with the [`fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch) to abort in-progress network requests. The controller is responsible for triggering cancellation, and signals are responsible for notifying when cancellation is requested. This separation of concerns enables you to safely pass an abort signal without delegating the ability to cancel the signal as well.++If you're just targeting fairly modern browsers, you can use the built-in `AbortController` and `AbortSignal` and everything will work fine. If you're targeting Node, or if you want to take advantage of linked signals or other features that I'll cover later in this post, you can use the implementation in the Azure SDK found in the `@azure/abort-controller` npm package.++To abort an in-progress request such as an upload or download in storage, create a new `AbortController` and pass its signal into the method you might want to cancel later:++```javascript+// If you want to use the AbortSignal built into the browser, omit this line

And yes, you just delete the line and the rest will work!

bterlson

comment created time in a month

push eventbterlson/azure-sdk

Brian Terlson

commit sha bd192c2a23cfe5366a80ed5d238ae456c3586977

address feedback from jongio

view details

push time in a month

Pull request review commentAzure/azure-sdk

Add blog for JS abort controller

+---+title: Cancel operations in the Azure SDK with abort signals+layout: post+date: 21 apr 2020+sidebar: releases_sidebar+author_github: bterlson+repository: azure/azure-sdk+---++Cancelling in-progress network operations is critical for many applications to maintain responsiveness and avoid waiting for pointless work to complete. For example, when downloading a large blob from Azure Storage, a user might want to cancel the download, and it would be nice if we could tell the Storage library that it doesn't need to download any more. Or, maybe your process got an interrupt signal because the node is no longer needed or needs to upgrade and you need to stop any in-progress operations and shut down as soon as possible.++The new Azure SDK libraries for JavaScript and TypeScript have adopted abort signals for just these purposes.++## AbortController &amp; AbortSignal++`AbortController` and `AbortSignal` are [standard features in the browser](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) and are used with the [`fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch) to abort in-progress network requests. The controller is responsible for triggering cancellation, and signals are responsible for notifying when cancellation is requested. This separation of concerns enables you to safely pass an abort signal without delegating the ability to cancel the signal as well.++If you're just targeting fairly modern browsers, you can use the built-in `AbortController` and `AbortSignal` and everything will work fine. If you're targeting Node, or if you want to take advantage of linked signals or other features that I'll cover later in this post, you can use the implementation in the Azure SDK found in the `@azure/abort-controller` npm package.++To abort an in-progress request such as an upload or download in storage, create a new `AbortController` and pass its signal into the method you might want to cancel later:++```javascript+// If you want to use the AbortSignal built into the browser, omit this line+import { AbortController } from "@azure/abort-controller";++// create a controller and get its signal+const controller = new AbortController();+const abortSignal = controller.signal;++// pass the abortSignal into the API you want to cancel+await blobClient.download({ abortSignal })++// then sometime later, cancel it!+controller.abort();+```++## Aborting multiple operations++Often you have multiple in-flight operations you might want to abort all at once. To continue our Storage example, maybe you're downloading multiple files in parallel. Or, perhaps you have to fetch a secret from Azure KeyVault before using that key in a subsequent operation. In that case, you can pass the same signal to each method, and calling abort on the controller will cancel whichever of them is in progress at that time.++```javascript+async function getShoppingList({ abortSignal }) {+    const cs = await secretClient.getSecret('storage-connection-string', { abortSignal });+    const blobClient = new BlockBlobClient(cs.value, "MyDocuments", "shopping.rtf");+    return blobClient.downloadToBuffer(undefined,undefined, { abortSignal });+}++const controller = new AbortController();+const abortSignal = controller.signal;+const list = await getShoppingList({ abortSignal });++// then sometime later, cancel everything+controller.abort();+```++In this example, we cancel fetching the connection string from KeyVault or, if we've already fetched that, cancel the download.++## Handling AbortErrors++Looking at the above example you might wonder: if we abort while we're fetching the connection string from KeyVault, how do we avoid trying to create the `BlockBlobClient` with an empty key? If you've used AbortSignals with `fetch` in the browser, you know the answer already: cancelled operations throw an `AbortError`. In the above examples, that error is not handled - calling abort on a controller will trigger an unhandled exception which will get logged to the console in the browser and, sadly, cause Node to exit. We can fix this by handling the AbortError thrown from `getShoppingList`. Here's how we can add that functionality using our last example:++```javascript+async function getShoppingList({ abortSignal }) {+    const cs = await secretClient.getSecret('storage-connection-string', { abortSignal });+    const blobClient = new BlockBlobClient(cs.value, "MyDocuments", "shopping.rtf");+    return blobClient.downloadToBuffer(undefined,undefined, { abortSignal });+}++const controller = new AbortController();+const abortSignal = controller.signal;++try {+    const list = await getShoppingList({ abortSignal });+} catch (e) {+    if (e.name === 'AbortError') {+        // abort was called on our abortSignal+        console.log('Operation was aborted by the user');+    } else {+        // some other error occurred 🤷‍♂️+        console.log('Downloading the shopping list failed');+    }+}++// then sometime later, cancel everything+controller.abort();+```++## Advanced tips and tricks++The Azure SDK's implementation of AbortController has a few more tricks up its sleeve to make some very common and useful patterns easier. In order to take advantage of the following examples, you will need to use our `@azure/abort-controller` package - these APIs are not available built-in to the browser.++### Aborting with a timeout++Frequently you want to give an operation some amount of time to return a useful result, and if it hasn't, you're no longer interested. You could call `abortSignal.abort()` in a `setTimeout` callback, but this pattern is so common we provide a bit of sugar.

👍

bterlson

comment created time in a month

Pull request review commentAzure/azure-sdk

Add blog for JS abort controller

+---+title: Cancel operations in the Azure SDK with abort signals+layout: post+date: 21 apr 2020+sidebar: releases_sidebar+author_github: bterlson+repository: azure/azure-sdk+---++Cancelling in-progress network operations is critical for many applications to maintain responsiveness and avoid waiting for pointless work to complete. For example, when downloading a large blob from Azure Storage, a user might want to cancel the download, and it would be nice if we could tell the Storage library that it doesn't need to download any more. Or, maybe your process got an interrupt signal because the node is no longer needed or needs to upgrade and you need to stop any in-progress operations and shut down as soon as possible.++The new Azure SDK libraries for JavaScript and TypeScript have adopted abort signals for just these purposes.++## AbortController &amp; AbortSignal++`AbortController` and `AbortSignal` are [standard features in the browser](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) and are used with the [`fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch) to abort in-progress network requests. The controller is responsible for triggering cancellation, and signals are responsible for notifying when cancellation is requested. This separation of concerns enables you to safely pass an abort signal without delegating the ability to cancel the signal as well.++If you're just targeting fairly modern browsers, you can use the built-in `AbortController` and `AbortSignal` and everything will work fine. If you're targeting Node, or if you want to take advantage of linked signals or other features that I'll cover later in this post, you can use the implementation in the Azure SDK found in the `@azure/abort-controller` npm package.++To abort an in-progress request such as an upload or download in storage, create a new `AbortController` and pass its signal into the method you might want to cancel later:++```javascript+// If you want to use the AbortSignal built into the browser, omit this line+import { AbortController } from "@azure/abort-controller";++// create a controller and get its signal+const controller = new AbortController();+const abortSignal = controller.signal;++// pass the abortSignal into the API you want to cancel+await blobClient.download({ abortSignal })++// then sometime later, cancel it!+controller.abort();+```++## Aborting multiple operations++Often you have multiple in-flight operations you might want to abort all at once. To continue our Storage example, maybe you're downloading multiple files in parallel. Or, perhaps you have to fetch a secret from Azure KeyVault before using that key in a subsequent operation. In that case, you can pass the same signal to each method, and calling abort on the controller will cancel whichever of them is in progress at that time.

I think key -> secret is more what I mean 😁

bterlson

comment created time in a month

Pull request review commentAzure/azure-sdk

Add blog for JS abort controller

+---+title: Cancel operations in the Azure SDK with abort signals+layout: post+date: 21 apr 2020+sidebar: releases_sidebar+author_github: bterlson+repository: azure/azure-sdk+---++Cancelling in-progress network operations is critical for many applications to maintain responsiveness and avoid waiting for pointless work to complete. For example, when downloading a large blob from Azure Storage, a user might want to cancel the download, and it would be nice if we could tell the Storage library that it doesn't need to download any more. Or, maybe your process got an interrupt signal because the node is no longer needed or needs to upgrade and you need to stop any in-progress operations and shut down as soon as possible.++The new Azure SDK libraries for JavaScript and TypeScript have adopted abort signals for just these purposes.++## AbortController &amp; AbortSignal++`AbortController` and `AbortSignal` are [standard features in the browser](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) and are used with the [`fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch) to abort in-progress network requests. The controller is responsible for triggering cancellation, and signals are responsible for notifying when cancellation is requested. This separation of concerns enables you to safely pass an abort signal without delegating the ability to cancel the signal as well.++If you're just targeting fairly modern browsers, you can use the built-in `AbortController` and `AbortSignal` and everything will work fine. If you're targeting Node, or if you want to take advantage of linked signals or other features that I'll cover later in this post, you can use the implementation in the Azure SDK found in the `@azure/abort-controller` npm package.++To abort an in-progress request such as an upload or download in storage, create a new `AbortController` and pass its signal into the method you might want to cancel later:++```javascript+// If you want to use the AbortSignal built into the browser, omit this line

It's discussed in the earlier paragraphs - if you're targeting only browsers, and don't want to use linked signals or timeouts.

bterlson

comment created time in a month

Pull request review commentAzure/azure-sdk

Add blog for JS abort controller

+---+title: Cancel operations in the Azure SDK with abort signals+layout: post+date: 21 apr 2020+sidebar: releases_sidebar+author_github: bterlson+repository: azure/azure-sdk+---++Cancelling in-progress network operations is critical for many applications to maintain responsiveness and avoid waiting for pointless work to complete. For example, when downloading a large blob from Azure Storage, a user might want to cancel the download, and it would be nice if we could tell the Storage library that it doesn't need to download any more. Or, maybe your process got an interrupt signal because the node is no longer needed or needs to upgrade and you need to stop any in-progress operations and shut down as soon as possible.++The new Azure SDK libraries for JavaScript and TypeScript have adopted abort signals for just these purposes.++## AbortController &amp; AbortSignal++`AbortController` and `AbortSignal` are [standard features in the browser](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) and are used with the [`fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch) to abort in-progress network requests. The controller is responsible for triggering cancellation, and signals are responsible for notifying when cancellation is requested. This separation of concerns enables you to safely pass an abort signal without delegating the ability to cancel the signal as well.++If you're just targeting fairly modern browsers, you can use the built-in `AbortController` and `AbortSignal` and everything will work fine. If you're targeting Node, or if you want to take advantage of linked signals or other features that I'll cover later in this post, you can use the implementation in the Azure SDK found in the `@azure/abort-controller` npm package.

It's Node.js in latest

bterlson

comment created time in a month

Pull request review commentAzure/azure-sdk

Add blog for JS abort controller

+---+title: Cancel operations in the Azure SDK with abort signals+layout: post+date: 21 apr 2020+sidebar: releases_sidebar+author_github: bterlson+repository: azure/azure-sdk+---++Cancelling in-progress network operations is critical for many applications to maintain responsiveness and avoid waiting for pointless work to complete. For example, when downloading a large blob from Azure Storage, a user might want to cancel the download, and it would be nice if we could tell the Storage library that it doesn't need to download any more. Or, maybe your process got an interrupt signal because the node is no longer needed or needs to upgrade and you need to stop any in-progress operations and shut down as soon as possible.++The new Azure SDK libraries for JavaScript and TypeScript have adopted abort signals for just these purposes.++## AbortController &amp; AbortSignal++`AbortController` and `AbortSignal` are [standard features in the browser](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) and are used with the [`fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch) to abort in-progress network requests. The controller is responsible for triggering cancellation, and signals are responsible for notifying when cancellation is requested. This separation of concerns enables you to safely pass an abort signal without delegating the ability to cancel the signal as well.++If you're just targeting fairly modern browsers, you can use the built-in `AbortController` and `AbortSignal` and everything will work fine. If you're targeting Node, or if you want to take advantage of linked signals or other features that I'll cover later in this post, you can use the implementation in the Azure SDK found in the `@azure/abort-controller` npm package.

👍

bterlson

comment created time in a month

Pull request review commentAzure/azure-sdk

Add blog for JS abort controller

+---+title: Cancel operations in the Azure SDK with abort signals+layout: post+date: 21 apr 2020+sidebar: releases_sidebar+author_github: bterlson+repository: azure/azure-sdk+---++Cancelling in-progress network operations is critical for many applications to maintain responsiveness and avoid waiting for pointless work to complete. For example, when downloading a large blob from Azure Storage, a user might want to cancel the download, and it would be nice if we could tell the Storage library that it doesn't need to download any more. Or, maybe your process got an interrupt signal because the node is no longer needed or needs to upgrade and you need to stop any in-progress operations and shut down as soon as possible.++The new Azure SDK libraries for JavaScript and TypeScript have adopted abort signals for just these purposes.++## AbortController &amp; AbortSignal++`AbortController` and `AbortSignal` are [standard features in the browser](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) and are used with the [`fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch) to abort in-progress network requests. The controller is responsible for triggering cancellation, and signals are responsible for notifying when cancellation is requested. This separation of concerns enables you to safely pass an abort signal without delegating the ability to cancel the signal as well.

Holding a signal doesn't allow you to cancel it, only holding the controller does. This separation of concerns means you can safely pass around a signal and still have confidence things won't cancel because a library you passed it in to is misbehaving, for example.

bterlson

comment created time in a month

Pull request review commentAzure/azure-sdk

Add blog for JS abort controller

+---+title: Cancel operations in the Azure SDK with abort signals+layout: post+date: 21 apr 2020+sidebar: releases_sidebar+author_github: bterlson+repository: azure/azure-sdk+---++Cancelling in-progress network operations is critical for many applications to maintain responsiveness and avoid waiting for pointless work to complete. For example, when downloading a large blob from Azure Storage, a user might want to cancel the download, and it would be nice if we could tell the Storage library that it doesn't need to download any more. Or, maybe your process got an interrupt signal because the node is no longer needed or needs to upgrade and you need to stop any in-progress operations and shut down as soon as possible.++The new Azure SDK libraries for JavaScript and TypeScript have adopted abort signals for just these purposes.++## AbortController &amp; AbortSignal++`AbortController` and `AbortSignal` are [standard features in the browser](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) and are used with the [`fetch` API](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch) to abort in-progress network requests. The controller is responsible for triggering cancellation, and signals are responsible for notifying when cancellation is requested. This separation of concerns enables you to safely pass an abort signal without delegating the ability to cancel the signal as well.

👍

bterlson

comment created time in a month

Pull request review commentAzure/azure-sdk

Add blog for JS abort controller

+---+title: Cancel operations in the Azure SDK with abort signals+layout: post+date: 21 apr 2020+sidebar: releases_sidebar+author_github: bterlson+repository: azure/azure-sdk+---++Cancelling in-progress network operations is critical for many applications to maintain responsiveness and avoid waiting for pointless work to complete. For example, when downloading a large blob from Azure Storage, a user might want to cancel the download, and it would be nice if we could tell the Storage library that it doesn't need to download any more. Or, maybe your process got an interrupt signal because the node is no longer needed or needs to upgrade and you need to stop any in-progress operations and shut down as soon as possible.

If you feel strongly I can change it but I prefer what's there personally.

bterlson

comment created time in a month

Pull request review commentAzure/azure-sdk

Add blog for JS abort controller

+---+title: Cancel operations in the Azure SDK with abort signals

It's very long, but ok!

bterlson

comment created time in a month

more