text:
QDK chemistry UI

Adding a prototype for adding some Python visualization tools to create an easier interface to the QDK chemistry library.
Right now I've created a separate Python package, because I don't quite understand how the current qsharp.chemistry package is organized and I wasn't able to make it work for my local setup (using pip install -e .)

Would you be OK with targeting this to a feature branch instead of main, especially since as per your comments we'll need to at least partially merge this with the existing qsharp-chemistry package?

@cgranade

Would you be OK with targeting this to a feature branch instead of main

Agreed, as per our discussion in our team sync a few weeks ago. I had not yet pushed the feature branch, this is now done

We discussed and will keep this in qdk_chemistry for now until we decide on a common strategy for Python packages for the QDK that are not related to Q# interoperability.

I am wondering why there are not many CI checks? Could it be because the target branch is neither main nor feature/*?

I am wondering why there are not many CI checks? Could it be because the target branch is neither main nor feature/*?

Thanks for pointing that out, should be fixed now!

authors: cgranade guenp msoeken

repo: microsoft/QuantumLibraries


text:
fix: fix flaky translate tests

Related Issues/PRs

#xxx
What changes are proposed in this pull request?
Briefly describe the changes included in this Pull Request.
How is this patch tested?

[ ] I have written tests (not required for typo or doc fix) and confirmed the proposed feature/bug-fix/change works.

Does this PR change any dependencies?

[ ] No. You can skip this section.
[ ] Yes. Make sure the dependencies are resolved correctly, and list changes here.

Does this PR add a new feature? If so, have you added samples on website?

[ ] No. You can skip this section.
[ ] Yes. Make sure you have added samples following below steps.

Find the corresponding markdown file for your new feature in website/docs/documentation folder.
Make sure you choose the correct class estimators/transformers and namespace.
Follow the pattern in markdown file and add another section for your new API, including pyspark, scala (and .NET potentially) samples.
Make sure the DocTable points to correct API link.
Navigate to website folder, and run yarn run start to make sure the website renders correctly.
Don't forget to add <!--pytest-codeblocks:cont--> before each python code blocks to enable auto-tests for python samples.
Make sure the WebsiteSamplesTests job pass in the pipeline.

AB#1966811

/azp run

Codecov Report

Merging #1643 (6288266) into master (59a922b) will decrease coverage by 28.92%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           master    #1643       +/-   ##
===========================================
- Coverage   81.19%   52.26%   -28.93%
===========================================
  Files         272      272
  Lines       14230    14230
  Branches      739      739
===========================================
- Hits        11554     7438     -4116
- Misses       2676     6792     +4116

Impacted Files
Coverage Δ

...m/src/main/scala/com/microsoft/lightgbm/SWIG.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...m/microsoft/azure/synapse/ml/codegen/CodeGen.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

.../microsoft/azure/synapse/ml/io/binary/Binary.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...microsoft/azure/synapse/ml/codegen/Wrappable.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...t/azure/synapse/ml/explainers/ImageExplainer.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...pse/ml/lightgbm/params/ClassifierTrainParams.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

.../synapse/ml/io/binary/KeyValueReaderIterator.scala
0.00% <0.00%> (-93.75%)
:arrow_down:

.../execution/streaming/continuous/HTTPSourceV2.scala
0.00% <0.00%> (-92.09%)
:arrow_down:

...zure/synapse/ml/stages/PartitionConsolidator.scala
6.38% <0.00%> (-91.49%)
:arrow_down:

...microsoft/azure/synapse/ml/codegen/PyCodegen.scala
0.00% <0.00%> (-90.70%)
:arrow_down:

... and 134 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

/azp run

source: gharchive/pull-request

authors: codecov-commenter serena-ruan

repo: microsoft/SynapseML

license: MIT

license_type: permissive

license_source: github-api


text:
Type safety  for enum property names

Suggestion
Enums work in two directions, where an enum property value can be retrieved via AnEnum.aProperty and a property name can be retrieved via AnEnum[aValue]. In TypeScript 3.4.3, the type of the second expression is string. Instead, it should be equivalent to keyof typeof AnEnum | undefined.
Use Cases
While the nameof operator (suggested in #1579) does not exist yet, a construct such as AnEnum[AnEnum.aProperty] can currently be used to safely refer to an enum property name. Unfortunately, since the type of that expression is string it requires a cast when assigning it to a type safe target.
Examples
enum AnEnum { aProperty = 1, anotherProperty = 23, yetAnotherOne = 42 };
let target: keyof typeof AnEnum;

…

// Compilation error here: Type 'string' is not assignable to type '"aProperty" | "anotherProperty" | "yetAnotherOne"'.
target = AnEnum[AnEnum.aProperty];

Checklist
My suggestion meets these guidelines:

[x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[x] This wouldn't change the runtime behavior of existing JavaScript code
[x] This could be implemented without emitting different JS based on the types of the expressions
[x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
[x] This feature would agree with the rest of TypeScript's Design Goals.

Would like this because for string enum, you can't really do the reverse keying like so Enum[Enum.key]. It needs to be nameof(Enum.key) / nameof Enum.key.
Right now, my use case can be
routes = [
    {
        path: RoutePaths.Root,
        name: 'Root', //keyof RoutePaths.Root
        component: HomeView,
    },    {
        path: RoutePaths.HelloWorld,
        name: 'HelloWorld', //keyof RoutePaths.HelloWorld
        component: HelloWorld,
    },
]

source: gharchive/issue

authors: Howard-Lam-UnitedVanning schoel-bis

repo: microsoft/TypeScript


text:
Allow '--noEmit' to override  'emitDeclarationOnly' from config.

Search Terms

TS5053
emitDeclarationOnly

Suggestion
Using "emitDeclarationOnly": true in your tsconfig.json prevents you to do typechecking only runs as running tsc --noEmit will throw the following error.
error TS5053: Option 'emitDeclarationOnly' cannot be specified with option 'noEmit'.

And the CLI does not look like to have any flag to bypass the error (eg. something like --noEmitDeclarationOnly).
I don't see a reason why a noEmit cli flag would not take precedence over the emitDeclarationOnly from the tsconfig.
Use Cases
With a project with a tsconfig.json set with emitDeclarationOnly and using another compiler like babel to produce the built javascript code, you want to be able to both:

Compile declaration files (running tsc)
Perform typechecking as a test stage (eg. travis) (running tsc --noEmit). Especially since you do not use TypeScript to compile (so a build could pass with typings errors).

Examples
https://github.com/mgcrea/node-influx-syslog
Checklist
My suggestion meets these guidelines:

[x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[x] This wouldn't change the runtime behavior of existing JavaScript code
[x] This could be implemented without emitting different JS based on the types of the expressions
[x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
[x] This feature would agree with the rest of TypeScript's Design Goals.

Hmm. What could go wrong? The worst I can think of is if someone passes --emitDeclarationOnly on the command line when they already have "noEmit": true in tsconfig.json, if they already had declaration or composite set for some reason, then the simplest implementation approach would probably still end up emitting nothing ...

+1

+1

@SamB seems reasonable, although to retain the general idea that CLI flags generally override configured behavior, cli flags should always override code emit settings from config, and noEmit should only override emit requests at the same level
For example, the noEmit flag overrides other flags that request code be emitted, and noEmit key in config overrides other keys in config that request code to be emitted. However, flags requesting code to be emitted will override noEmit key in config.
Pseudo-code for logic:
if (noEmit_flag) {
  do not emit anything
} else if (noEmit_flag && emitSomething_flag) {
  do not emit anything
} else if (noEmit_key && emitSomething_flag) {
  emit what was requested, cli flags always override
} else if (noEmit_key && emitSomething_key) {
  do not emit anything
}

FYI, this works:
tsc --noEmit --emitDeclarationOnly false

Why is this issue stale? I think that the request is a valid one, and many other plugins do the same. I am seconding @aryzing s comment, that cli flags should overwrite configuration flags, so that if I generally want to emit only declarations when compiling with typescript, I add that to the config, and otherwise, I run tsc with the --noEmit flag, when I am only typechecking.
Until that, @draperunner s workaround is okay, but I think that if cli parameters do not take precedence over the config parameters, this could lead to other strange bugs, which won't be as easily solvable as this one.

authors: SamB aryzing b2whats draperunner ekr3peeK markypython mgcrea


text:
Add way force TS Server to use a specific set of tsconfig/jsconfigs

From https://github.com/microsoft/vscode/issues/12463
Search Terms

tsconfig / jsconfig
tsserver

Problem
Some common project templates (such as angular) generate config file with names such as tsconfig.dev.json. The TS Server used by VS Code will not load this project because the file is not named tsconfig.json. We only load project files exactly named tsconfig.json
Feature Request
Allow users to configure a specific set one or more project config files that the TS Server should load, such as /Users/matb/project/test/tsconfig.dev.json. This could either be configured using a server command line flag or using the configure request in TS
How do we handle additional projects?
If specific project files have been configured, one proposal is that we only load those projects (and never fall back to loading additional projects). Using this approach, when a user opens a new file:

If that file is part of one of the configured projects, then open it inside the project
Otherwise load the file in the inferred/global project

As an alternative to this to better support multi-root workspaces in VS Code, we could instead only fall back to loading an additional project if that project is not under the roots of any of the configured projects. For example, if I configured /Users/matb/project/test/tsconfig.dev.json as the project to load, we should never load additional projects under: /Users/matb/project/test/** but could load ones from under /Users/matb/project/other/**

Users/matb/project/test/tsconfig.dev.json. This could either be configured using a server command line flag or using the configure

@RyanCavanaugh Would you take a pull request for this? If so, has it been decided whether a command line flag or configure request would be preferred?

Any update on this? Anything any of us can do to help move this along?

@RyanCavanaugh any update on this? Is there anything we can do to make this done?

Bump

This issue is almost 5 years old, with an update from 2020 saying "we will try to plan this in the next 6 months"... Is there any plan to move forward on this?

just a friendly little bump
this feature would be very nice for conflicting types in different types of testing files

authors: Droseyge92 HarTstaRx albertodiazdorado gluxon lobsterkatie mccolljr mjbvz randallt21


text:
CFA Assertions Not Active on Implicitly-Typed Function Calls

TypeScript Version:  3.7.0-insiders.20190923 (this tgz from this comment)
Search Terms: asserts cfa control flow analysis
Code
class Foo {
}

interface BarChild {
    parent: Bar;
}

class Bar {
    static staticAdd(f: Foo): asserts f is Foo & BarChild {}
    add(f: Foo): asserts f is Foo & BarChild {}
    innerTest() {
        const innerFoo = new Foo();
        this.add(innerFoo);
        innerFoo.parent;  // this compiles successfully
    }
}

function main() {
    const foo1 = new Foo();
    const bar1 = new Bar();
    bar1.add(foo1);
    foo1.parent;  // this is an ERROR - Property 'parent' does not exist on type 'Foo'. ts(2339)

    const foo2 = new Foo();
    Bar.staticAdd(foo2);
    foo2.parent;  // this compiles successfully
}

The Bar.add assertion works when called inside another method of Bar but fails when called externally from main. I added a static function assertion to show that assertion still works otherwise in main.
Expected behavior: In main after bar1.add(foo1), foo1 should be of type Foo & BarChild.
Actual behavior: In main after bar1.add(foo1), foo1 is still type Foo.
Playground Link: I've duplicated the sample code above in this playground link, but at the time of posting the nightly version does not have these changes.
Related Issues: https://github.com/microsoft/TypeScript/pull/32695 This feature was merged to master yesterday, so instead of commenting on a closed PR I opened a new issue.

I think this is working as intended, and the issue is that you are missing explicit type annotations.

A function call is analyzed as an assertion call or never-returning call when ….
each identifier in the function name references an entity with an explicit type, and

This makes the error go away:
const bar1: Bar = new Bar();

I will just put this here to annoy people.

Ah, thanks for the link to the comment. That explains what is going on.
Was it a specific decision to require explicit type annotations to "activate" assertions, or is it a technical restriction? Regardless, it would be nice to not have to add otherwise-unnecessary type annotations to get this to work.

It's a technical restriction, otherwise control flow would have to do an unbounded number of passes to determine if a given function ever returned

Alright, thanks for the quick and informative response @jack-williams and @RyanCavanaugh. While I do agree with Jack's comment on the PR that this will catch a lot of people, feel free to handle this issue however you see fit.

I'm going to mark this working as intended, although we should probably discuss whether to issue errors when assertion functions and non-returning functions are used in a manner that doesn't get picked up by control flow analysis. See https://github.com/microsoft/TypeScript/pull/32695#issuecomment-522251155.

Yeah, an error with a corresponding annotation quick-fix would hopefully mitigate this?  Or something to stem the expected tide of duplicates of this issue being filed and the analogous SO questions.

My concern with an error would be libraries upgrading to use assertions and clients breaking because they didn't use a type annotation on previously OK code.

Ok, with two issues reported in short order I'm convinced this merits an error as suggested by @jack-williams. I'm changing this back to a bug.

My concern with an error would be libraries upgrading to use assertions and clients breaking because they didn't use a type annotation on previously OK code.

I'm not concerned with issuing errors on non-CFA-recognized assertion function calls since assertions are new feature and no existing code uses them.
The fact that we now report reachability errors following calls to never-returning function is already a breaking change, so also issuing errors when such functions are called in a manner that CFA doesn't recognized doesn't materially change the situation.

Makes sense - I overlooked the general changes you made to reachability analysis beyond assert.

authors: RyanCavanaugh ahejlsberg jack-williams jcalz molisani


text:
Types fulfill an interface, but interfaces do not

TypeScript Version:  3.7.x-dev.201xxxxx

Search Terms:
Constrain type to a specific set of types, serializable values, nested types
Code
This version does not work:
export type BaseTypes
 = string | number | boolean | null | P;
export interface ICacheableObject
 extends Record<string, Cacheable
> {}

export type Cacheable
 =
  | BaseTypes

  | BaseTypes
[]
  | ICacheableObject

  | ICacheableObject
[];

interface SimpleUserGroup {
  group_id: string;
}

// no extra classes, just basic primitives/arrays/objects
interface UserInfo {
  user_id: string;
  groups: SimpleUserGroup[];
}

// the objective is for this to be allowed:
const data: Cacheable = {
  user_id: 'test',
  groups: [],
} as UserInfo;

class Foo { test = 'abc' }
// but not this
const otherData: Cacheable = {
  foo: new Foo()
};

This version does work (using types instead of interfaces):
export type BaseTypes
 = string | number | boolean | null | P;
export interface ICacheableObject
 extends Record<string, Cacheable
> {}

export type Cacheable
 =
  | BaseTypes

  | BaseTypes
[]
  | ICacheableObject

  | ICacheableObject
[];

type SimpleUserGroup {
  group_id: string;
}

// no extra classes, just basic primitives/arrays/objects
type UserInfo {
  user_id: string;
  groups: SimpleUserGroup[];
}

// the objective is for this to be allowed:
const data: Cacheable = {
  user_id: 'test',
  groups: [],
} as UserInfo;

class Foo { test = 'abc' }
// but not this
const otherData: Cacheable = {
  foo: new Foo()
};

Expected behavior:
I expect that UserInfo can be a valid value when compared to Cacheable as it only contains basic strings/arrays. The intended use case is to create a type safe serializer.
Actual behavior:
When using interfaces, typescript wants UserInfo to have an index or to be a type instead of interface.
Playground Link:
Not working: https://www.typescriptlang.org/play?#code/KYDwDg9gTgLgBDAnmYcBCBDAzsAKs4LAHgAUA+OAXjixigEsA7AczgB85GBXAWwCNgUdnD4QIAG2AZGw7uPHCSAbgCwAKFCRYcJjEEAzDAGNUASQDCxgBZS+kgPJ8AVsCMxSFUHsYATLHAAlV2gfIloGFgAaOEsjGww7YA8KAG8AX3V1TWh4JBQY61tJUipOYAA3QQpKdThhTBx8FGJyWvrsPAIWsgBtAF02jgtChIdnV3dWtTqh2PjExxc3D37VNXVdA2NUAGV6HjBJAFUcKABxKAguMDgUtuZL64B9eh8ALho6JmY1jPW1AD0AM4EDgXigGDgRnE2BwWGiTi4tBE2HoRjgYAYPHoMHolSwAIwUAhiAJEHGbiwG0YeighhMcBOglMjH0oLu0zgSMEL3enwiP3ujzAWA+ewOx1OFyuYFW6j+6iBCBscHJS1xlR0-jZQhgVno-hgoIEcAw8ggAHdgO91EYIIxkT4MDAMB85kVUNQOXVuVBeR8AOR6WgByJCmWiuD9MNqNKm-xMqAstlrTJqaGwuAAMTEtwQhHg1ADCSMAbgfyVfC48EYEFy+qp6ftyLrNigABFna6CnEPaVvXA2RAPoxgBbs2IABQASnlSiAA
Working: https://www.typescriptlang.org/play?#code/KYDwDg9gTgLgBDAnmYcBCBDAzsAKs4LAHgAUA+OAXjixigEsA7AczgB85GBXAWwCNgUdnD4QIAG2AZGw7uPHCSAbgCwAKFCRYcJjEEAzDAGNUASQDCxgBZS+kgPJ8AVsCMxSFUHsYATLHAAlV2gfIloGFgAaOEsjGww7YA8KAG8AX3V1TWh4JBQY61tJUipOYAA3QQpKdThhTBx8FGJyWvrsPAIWsgBtAF02jgtChIdnV3dWtTqh2PjExxc3D37VNXU81ABleh4wSQBVHCgAcSgILjA4FLbmc8uAfXofAC4aOiZmNYz1tQB6P6cCBwLxQDBwIzibA4LDRJxcWgibD0IxwMAMHj0GD0SpYP4YKBgxB4iDjNxYDYEOBHQSmRj6YE3aZwBGCJ6vd4RL63e5gLBvHZ7Q7HM4XMCrdQ-dQAhA2OCkpbYyo6fwMoQwKz0fwwYECOAYeQQADuwFe6iMEEYiJ8GBgGDecyKqGoTLqrKg7LeAHI9LQvZEeWL+XB+gG1Gl9f4aVA6Qy1pk1JDoXAAGJia4IQjwahehJGL1wH4yvhceCMCC5TUUxOWxEVmxQAAitvtBTiTtKrrgDIgb0YwCNqbEAAoAJSSpRAA
Related Issues:

Type aliases can implicitly fulfill an index signature (which is being declared at the Record<string> usage), but not interfaces (since they're subject to declaration merging)

Design notes at https://github.com/microsoft/TypeScript/issues/7059

Crosslinking #15300

authors: DanielRosenwasser RyanCavanaugh jcalz zachrip


text:
Unrecognized type

https://www.typescriptlang.org/play?#code/KYDwDg9gTgLgBDAnmYcDCAbAhgZxwOSwFtUBeOAcgGMBXKAEwrgB9KcALYDDJ1iqCDRjAoOCgCgkKOAEEwYAKo5gmXDjjkA3uLi64HLhgBccTXCz16ACghgTAOxpEARiICUDp66gAaOADdPFxE4AF8dPVoGEzMLaw84R2DfOABzYBgrBIAFASIAS2UAHiTvAD4wiN0BIREcGPNLGztTcyDvMITSkT9AxK8Q8PCpVDkwAGUYLGEtKv1Obgb6Z3bBuaj6JZX+5Mq9OBrhUS3VqErh5FQAJQy6exl7RAAVS6KnuFBhe3p1KwA6AFYKCpExYR5uDQVMGICrkd6fYDfX4Av5AkHmcGQuC5CAFYr5ewAMxCVwqAH44Fc4CYbjA7i8UG8yuJxKBILAEJdZPIAOrAZwAeXsGjgRTm8JAXx+6GweEIJB8cywYHyH0liOlAGtgIgIITuYplKo8ABtJ4AXUV+ygwAAjmqpeoxkoVLKcGbzSblflzQ6Nb9-oDgaDMaQoZiKdkgcQMnUis6jW6PV6VeaKg5gP4enMbeoEUiDS7je6LSmfX6C1ZA6jgxjEBCw3WIRTaXcHs9XgnXWpk9609TEpns-sys0GlQ3fLgCYnn5vaCVX4bbaTMul8B6gcN50sTi8cAirnmVQIPYcPBz9Np2NJlfZvsDItWssTAAGMJWyJ0TbP7bv0KftUghHJuZgvnA-7iOEJ5nvAADu-JCiYYx8oKwrkFYuaQGewANhU9jAHB2J5IUwBVhAmp+CIUB4aY6ynueHykFkYYEURACiUACFAVgmgARAhaFwHxPhYQxwB-BOahTuuODYcoqKLmJOF-GuykKbm5p-AAVhABJWBQAC0FBuG4ADccw4HB+QwFQ7BwJhG7yRJUlyjGELaPs+xULgqDUN+FBGHMXl6FZNl2Q56kSd6HnBSFXk+colBxIFcXxfFl7CJJ35-MsIpRapG5pelXnODaWCahZJXxfQwCElgNAYDAQXVdVNp0lAwpkW4xX7OErVwGVwAVVV8WJX5j48C1rVhbZ9mOXJ4mKfksUDd5vnJZYqVrRlUxZZNuXOPlTlLbmvWtUNI3nSFtX1Y1zXXSV7V3B8WSPf1F3lZVxXjZQhx1NtM3WXNkUnSpMV0Ttui-RQKXTVDoV7RJ-2iIdx2LSpZ0I-sl3fQjt0NU18PY89nWvT1A0fdVuOjTddWEw9A2k11b19XM+T6gtznLX8BK1SAAqEgZnHcSZGikOQhkAIyrfFFFc6dG4U3ooQfBgSWefF1EK5jStzEMPVAA

If you want to report an issue you should follow issue template

This doesn't fill in the issue template and looks like a question which might be better-suited for Stack Overflow.

authors: DanielRosenwasser IllusionMH see7788


text:
Type guard for nullability is inconsistent

Hi there!
I have an issue with the default nullability type guard. I've reproduced it to this bit of code:
interface Foo { x: number; }

export class Demo {
	list = [{ x: 24 }, { x: 42 }];
	foo: Foo | null = null;

	work() {
		if (!this.foo) {
			return;
		}

		console.log(this.foo.x); // fine, no problem
		console.log(this.list.findIndex(val => val.x === this.foo.x)); // error, Object (this.foo) is possible null!
	}
}

I found it strange at first, as I'm checking the value right before. It's also easily enough fixed:
let x = this.foo.x;
console.log(this.list.findIndex(val => val.x === x));

It's just a bit annoying, really. But I get that the compiler doesn't fully check everything down because of performance reasons and whatnot. I'd get over it if wasn't for this strange inconsistency I ran into. If I remove the class from the picture:
interface Foo { x: number; }

let list = [{ x: 24 }, { x: 42 }];
const work = (foo: Foo | null) => {
	if (!foo) {
		return;
	}

	console.log(foo.x); // fine
	console.log(list.findIndex(val => val.x === foo.x)); // fine too!
};

Then everything works fine. No errors with that code, it's all good.
I think it's a bug? Should this inconsistency make sense somehow? Does the type guard differentiate between parameters, class members, this-references?

Duplicate of #9998.  In general, type narrowings are lost at closure boundaries.  There are a few exceptions, like for function parameters that aren't reassigned to anywhere in the function, but that's the general rule.
There's actually an issue template explaining this, but weirdly, people who actually run into this seem to overlook it and it only ever gets clicked for unrelated issues:
https://github.com/microsoft/TypeScript/issues/new?assignees=&labels=Duplicate&template=types-not-correct-in-with-callback.md&title=

Duplicate of https://github.com/microsoft/TypeScript/issues/9998. In general, type narrowings are lost at closure boundaries because the compiler doesn't know when or how many times a callback will run. There are a few exceptions, like for function parameters that aren't reassigned to anywhere in the function, but that's the general rule.

Ah, that makes sense. Between calls, another piece of code may change the class member where a local parameter cannot be changed like that. Fair enough, thanks!

There's actually an issue template explaining this, but weirdly, people who actually run into this seem to overlook it and it only ever gets clicked for unrelated issues:

I was retracing my steps just now as to how I might've overlooked it. When I pressed the "New Issue" button half an hour ago, I went straight to the form to describe my issue, no templates on offer. Just pressing it now, I get a lovely page with templates to choose from, one of which is the one you linked. Maybe because this was my first issue?

authors: JPtenBerge fatcerberus


text:
Multiple types not correctly marked as Iterable in lib.dom.d.ts, and also have missing entries() methods

Multiple built-in types not correctly marked as Iterable in lib.dom.d.ts, and also have missing entries() methods
Configuration Check
Typescript 5.0.3.
My compilation target is esnext and my lib is ["esnext", "dom", "webworker"].
Missing / Incorrect Definition
The following types are iterable but not marked as such:

Headers
FormData
URLSearchParams

This is not an exhaustive list, just the ones I noticed.  There are likely others.
Sample Code
From Node/Safari/Chrome Javascript consoles:
> new Headers()[Symbol.iterator]
[Function: entries]
> new FormData()[Symbol.iterator]
[Function: entries]
> new URLSearchParams()[Symbol.iterator]
[Function: entries]

These however result in the following kind of Typescript error when compiling:
for (const [key, value] of request.headers) { // request.headers is of type Headers from lib.dom.t.ts
  requestHeaders[key] = value;
}

...

error TS2488: Type 'Headers' must have a '[Symbol.iterator]()' method that returns an iterator.

Note: these type definitions are also missing the .entries() method as defined in their various specs.
Documentation Link
From https://developer.mozilla.org/en-US/docs/Web/API/Headers

An object implementing Headers can directly be used in a for...of structure, instead of entries(): for (const p of myHeaders) is equivalent to for (const p of myHeaders.entries()).

From https://developer.mozilla.org/en-US/docs/Web/API/FormData:

An object implementing FormData can directly be used in a for...of structure, instead of entries(): for (const p of myFormData) is equivalent to for (const p of myFormData.entries()).

From https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams:

An object implementing URLSearchParams can directly be used in a for...of structure to iterate over key/value pairs in the same order as they appear in the query string, for example the following two lines are equivalent: ...

My compilation target is esnext and my lib is ["esnext", "dom", "webworker"].

You're missing dom.iterable.

Wow TIL about dom.iterable after 7 years of using Typescript.  Very weird ecosystem quirk.  Thanks!

IIRC it's because iterable wasn't supported by all major browsers when introduced. Not sure if it's still reasonable to split it, given that (according to CanIUse) since 2018 all major browsers support it.

authors: MartinJohns carlansley


text:
Add workflow_dispatch to our nightly publish script.

https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/

🤷🏻♂ indeed!

A miracle! I'm going to write all my UI in YAML from now on!


text:
pdfgrep on PowerShell :: file name not shown

Version
Microsoft Windows [Version 10.0.19043.1466]
WSL Version

[X] WSL 2
[ ] WSL 1

Kernel Version
5.10.16
Distro Version
Ubuntu 20.04
Other Software
PowerShell:
Major: 5
Minor: 1
Build: 19041
Revision: 1320
Repro Steps

apt-get install pdfgrep
pdfgrep -HinR 'DSINDIP' DatenModel/

Expected Behavior
In WSL2 on Terminal you see the file name:

Actual Behavior
In WSL2 on PowerShell you don't see the file name:

Diagnostic Logs
No response

@francesco1119 thank you for filing this issue, but I believe this is not a WSL-related issue. It appears that the behavior is due to how the output is displayed on Powershell. I would recommend filing this issue there:
https://github.com/PowerShell/PowerShell/issues

repo: microsoft/WSL


text:
Updated Readme

Added S.No. in table headers.

Thanks @ahtesham007 for suggestion the addition of the column header for the numbers. These numbers refer to the lesson numbers. Instead of having a header of "Lesson Number", or even with abbreviations of number, we opted to leave blank to preserve characters in the width. "S.No." is short in characters, but not descriptive enough for all users to know what it means, so for now we'll keep the column header empty.

repo: microsoft/Web-Dev-For-Beginners


text:
Support PrimaryLanguageOverride from unpackaged apps

when calling the following code from an unpackaged app, it throws an error. This is needed to be able to use x:Uid localization in XAML and control the language it picks.
App::App()
{
    ...
    Windows::Globalization::ApplicationLanguages::PrimaryLanguageOverride(...)
    ...
}

Hi @shelllet, this API isn't intended to work from an unpackaged context.

Additionally, we've started a list of APIs like this that don't work from unpackaged apps that we need to either (1) document better with warnings so you know before you try using it, or (2) add new WinAppSDK APIs that work for unpackaged apps: #1702

So what Api should I call to set the defualt language?

@axelandrejs how should unpackaged apps set their default language for resolving resources and XAML localization?

MRTCore determines the default language using Windows::Globalization::ApplicationLanguages::Languages (https://github.com/microsoft/WindowsAppSDK/blob/main/dev/MRTCore/mrt/Microsoft.Windows.ApplicationModel.Resources/src/ResourceContext.cpp#L106-L113)

@huichen123 yes, and how should unpackaged apps change the default language for their app? As shelllet asked, in a packaged app, developers can call ApplicationLanguages::PrimaryLanguageOverride('en-us') to override the default language, but that API doesn't work for unpackaged apps. How should unpackaged apps override the default language when using MRT Core?
Many apps (including my own) allow the user to pick their own language independent from the OS language.

Before PrimaryLanguageOverride is fixed, you may have to pass in a ResourceContext, and set its Language qualifier value to the desired value.

Before PrimaryLanguageOverride is fixed, you may have to pass in a ResourceContext, and set its Language qualifier value to the desired value.

Will these unpackaged API be fixed before GA version? This breaks x:Uid localization and seems to have no workaround.

sorry, it will not be fixed for GA.

Re-opening this, as it's something we should implement at least someday so that unpackaged apps can use XAML x:Uid localization and control the language the app uses.
Tagging it as a bug too, this definitely is somewhere between bug and "feature", but since the overall scenario of localizing your unpackaged app with control over the language doesn't work, I'll add the bug tag.

Hi @andrewleader
any news?
can we expect this feature/bugfix in WASDK 1.1/preview/experimental?

@huichen123 is the owner of this feature/bug and maybe can speak toward whether this would be in 1.1.
And FYI Mahdi, I moved to a different project in Microsoft, the right person to contact with general WinAppSDK questions would be marb2000. Thanks!

@huichen123  Hi! Any news on this? Convenient globalization is an indispensable feature for unpackaged apps to use WinAppSDK. 😋

Windows.Globalization.ApplicationLanguages was designed for packaged app. Instead of inventing local settings for unpackaged app, it might be easier WinUI can take ResourceManager/ResourceContext from app. @evelynwu-msft ?

Agreed with this. Language is not the only interesting setting here. EG, what about scale or theme? The way to set these is via the context, so that context should be exposed.

Hello, is there any update on when will this be implemented? Currently, there is no easy way to localize the strings in XAML for an unpackaged app, which is very frustrating😞

As a workaround, I have a NuGet package that also works with unpackaged apps. It's uses the general Resources.resw strings, so you should be able to switch back when the WinUI team comes with a solution 😎

I am hitting this issue when attempting to support language changes from an unpackaged XAML islands (non-WinUI 3) app. The API works as expected when the app is packaged. What should I do? I don't think system XAML uses MRTCore.

Is anyone working on this?

any news?
@evelynwu-msft
we are in 1.4-preview1 and we cant change app language!

good news
https://github.com/microsoft/WindowsAppSDK/pull/4181

Doesn't solve my problem :(

I am hitting this issue when attempting to support language changes from an unpackaged XAML islands (non-WinUI 3) app. The API works as expected when the app is packaged. What should I do? I don't think system XAML uses MRTCore.

@sylveon Can you provide a sample app? Thanks.

Any app using system XAML islands will fail when trying to use Windows::Globalization::ApplicationLanguages::PrimaryLanguageOverride without being packaged. WASDK cannot solve this without a complete migration to WinUI 3, which is non-trivial.

@duncanmacmichael i tested with v1.6-exp2 and now we can use
Microsoft.Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = "fa-IR";
and everything is working fine, and i think this issue can be closed

Thanks, @ghost1372!
Closing as fixed in 1.6.240701003-experimental2 via microsoft/WindowsAppSDK#4523.

I'm using 1.6.240701003-experimental2 in my unpackaged app and it still doesn't work.
It causes a COMException with message 'No such interface supported'

@TheVoidSeeker
You can see the localization in action in this video.

I'm using 1.6.240701003-experimental2 in my unpackaged app and it still doesn't work.
It causes a COMException with message 'No such interface supported'

Show your codes, because i am using in unpackaged without issues

After repairing my Visual Studio installation and cleaning all intermediate and output files, it now works without code changes.
Not sure what was happening there.
I did Clean & Rebuild of the project several times yesterday, but still always got the mentioned error.
I'm very glad that it finally works, as this is a very important use case for our customers.
Thanks a lot for your work!

authors: AndrewKeepCoding Blinue Iris0905 TheVoidSeeker andrewleader axelandrejs btueffers codendone ghost1372 huichen123 seven-mile shelllet stefansjfw sylveon

repo: microsoft/WindowsAppSDK


text:
Deployment Issues with Outdated Azure Blob Storage URIs and Missing Storage Keys in Scripts

Hello,
I am encountering several issues with the deployment of the "WingtipTicketsSaaS-DbPerTenant" project using both the "Deploy to Azure" button provided in the official documentation and the manual deployment from the GitHub repository. Below are the details of the issues:

Missing storageKey in ARM Template: The ARM template lacks the storageKey parameter when deployed through both the "Deploy to Azure" button and manual deployment using the code from the GitHub repository. This omission leads to errors related to invalid storage credentials during the import operation of the .bacpac file. The exact error message encountered in both deployment methods is: "The ImportExport operation failed because of invalid storage credentials."

Inconsistency in storageUri Domain Names: There is a discrepancy in the domain names of the storageUri between the template deployed via the "Deploy to Azure" button and the latest version on GitHub. The domain used by the "Deploy to Azure" is wtdemoresourcestemp.blob.core.windows.net, whereas the GitHub  codes uses wingtipsaas1.blob.core.windows.net.

Resource Not Found Error for .bacpac File: Directly accessing the storageUri of the .bacpac file provided in the latest GitHub repository version (https://wingtipsaas1.blob.core.windows.net/bacpacs-dpt/contosoconcerthall.bacpac) results in a "Resource Not Found" error. The error message is as follows:

  <Error>
   ResourceNotFound
   <Message>The specified resource does not exist. RequestId:97c12964-f01e-003c-23d9-8fbed1000000 Time:2024-04-16T08:38:33.5851022Z</Message>
   </Error>

These issues are causing significant deployment failures, and it seems that there might be outdated information or errors in the deployment scripts or documentation. Any assistance or updates to resolve these problems would be greatly appreciated.
Thank you.

I experience the same issue (obvious I guess). Any resolution or workaround that can be applied? Would like to try this out so that i can eventually apply this to my own solution.

authors: faikriza np-daxton


text:
Does useTrackEvent trigger re-render?

As useTrackEvent actually returns setData from useState - does it mean it will trigger component re-render every time I send event?

@VitaliyPotapov it is returning the setData function, but not calling it setData(). So it will not directly re-rendered. And if you are using versions after React 16, calling setState with null also won't trigger an update.

Thanks Karlie! I'd like to clarify: every time I send event I actually call returned setData() -> state gets updated and from my understanding component will re-render. Is it correct?
I'm thinking why useTrackEvent is implemented as useState + useEffect, not just useCallback.

@VitaliyPotapov Thanks for clarification! I guess you are using useTrackEvent() like this example
So return setData() directly for useTrackevent() could give you more controls on trackEvent data!

Yes I also wrap useTrackEvent in useCallback. But my question is about extra re-render that seems to occur even in your example. Please correct me if I'm wrong:

user clicks on button, onClick handler calls setTestNumber(curTestNumber + 1)
component state changed -> 1st re-render -> useEffect calls trackEvent(testNumber) that writes to state new testNumber
component state changed again -> 2nd re-render (extra re-render!)
process finished because no useEffect dependencies changed

My question is - could we avoid extra re-render by implementing useCustomEvent without writing to component state?
For example like this:
export default function useCustomEvent<T>(
  reactPlugin: ReactPlugin,
  eventName: string,
  eventData: T,
): AIReactCustomEvent<T> {
  return useCallback(() => {
    reactPlugin.trackEvent({ name: eventName }, data);
  }, [reactPlugin, data, eventName]);
}

@VitaliyPotapov I thought you were referring to duplicated events are being triggered. 😊And you are correct! useCallBack() definitely optimizes performance by skipping re-rendering! However, downside of using useCallback hook is suggested here  (correct me if I am wrong)

repo: microsoft/applicationinsights-react-js


text:
installcredprovider.ps1 cannot install version 0.1.20

In https://github.com/microsoft/artifacts-credprovider/blob/master/helpers/installcredprovider.ps1, when a version is explicitly specified, it tries to find a release named the given version.
if (![string]::IsNullOrEmpty($Version)) {
    try {
        $releases = Invoke-WebRequest -UseBasicParsing $releaseUrlBase
        $releaseJson = $releases | ConvertFrom-Json
        $correctReleaseVersion = $releaseJson | ? { $_.name -eq $Version }
        $releaseId = $correctReleaseVersion.id
    } catch {
        Write-Error $versionError
        return
    }
}

Version 0.1.20 does not have a name set on https://api.github.com/repos/Microsoft/artifacts-credprovider/releases
[
{
    "url": "https://api.github.com/repos/microsoft/artifacts-credprovider/releases/21203148",
    "assets_url": "https://api.github.com/repos/microsoft/artifacts-credprovider/releases/21203148/assets",
    "upload_url": "https://uploads.github.com/repos/microsoft/artifacts-credprovider/releases/21203148/assets{?name,label}",
    "html_url": "https://github.com/microsoft/artifacts-credprovider/releases/tag/v0.1.20",
    "id": 21203148,
    "node_id": "MDc6UmVsZWFzZTIxMjAzMTQ4",
    "tag_name": "v0.1.20",
    "target_commitish": "master",
    "name": "",
...
},
{
    "url": "https://api.github.com/repos/microsoft/artifacts-credprovider/releases/20450027",
    "assets_url": "https://api.github.com/repos/microsoft/artifacts-credprovider/releases/20450027/assets",
    "upload_url": "https://uploads.github.com/repos/microsoft/artifacts-credprovider/releases/20450027/assets{?name,label}",
    "html_url": "https://github.com/microsoft/artifacts-credprovider/releases/tag/v0.1.19",
    "id": 20450027,
    "node_id": "MDc6UmVsZWFzZTIwNDUwMDI3",
    "tag_name": "v0.1.19",
    "target_commitish": "master",
    "name": "0.1.19",
...
    }
]
...

Thanks for reporting! This is now fixed.

authors: grantborthwick satbai

repo: microsoft/artifacts-credprovider


text:
[Bug]: name Field Compatibility Issue in AssistantAgent and UserProxyAgent with fireworks.ai API

Describe the bug
Description
When interfacing with the fireworks.ai API using the AssistantAgent and UserProxyAgent classes, I've encountered a compatibility issue due to the mandatory name field within these classes. The fireworks.ai API rejects the request with an InvalidRequestError because the name field is not expected.
Steps to reproduce

Use AssistantAgent or UserProxyAgent with the name field included in the request payload.
Send a request to the fireworks.ai API endpoint.
The API responds with an InvalidRequestError, indicating the name field is extraneous.

Expected Behavior
Expetced Behavior
There should be compatibility with fireworks.ai API, which means either the name field should be accepted, or there should be a way to exclude it from requests depending on the API requirements.
Actual Behavior
The request is rejected by the fireworks.ai API, and the following error message is received:
openai.error.InvalidRequestError: [{'loc': ('body', 'messages', 1, 'name'), 'msg': 'extra fields not permitted', 'type': 'value_error.extra'}]
Possible Solutions

Allow conditional inclusion of the name field in the request payload based on the API being used.
Modify the AssistantAgent and UserProxyAgent classes to make the name field optional or provide a method to exclude it for certain APIs.

Concerns
While a temporary fix could involve modifying the request information within the classes, this could lead to additional issues upon future updates. Thus, a permanent solution from the autogen team would be preferable to ensure consistent support for various models.
Additional Context

The issue occurred with models mixtral-8x7b-instruct and llama-v2-7b-chat.
I am willing to implement a temporary fix by modifying the request data myself, but due to work commitments, it might take 3-5 days before I can address this.
There is a concern that manual code modifications might introduce new issues with future version updates.

Request
I would appreciate guidance on how this issue might be resolved on an official level. It's not clear whether this is an issue with the settings on fireworks.ai's side or if the model itself does not support the name field. I hope that autogen can officially support multiple models to ensure broad compatibility.
Screenshots and logs
Traceback (most recent call last):
File "/home/zyl/chatdev/autogen/sqlFormat/demo.py", line 57, in
user_proxy.initiate_chat(
File "/home/zyl/miniconda3/envs/pyautogen/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py", line 531, in initiate_chat
self.send(self.generate_init_message(**context), recipient, silent=silent)
File "/home/zyl/miniconda3/envs/pyautogen/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py", line 334, in send
recipient.receive(message, self, request_reply, silent)
File "/home/zyl/miniconda3/envs/pyautogen/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py", line 462, in receive
reply = self.generate_reply(messages=self.chat_messages[sender], sender=sender)
File "/home/zyl/miniconda3/envs/pyautogen/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py", line 781, in generate_reply
final, reply = reply_func(self, messages=messages, sender=sender, config=reply_func_tuple["config"])
File "/home/zyl/miniconda3/envs/pyautogen/lib/python3.10/site-packages/autogen/agentchat/groupchat.py", line 162, in run_chat
speaker = groupchat.select_speaker(speaker, self)
File "/home/zyl/miniconda3/envs/pyautogen/lib/python3.10/site-packages/autogen/agentchat/groupchat.py", line 91, in select_speaker
final, name = selector.generate_oai_reply(
File "/home/zyl/miniconda3/envs/pyautogen/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py", line 606, in generate_oai_reply
response = oai.ChatCompletion.create(
File "/home/zyl/miniconda3/envs/pyautogen/lib/python3.10/site-packages/autogen/oai/completion.py", line 803, in create
response = cls.create(
File "/home/zyl/miniconda3/envs/pyautogen/lib/python3.10/site-packages/autogen/oai/completion.py", line 834, in create
return cls._get_response(params, raise_on_ratelimit_or_timeout=raise_on_ratelimit_or_timeout)
File "/home/zyl/miniconda3/envs/pyautogen/lib/python3.10/site-packages/autogen/oai/completion.py", line 224, in _get_response
response = openai_completion.create(request_timeout=request_timeout, **config)
File "/home/zyl/miniconda3/envs/pyautogen/lib/python3.10/site-packages/openai/api_resources/chat_completion.py", line 25, in create
return super().create(*args, **kwargs)
File "/home/zyl/miniconda3/envs/pyautogen/lib/python3.10/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 157, in create
response, _, api_key = requestor.request(
File "/home/zyl/miniconda3/envs/pyautogen/lib/python3.10/site-packages/openai/api_requestor.py", line 299, in request
resp, got_stream = self._interpret_response(result, stream)
File "/home/zyl/miniconda3/envs/pyautogen/lib/python3.10/site-packages/openai/api_requestor.py", line 713, in _interpret_response
self._interpret_response_line(
File "/home/zyl/miniconda3/envs/pyautogen/lib/python3.10/site-packages/openai/api_requestor.py", line 779, in _interpret_response_line
raise self.handle_error_response(
openai.error.InvalidRequestError: [{'loc': ('body', 'messages', 1, 'name'), 'msg': 'extra fields not permitted', 'type': 'value_error.extra'}]
Additional Information
AutoGen Version: 0.1.14
Operating System: Linux version 5.15.133.1-microsoft-standard-WSL2 (root@1c602f52c2e4) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP Thu Oct 5 21:02:42 UTC 2023   Ubuntu 22.04.3 LTS
Python Version:Python 3.10.13
Related Issues: not found

Looking forward to your response and a possible solution. Thank you!

Thanks for the issue. I think this should be a feature request not a bug. Do you know if there is a reason that fireworks.ai is not compatible with OpenAI API?

Thanks for the issue. I think this should be a feature request not a bug. Do you know if there is a reason that fireworks.ai is not compatible with OpenAI API?
I apologize for choosing the incorrect method to raise an issue; it was an oversight on my part. I have posted the query along with the relevant logs on the fireworks.ai Discord channel and am currently unsure of the cause. However, upon reviewing the documentation for the OpenAI API, I did not find any mention of using the 'name' field within 'message' field. Thank you for your response, and I am hopeful that a solution can be found quickly. It would be fantastic to have Autogen work seamlessly with APIs provided by most mainstream teams. Each model has its unique strengths, and the prospect of integrating an assistant agent that's already equipped with a knowledge base is particularly exciting – the potential synergy is thrilling to consider.

No worries. Could you see if this problem still exists in the latest version?

So the name field is pretty sparingly documented by OpenAI -- it's easy to miss. I am not surprised there are implementations that lack it.
Having said that, we use this field for bookkeeping in GroupChat as well, and I would be nervous about removing it or adding yet another flag. I wonder if there is something we can do that is more general. Perhaps allowing one to provide a validator function in llm_config that could handle last minute transformations right at the moment where the LLM is called. Or perhaps abstracting the Client, so that people can use custom implementations.
TL:DR; I have a strong preference to adding general hooks rather than addressing incompatibilities filed by field, or provider by provider.

I remember at one-point OpenAI supports the "name" field, perhaps back in chatml days. @afourney could you point out one example of our code base that uses the "name" field?

I see. It is also in here: https://github.com/microsoft/autogen/blob/main/autogen/agentchat/conversable_agent.py#L479

No worries. Could you see if this problem still exists in the latest version?

Yes, I updated to version 0.2.2, but the issue persists:
openai.BadRequestError: Error code: 400 - {'error': {'object': 'error', 'type': 'invalid_request_error', 'message': "[{'loc': ('body', 'messages', 1, 'name'), 'msg': 'extra fields not permitted', 'type': 'value_error.extra'}]"}}

Many different ways to resolve this issue, but all would require change the source code.
Solution 1: Create a custom _message_to_dict function
An easy solution is to remove the "name" file in the _message_to_dict function in ConversableAgent. However, this change would mess up some features in group chat, where the name could be useful for a chat history.
So, a slightly better approach is to remove the "name" filed and then add the name into the message.
def firework_message_to_dict(message: Union[Dict, str]) -> Dict:
    """Convert a message to a dictionary.

    The message can be a string or a dictionary. The string will be put in the "content" field of the new dictionary.
    """
    if isinstance(message, str):
        message = {"content": message}
    elif isinstance(message, dict):
        pass
    else:
        message = dict(message)

    name = message.pop("name", None)
    if name:
        if isinstance(message["content"] , str):
            message["content"] = f"{name}: message['content']"
        elif isinstance(message["content"], list):
            message["content"] = [{"type":"text", "text": f"{name}: "}] + message["content"]
    return message

agent = AssistantAgent(name="fake", ...., llm_config=my_custom_llm_config)
agent._message_to_dict = firework_message_to_dict

Solution 2: Create another class FireworkConversableAgent
Create a class, inherit from ConversableAgent, and then override the _message_to_dict function as shown above. The implementation is similar, and this solution would be more design-correct.
Solution 3: use capacity registration
There is an ongoing PR #1091, and we can wait for that PR and then register a preprocessing function to process_last_message

My feeling is that we may not be able to prioritize compatibility with every LLM provider. The current approach of using vllm and perhaps as a next step using litellm proxy to achieve OpenAI compatibility should be the goal.

Agreed. But even the discussion about gpt-v is important here. There may be some fields that some agents just don't care about (e.g., image data), or can't handle, and we should handle that gracefully perhaps.

Yes. @rickyloynd-microsoft would the hook methods in #1091 be applicable?

Unless I'm missing something, it could be done by modifying _message_to_dict along these lines:
def _message_to_dict(message: Union[Dict, str]) -> Dict:
    """Convert a message to a dictionary.
     The message can be a string or a dictionary. The string will be put in the "content" field of the new dictionary.
    """
    if isinstance(message, str):
        message = {"content": message}
    elif isinstance(message, dict):
        pass
    else:
        message = dict(message)

    # Let any registered hooks modify the message.
    message = self.process_message_dict(message)

    return message

where process_message_dict would be a new hookable method similar to process_last_message. Then a new AgentCapability subclass like SupportFireworksAI(AgentCapability) would implement a hook method to remove the name item from a dict, as done by @BeibinLi's code above.
Users could then make any agent compatible with fireworks.ai with one line of code, which would attach the capability's hook method to the agent's hookable method:
SupportFireworksAI().add_to_agent(agent)

If this works, then future message-format-conversion capabilities could be added to agents without further modifications to ConversableAgent.

authors: BeibinLi afourney ekzhu rickyloynd-microsoft sonichi zhaoyilun

repo: microsoft/autogen


text:
[ERROR][Issue]: {"title":"'messages' array must only contain objects with a 'content' field that is not empty"}[Bug]

Describe the issue
I am using autogen on VSCode (not autogen studio), and an open-sourced LLM (Mistral-7B) on LLM Studio. I keep encountering the error:
openai.BadRequestError: Error code: 400 - {'error': "'messages' array must only contain objects with a 'content' field that is not empty."}
I noticed that someone raised a similar issue around February 7th, and the suggested fix was to set default_auto_reply="TERMINATE", but this hasn't resolved the issue for me. Below is the code for my UserProxyAgent:
user_proxy = autogen.UserProxyAgent(     name="Admin",     human_input_mode="NEVER",     is_termination_msg=lambda msg: "TERMINATE" in msg.get("content"),     max_consecutive_auto_reply=5,     code_execution_config={"use_docker": False},     system_message="A human admin. Interact with the planner to discuss the plan. Plan execution needs to be approved "                    "by this admin.",     default_auto_reply="TERMINATE",     # llm_config=phi2, )
Steps to reproduce
No response
Screenshots and logs

Additional Information
No response

same here with any models served via LM Studio

Didn't do this either

I have a fix for this, in a 'fix messages queue' function to solve a handful of problems like this.  It depends STRONGLY on the model, or rather the model's template.  Some fail on any role other than system, user or assistant.  Some fail on multiple messages from the same role (ie assistant, user, user is no go), and some like the above, fail due to empty message content.

I have a fix for this, in a 'fix messages queue' function to solve a handful of problems like this. It depends STRONGLY on the model, or rather the model's template. Some fail on any role other than system, user or assistant. Some fail on multiple messages from the same role (ie assistant, user, user is no go), and some like the above, fail due to empty message content.

I have a fix for this, in a 'fix messages queue' function to solve a handful of problems like this. It depends STRONGLY on the model, or rather the model's template. Some fail on any role other than system, user or assistant. Some fail on multiple messages from the same role (ie assistant, user, user is no go), and some like the above, fail due to empty message content.

So what is the fix?

tagging @Hk669 , please look into this.

cc @scruffynerf @marklysze

Hey @Ansaar-Syed, this is typical of a situation where the last message in the chat is an assistant message and the LLM thinks it should continue the conversation by predicting the next token. However, because that last assistant message is, essentially, complete, it thinks it should return nothing.
I am working on a message transform that will allow you to enforce a last message that has a user role and a default message, typically something like "Please continue." or just "continue". I haven't created the PR yet but will update this when I have.
So, unfortunately, there isn't a quick fix on this issue, but if you wanted to enforce that last user message you could update client.py and instead of this (I think around line 300):
            params = params.copy()
            params["stream"] = False
            response = completions.create(**params)

you could try adding a couple of lines of code like this:
            params = params.copy()
            params["stream"] = False

            if(params["messages"][-1]["role"] != "user")
                        params["messages"].append({"content": "Please continue.", "role": "user"})

            response = completions.create(**params)

Thank you @marklysze , ill try to do that, also something what i observed is, i was just trying different versions of autogen, 0.2.26 gave me the least issues, idk why, today i tried i didn't get that error, sometimes i do sometimes i don't on 0.2.26 but still i am going to follow your steps.

Thank you @marklysze , ill try to do that, also something what i observed is, i was just trying different versions of autogen, 0.2.26 gave me the least issues, idk why, today i tried i didn't get that error, sometimes i do sometimes i don't on 0.2.26 but still i am going to follow your steps.

Okay, I'm not sure of the differences in versions... At that point in the code you should also be able to see all messages in params["messages"], it's worth having a look at that and seeing what your messages look like. That may help you work out why your LLM isn't returning a good value.
Also with Mistral 7B, are you using V0.3 of the model?

Thank you @marklysze , ill try to do that, also something what i observed is, i was just trying different versions of autogen, 0.2.26 gave me the least issues, idk why, today i tried i didn't get that error, sometimes i do sometimes i don't on 0.2.26 but still i am going to follow your steps.

Okay, I'm not sure of the differences in versions... At that point in the code you should also be able to see all messages in params["messages"], it's worth having a look at that and seeing what your messages look like. That may help you work out why your LLM isn't returning a good value.
Also with Mistral 7B, are you using V0.3 of the model?

Thank you @marklysze , and i am using V0.1( precisely TheBloke/Mistral-7B-Instruct-v0.1-GGUF), also could you explain what do you mean by seeing the messages in params["messages] like do you want me to print params["messages"] and see what the messages look like?

Thanks @Ansaar-Syed, I'd strongly suggest trying V0.3, such as this one or this one. V0.3 is better at instruction handling than V0.1/V0.2.
For params["messages"], it's just handy to see what messages are going out to the LiteLLM, that may help you understand why it's responding a certain way. Just remember that the name field on each message does not get used, and that's helpful to understand that the model may not know who has said what. As mentioned, I'm working a message transform class that can help inject the name into each content field of each message so that the model knows which agent is saying what.

you could try adding a couple of lines of code like this:
            params = params.copy()
            params["stream"] = False

            if(params["messages"][-1]["role"] != "user")
                        params["messages"].append({"content": "Please continue.", "role": "user"})

            response = completions.create(**params)

Small syntax correction and then this fixed the issue for me.
`# If streaming is not enabled, send a regular chat completion request
params = params.copy()
params["stream"] = False
        # TEMP FIX to prevent blank content being returned
        if params["messages"][-1]["role"] != "user":
            params["messages"].append({"content": "Please continue.", "role": "user"})

        response = completions.create(**params)`

authors: Ansaar-Syed Deykeepcomn4me Hk669 ManuInNZ frankiwilson marklysze scruffynerf


text:
Add Cerebras Integration

Why are these changes needed?
Add integration for Cerebras, which provides super low-latency, high speed LLM inference. Currently Llama 3.1-8B/70B are supported.
Tool calling examples have been provided in this PR, which also function with streaming. Additionally, token cost calculations have been implemented.

Checks

[X] I've included any doc changes needed for https://microsoft.github.io/autogen/. See https://microsoft.github.io/autogen/docs/Contribute#documentation to build and test documentation locally.
[X] I've added tests (if relevant) corresponding to the changes introduced in this PR.
[ ] I've made sure all auto checks have passed.

@microsoft-github-policy-service agree company="Cerebras"

cc: @marklysze, seems like you're working in this area of the codebase :)

Moved to https://github.com/autogen-ai/autogen/pull/48

I see you closed this, did you still want us to review this?

I see you closed this, did you still want us to review this?

Yes I still want it to be reviewed, but I was told to open the PR in the Autogen org instead

We'd be happy to review. Would you be able to reopen it so we're able to merge?

@jackgerrits it won't let me reopen this PR, but I opened another one here: https://github.com/microsoft/autogen/pull/3585

Sounds good thanks!

authors: henrytwo jackgerrits


text:
Unable to load session in Estimate tool in Azure Dev Ops

Unable to load session in Estimate tool in Azure Dev Ops. We came to know the tool appears to have been updated on 07/30.
This appears to have broken functionality. We use this tool in our backlog grooming to size stories. Please can you guys fix this ASAP.

@ksanjamala are you still having this problem? Can you see any error in the console or network log in the browser (using F12, debug tools)?

Hello,
Yes we (Mayo Clinic) have still problems. It first says loading work items and next it says connecting to server and just spins there……
https://dev.azure.com/mclm/MIRIS/_apps/hub/ms-devlabs.estimate.estimate-hub#/session/3kpkv/Test
Thanks,
Kavitha Sanjamala | LD Analyst/Programmer| Research Enterprise Applications | 507-266-0761 | @.@.>
Mayo Clinic | 200 First Street S.W. | Rochester, MN 55905 | www.mayoclinic.orghttp://www.mayoclinic.org/
From: Mathias Olausson @.>
Sent: Monday, August 9, 2021 10:58 AM
To: microsoft/azure-boards-estimate @.>
Cc: Sanjamala, Venkata Naga Ka (Kavitha) @.>; Mention @.>
Subject: [EXTERNAL] Re: [microsoft/azure-boards-estimate] Unable to load session in Estimate tool in Azure Dev Ops (#16)
@ksanjamalahttps://github.com/ksanjamala are you still having this problem? Can you see any error in the console or network log in the browser (using F12, debug tools)?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/azure-boards-estimate/issues/16#issuecomment-895341320, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVDSTKFTSC7QJKIYYXNPILTT373H5ANCNFSM5BWDKSVQ.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.

@ksanjamala we've changed a configuration setting, can you check if the online mode works fine for you now?

Closing this issue due to lack of activity. The issue should be resolved, @ksanjamala feel free to reopen if you have a different opinion.

We are also having this issue.  It seems to be a firewall issue since people outside the network are not having an issue.  Could you provide some details on the outbound call requirements so we can address it with the firewall team?

Hi @bminisi, this should be the only external call. If you don't want to change the firewall then you need to use the "offline" mode I think.

Thanks.  They opened it in the firewall and it is working now.
Brian
Sent from my Verizon, Samsung Galaxy smartphone
Get Outlook for Androidhttps://aka.ms/AAb9ysg

From: Mathias Olausson @.>
Sent: Thursday, September 23, 2021 3:24:10 PM
To: microsoft/azure-boards-estimate @.>
Cc: Brian Minisi @.>; Mention @.>
Subject: Re: [microsoft/azure-boards-estimate] Unable to load session in Estimate tool in Azure Dev Ops (#16)
Hi @bminisihttps://github.com/bminisi, this should be the only external call. If you don't want to change the firewall then you need to use the "offline" mode I think.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/azure-boards-estimate/issues/16#issuecomment-926090639, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACMTNKH3WOIBRIDLZYWXFXDUDN5FVANCNFSM5BWDKSVQ.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Great, thanks for confirming Brian!

authors: MOlausson bminisi ksanjamala

repo: microsoft/azure-boards-estimate


text:
Azure container apps do not respect MaxRequestBodySize

This issue is a: (mark with an x)

[x] bug report -> please search issues before submitting
[ ] documentation issue or request
[ ] regression (a behavior that used to work and stopped in a new release)

Issue description
For containers which change the Limits.MaxRequestBodySize for kestrel to a value over 30000000 byte (this is the default for Kestrel and IIS) this setting will be ignored.
Steps to reproduce

Deploy a container app with the following inside your Program.cs:

static IResult HandleFile(HttpContext httpContext, CancellationToken cancellationToken)
{
  return Results.Ok(httpContext.Request.ContentLength?.ToString() ?? "nothing");
}

var builder = WebApplication.CreateBuilder(args);

builder.WebHost.ConfigureKestrel(options =>
{
   options.Limits.MaxRequestBodySize = 150 * 1024 * 1024;
});

var app = builder.Build();
app.MapPost("/api/postFile", HandleFile);
app.Start();
app.WaitForShutdown();

Send a file via Postman (or similar) to the /api/postFile endpoint which is bigger than 30000000 byte (I used a generated 30mb (31457280 byte) PDF) (on MacOS: mkfile 30m 30m.pdf)
The API responds with a 413 - Payload Too Large. Actually it should accept 150 * 1024 * 1024 byte.

Expected behavior [What you expected to happen.]
The API should accept files up to 150mb and not respond with a 413 for a 30mb file. This is exactly what the program will do when I run locally.
Actual behavior [What actually happened.]
The API return a 413 for the 30mb file, but it shouldn't.
Is there any solution for this?
Sincerely snailcatcher

Hi @zhenqxuMSFT,
Thanks for testing this out. I tried again to find out what was wrong and finally found it.
The problem was that one of my containers (I use multiple in one containerapp) was not starting correctly. Unfortunately this was not obvious to see. This leads to the issue, that my request was send to the old revision of my app (which uses the default value). And there we have the actual bug.
Sorry and thank you for the wasted time.

repo: microsoft/azure-container-apps


text:
App to App Network Access Controls

As a developer It would be great to have a way to control app to app communication in my ACA environment so I can ensure that only allowed frontends talk to certain backends.
Alternatives:
Dapr could be used to achieve a similar goal but this would require me to rewrite my application.

Is there any intention to implement http access log? I don't think it's right to depend on my application to manage http access.

This would an great feature!
I assume this is what would be used under the hood;
https://kubernetes.io/docs/concepts/services-networking/network-policies/

authors: passarela simonjj trylvis


text:
Reading Environment variables and passing in RunContext

Passing Pipeline Variables to createRun flow

@kapilratra02 please validate this in old pipeline/new pipeline.
Flaky test caused build failure, please requeue

@kapilratra02 please validate this in old pipeline/new pipeline.
Flaky test caused build failure, please requeue

Validated

repo: microsoft/azure-pipelines-agent


text:
Download pipeline artifact breaks folder structure when downloading pipeline artifact

Required Information
Entering this information will route you directly to the right team and expedite traction.
Question, Bug, or Feature?
Type: Bug
Enter Task Name:  DownloadPipelineArtifact@2
list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
Environment

Server - Azure Pipelines

Agent - Private Windows agent, agent version 2.165.0

Issue Description
If you are downloading a pipeline artifact (from another pipeline) and the name of the artifact is used in the folder structure of the artifact, it can cause the following issues.
Folder level removed, file renamed:
Solutions/ThisIsAnArtifactName/url.runsettings
-> Solutions/ThisIsAnurl.runsettings
Folder level removed:
Solutions/ThisIsAnArtifactName/Obj/...
-> Solutions/ThisIsAnObj/...
So it seems that the 'artifact name' is deleted from the folder structure, which may result in lost folder-levels or changed folder names and changed file names. And the breaking only happens for only the folder that has similarities with the artifact name, rest of the folders stay as they should. Also if you check the built artifact, there the folder structure is correct. So the copying breaks it.
Task logs
No logs, just observed functionality from the result.
Troubleshooting
Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting
Error logs
No logs, just observed functionality from the result.

This issue is still present and needs to be reopened.

@leinoaa please see if you can reopen the issue.

FYI, as the latest even shows, opened new issue #16522.

authors: abatishchev joshmurari leinoaa

repo: microsoft/azure-pipelines-tasks


text:
IIS Deploy on premises fails with ERROR_FILE_IN_USE

Required Information
Question, Bug, or Feature?
Type: Bug
Enter Task Name: IISWebAppDeploymentOnMachineGroup
Environment

Server - Azure Pipelines
Agent - Hosted

Issue Description
I'm using the IISWebAppDeploymentOnMachineGroup@0 task to deploy a .NET Core 3.1 app to IIS on premises.
The task fails sometimes with a ERROR_FILE_IN_USE code. I have set the TakeAppOfflineFlag to true but nothing changed.
Task logs
tasklogs.zip
Troubleshooting
Error logs
Info: Updating file (AGIL\Crpdl.Agil.Web.dll).
##[debug]Exit code 4294967295 received from tool 'C:\azagent\A1\_work\_tasks\IISWebAppDeploymentOnMachineGroup_1b467810-6725-4b6d-accd-886174c09bba\0.156.13\node_modules\webdeployment-common-v2\MSDeploy3.6\msdeploy.exe'
##[debug]Exit code 4294967295 received from tool 'C:\azagent\A1\_work\_tasks\IISWebAppDeploymentOnMachineGroup_1b467810-6725-4b6d-accd-886174c09bba\0.156.13\node_modules\webdeployment-common-v2\MSDeploy3.6\msdeploy.exe'
##[debug]STDIO streams have closed for tool 'C:\azagent\A1\_work\_tasks\IISWebAppDeploymentOnMachineGroup_1b467810-6725-4b6d-accd-886174c09bba\0.156.13\node_modules\webdeployment-common-v2\MSDeploy3.6\msdeploy.exe'
##[debug]STDIO streams have closed for tool 'C:\azagent\A1\_work\_tasks\IISWebAppDeploymentOnMachineGroup_1b467810-6725-4b6d-accd-886174c09bba\0.156.13\node_modules\webdeployment-common-v2\MSDeploy3.6\msdeploy.exe'
##[error]Failed to deploy web package to IIS website.
##[debug]Processed: ##vso[task.issue type=error;]Failed to deploy web package to IIS website.
##[debug]{}
##[debug]System.DefaultWorkingDirectory=C:\azagent\A1\_work\1\s
##[warning]Can\'t find loc string for key: Trytodeploywebappagainwithrenamefileoptionselected
##[debug]Processed: ##vso[task.issue type=warning;]Can\'t find loc string for key: Trytodeploywebappagainwithrenamefileoptionselected
##[warning]Trytodeploywebappagainwithrenamefileoptionselected
##[debug]Processed: ##vso[task.issue type=warning;]Trytodeploywebappagainwithrenamefileoptionselected
##[error]Error Code: ERROR_FILE_IN_USE
More Information: Web Deploy cannot modify the file 'Crpdl.Agil.Web.dll' on the destination because it is locked by an external process.  In order to allow the publish operation to succeed, you may need to either restart your application to release the lock, or use the AppOffline rule handler for .Net applications on your next publish attempt.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE.
Error count: 1.

@mpoiron can follow try to follow the advice in this discussion here: https://github.com/aspnet/IISIntegration/issues/238 especially this comment here about using setting an app offline flag https://github.com/aspnet/IISIntegration/issues/238#issuecomment-406006574 .

Hi, if this might help, even with app offline flag we are getting this ERROR_FILE_IN_USE exception on-premise. It started since moving to .net core 2.2 with the AspNetCoreHostingModel flag enabled. This flag default to true since 3.0 .
From the data I gathered from diverse sources this problem has been fixed in Azure by renaming locked dll , hence the ticket we opened here for on-premise support in webDeploy : https://github.com/microsoft/azure-pipelines-tasks/issues/13223

@mpoiron are you still facing the issue ? can you try setting the MSDEPLOY_RENAME_LOCKED_FILES app setting and setting it's value to 1.
https://github.com/projectkudu/kudu/wiki/Dealing-with-locked-files-during-deployment#for-msdeploy-there-is-another-option-to-rename-locked-files

Hi,
I am still facing the issue, and the MSDEPLOY_RENAME_LOCKED_FILES setting indeed seems to be only for Azure and I am on-premises.

Same issue here. Is there at least some workaround? I'm guessing a copy task with app-offline.htm and then delete it after publishing...

Can we have an update on this issue ? I am still having this issue and having to kill the app pool each time is quite annoying.

We are facing the same problem since upgrading to 3.1 from 2.1. (on premise, InApp hosting model)
It only occurs when some longer running requests are still going on during deployment. Its quite a regression not being able to reliably hot deploy the application.
MSDEPLOY_RENAME_LOCKED_FILES is really needed for on premise too.

Please try using IIS Web App Manage task to stop the application pool before deploying and then start the app pool again.
- task: IISWebAppManagementOnMachineGroup@0
  inputs:
    IISDeploymentType: 'IISApplicationPool'
    ActionIISApplicationPool: 'StopAppPool'
    StartStopRecycleAppPoolName: 'Testpool'

- task: IISWebAppDeploymentOnMachineGroup@0
  inputs:
    WebSiteName: 'TestSite'
    Package: '$(System.DefaultWorkingDirectory)\**\*.zip'

- task: IISWebAppManagementOnMachineGroup@0
  inputs:
    IISDeploymentType: 'IISApplicationPool'
    ActionIISApplicationPool: 'StartAppPool'
    StartStopRecycleAppPoolName: 'Testpool'

Please try using IIS Web App Manage task to stop the application pool before deploying and then start the app pool again.
- task: IISWebAppManagementOnMachineGroup@0
  inputs:
    IISDeploymentType: 'IISApplicationPool'
    ActionIISApplicationPool: 'StopAppPool'
    StartStopRecycleAppPoolName: 'Testpool'

- task: IISWebAppDeploymentOnMachineGroup@0
  inputs:
    WebSiteName: 'TestSite'
    Package: '$(System.DefaultWorkingDirectory)\**\*.zip'

- task: IISWebAppManagementOnMachineGroup@0
  inputs:
    IISDeploymentType: 'IISApplicationPool'
    ActionIISApplicationPool: 'StartAppPool'
    StartStopRecycleAppPoolName: 'Testpool'

We tried to this approach, it works on some deployment but not for all. We have more than 500 sites manage by Azure DevOps On-Permises. The deployment may be locked by HTTP keep-alive connection, we have assumed StopAppPool should terminate all of IIS connections in that AppPool.

As mentioned in doc :
If you have enabled App Offline and you're still seeing issues with files in use, there are two main possibilities:

The first is that the runtime is completely failing to detect App_Offline.htm
The second is that the runtime detects it, but it takes a while to kick in, and msdeploy is not waiting long enough for file locks to get releases

Please go through this doc once with the steps mentioned and let us know if this unblocks you

@mpoiron Any update here

I seem to have the 2nd problem, I'll try the retry arguments and check back if I still have any issue.

@mpoiron Are you still facing any issues?

@mpoiron Are you still facing any issues?

We are still getting some rare FILE_IN_USE errors
I was able to reproduce this behaviour by running a request that contains only await Task.Delay(40000); during deployment.
But normally we get the FILE_IN_USE in another dll that handles Entity Framework matters.

We are still getting some rare FILE_IN_USE errors
I was able to reproduce this behaviour by running a request that contains only await Task.Delay(40000); during deployment.
But normally we get the FILE_IN_USE in another dll that handles Entity Framework matters.

Was the doc : https://github.com/projectkudu/kudu/wiki/Dealing-with-locked-files-during-deployment#for-msdeploy-try-enabling-app-offline not helpful to you ?

@20shivangi No they don't provide a real solution for us:
"The downside of course is that your site is unavailable during the deployment. This can be avoided by relying on a Staging slot instead of deploying straight to Production."
We already have Staging Sites running but at some point we need to deploy to Production. In most cases the deployment works seamlessly without app_offline and we have no down time at all. In rare cases it fails, which we never had before 2.1.
I remember having read that there were some shadow copy mechanisms in place before. MSDEPLOY_RENAME_LOCKED_FILES seems to do something similar but is only available for Azure. For us its important to be able to hot deploy an application also on premise without taking it offline. I understand that cloud is now first class citizen but this is a critical feature for on premise too.

Same problem here... I am using .NET 5 and deploying on premises.
The problem by check the option "Take app offline" is that if the deploy fail, the api goes down :(

Same problem here. .NET 5 web api running on premise.
It looks like this is not something new by researching it.... still didn't find a solution though.

We're running into this problem with msvcr120.dll and that's even stopping the Application Pool.  Maybe a shared configuration and multiple websites with 2 IIS servers makes this even harder problem to solve?

Maybe worth revisiting with
https://github.com/Microsoft/azure-pipelines-tasks/issues/9596

Got this error today while deploying a hotfix that took our whole webapp down.

Is there any workarround for this in Azure Devops classic deployment?
I guess one workarround should be to deploy each time to a new folder and then changing the app directory in the IIS but I don't know if I really like that.

In our case I'm fairly certain that the issue stems from the fact that we're deploying to a set of IIS servers running in Shared Configuration.  The deployment agent is running only on one server so a restart or reset before deployment performed by the pipeline via the agent only happens on 1/2 of the Shared Configuration so it doesn't always do the trick if the file is locked by the other server.

We have the same issue the deploys fail randomly with the File in use error (the same as attached to the issue multiple times now).
Hopefully the bot will remove the stale tag and we find a solution for this soon.

We solved our issue by stopping the application pool then deploying and restarting the application pool

I am encountering this all of the sudden. Restarting the pools and restarting the deployment usually fixes it but thats a poor fix.
Please advise.

Have been facing this for months now, which is incredibly frustrating. Can we please, PLEASE have an equivalent of MSDEPLOY_RENAME_LOCKED_FILES be included in the msdeploy flags?

Have any tried this solution ?
https://dev.to/lukaszreszke/solving-the-azure-devops-release-error-code-errorfileinuse-25jn

I ended up using shadow copying, which is a great way to avoid this problem and is available in .NET 6, albeit as an experimental feature.

I was able to get around this somewhat by using the additional argument -useChecksum in the IIS Web App Deploy task. This makes it possible to get the pipeline to succeed in most cases (i.e. when the culprit dll is not actually modified). As a fallback for situations in which it is actually modified, I added the arguments -retryAttempts:10 -retryInterval:6000 alongside -useChecksum. This works for me because after app_offline.htm is created, it takes close to 1 minute for the culprit dll to become delete-able.

My team is plagued by this issue. IIS, on-premises, App Offline file and configuration set appropriately. Frequently have to kill the app pool to deploy.
Can't believe this is still an issue with no reliable fix.

@keeehlan Did you try:
create an "IIS manage" task and recycle the pool before deployment?

@VictorioBerra Isn't the whole point of the app_offline.htm file that it stops the application and removes the need for this?

@keeehlan Sure. But this issue is almost 3 years old with no official help from Microsoft, you say you are doing everything right which is great but there is obviously bugs and you need a workaround. This has been working for me and other users in this thread and it takes 2 seconds to implement.

@keeehlan

Also, as I said in my comment, we are not using Azure, we are deploying to IIS using Web Deploy.

So you are in the wrong issue then? This issue is for people using Azure Pipelines Tasks to deploy their apps. Either up in Azure OR on-premise on IIS. Like many of us here are doing and are discussing.

Keeping this alive as we are seeing the issue with .NET 6 web apps (a newly developed application that is about to go live).  DLLs are locked when deploying to an on-premise IIS server via task IISWebAppDeploymentOnMachineGroup@0.

Hello, I have same issue. @RecursiveGeek  could you fix this?
IIS on-premises, MS Web Deploy

I'm still experiencing this in a few different projects. Any update?

I still have this issue on various projects. Randomly, files are held by some unknown process.
It's getting aggravating

We have the same issue the deploys fail randomly with the File in use error (the same as attached to the issue multiple times now).
Hopefully the bot will remove the stale tag and we find a solution for this soon.

We solved our issue by stopping the application pool then deploying and restarting the application pool

So stopping the pool and restarting can work but the website will be down till deployment finishes. Which nobody would satisfy with this solution. am I right? Yet, in a technical way if a file in use by another process you cannot override the file until it stops.

Or you could just recycle the pool to unlock the file and perform the
deployment.
On Thu, Oct 19, 2023, 3:43 AM godzkaya @.***> wrote:

We have the same issue the deploys fail randomly with the File in use
error (the same as attached to the issue multiple times now).
Hopefully the bot will remove the stale tag and we find a solution for
this soon.
We solved our issue by stopping the application pool then deploying and
restarting the application pool
So stopping the pool and restarting can work but the website will be down
till deployment finishes. Which nobody would satisfy with this solution. am
I right? Yet, in a technical way if a file in use by another process you
cannot override the file until it stops.
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/azure-pipelines-tasks/issues/13232#issuecomment-1770340951,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAWMN22GPXBQGL2GR3HQMLDYADR2DAVCNFSM4OPY2W2KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZXGAZTIMBZGUYQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

Or you could just recycle the pool to unlock the file and perform the deployment.
…
On Thu, Oct 19, 2023, 3:43 AM godzkaya @.> wrote: We have the same issue the deploys fail randomly with the File in use error (the same as attached to the issue multiple times now). Hopefully the bot will remove the stale tag and we find a solution for this soon. We solved our issue by stopping the application pool then deploying and restarting the application pool So stopping the pool and restarting can work but the website will be down till deployment finishes. Which nobody would satisfy with this solution. am I right? Yet, in a technical way if a file in use by another process you cannot override the file until it stops. — Reply to this email directly, view it on GitHub <#13232 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWMN22GPXBQGL2GR3HQMLDYADR2DAVCNFSM4OPY2W2KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZXGAZTIMBZGUYQ . You are receiving this because you were mentioned.Message ID: @.>

Many of us are stopping the app pool, but, many times, that does not solve the issue.
Are you saying a recycle is better to use or should be used in conjunction with a stoppage?

we have Azure Devops server 2022.1 and after updating our .net version to 8 we have also this problems with every 2 release : Failed to deploy web package to IIS website. Error Code: ERROR_FILE_IN_USE Additional Information: Web Deploy cannot modify the Localization.resources.dll file in the target because it is locked by an external process. For the publishing process to complete successfully, you may need to restart your application to release the lock or use the AppOffline rule handler for .NET applications on your next publishing attempt.

we have Azure Devops server 2022.1 and after updating our .net version to 8 we have also this problems with every 2 release : Failed to deploy web package to IIS website. Error Code: ERROR_FILE_IN_USE Additional Information: Web Deploy cannot modify the Localization.resources.dll file in the target because it is locked by an external process. For the publishing process to complete successfully, you may need to restart your application to release the lock or use the AppOffline rule handler for .NET applications on your next publishing attempt.

@Maryam1986
We are also experiencing the issue with a .NET 8 Blazor Web App deployed on premise with IIS Web Deploy in DevOps. I'm hoping that the fix for this ASP.NET Core team issue (https://github.com/dotnet/aspnetcore/issues/52307) will resolve the issue we are having with the file lock, presumably caused by the app_offline.html file not being honored.

Bump.
On Thu, Aug 8, 2024, 10:06 AM github-actions[bot] @.***>
wrote:

This issue is stale because it has been open for 180 days with no
activity. Remove the stale label or comment on the issue otherwise this
will be closed in 5 days
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/azure-pipelines-tasks/issues/13232#issuecomment-2276060079,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAWMN2YY4MNRR2H4XMC4FMTZQOCQ7AVCNFSM4OPY2W2KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMRXGYYDMMBQG44Q
.
You are receiving this because you were mentioned.Message ID:
@.***>

I was able to find a solution that works for me when receiving this error. I received the error downloading a different dll for my .NET 5.0 web application.
Inside of the Release Pipeline > Manage ISSWebsite task > Select Create or update app pool > Open the IIS Application Pool menu panel > Enter a Name > Set .NET Version to v4.0 > Set Managed pipeline mode to Integrated > Set Identity to Application Pool Identity.
Hope this helps, best of luck all.

authors: 20shivangi Bazul99 DannyBoyIT FreeFrags KuroroSam Maryam1986 RecursiveGeek VictorioBerra Yush0 aksm-ms arjgupta asranja bunyadahmadli captnord fafafooey916 freemstr godzkaya guidupuy guinatal jacobhoward214 keeehlan mclausing mhgames mpoiron ntndash rafastellato ranulp-fs thurfir


text:
[BUG]: HelmDeploy@0 ignores environment

New issue checklist

[X] I searched for existing GitHub issues
[X] I read pipeline troubleshooting guide
[X] I checked how to collect logs

Task name
HelmDeploy@0
Task version
0.238.1
Issue Description
I have environment with resources created and I have confirmed that it created service connection. HelmDeploy@0 ignores environment and requires kubernetesServiceEndpoint. This is inconsistent with other kubernetes related tasks like Kubernetes@1 where it automatically picks up the service connection from environment.

Environment type (Please select at least one enviroment where you face this issue)

[ ] Self-Hosted
[X] Microsoft Hosted
[ ] VMSS Pool
[ ] Container

Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Ubuntu
Relevant log output
Starting: Helm upgrade
==============================================================================
Task         : Package and deploy Helm charts
Description  : Deploy, configure, update a Kubernetes cluster in Azure Container Service by running helm commands
Version      : 0.238.1
Author       : Microsoft Corporation
Help         : https://aka.ms/azpipes-helm-tsg
==============================================================================
##[error]Error: Input required: kubernetesServiceEndpoint
Finishing: Helm upgrade

Full task logs with system.debug enabled
No response
Repro steps
jobs:
  - deployment: Deploy
    displayName: Deploy to Kubernetes
    pool:
      vmImage: ubuntu-latest
    environment:
      name: ${{ parameters.environment }}
    strategy:
      runOnce:
        deploy:
          steps:
          - checkout: self

          - task: HelmDeploy@0
            displayName: Helm upgrade
            inputs:
              namespace: ${{ parameters.namespace }}
              command: upgrade
              chartType: filepath
              chartPath: ./charts/${{ parameters.project_name }}
              releaseName: ${{ parameters.project_name }}
              install: true
              waitForExecution: true
              valueFile: ./charts/${{ parameters.project_name }}/${{ parameters.values }}
              overrideValues: |
                image.repository=${{ parameters.repository }}
                image.tag=${{ parameters.tag }}
                env=${{ parameters.env_name }}

Hi @PAKalucki,
From the logs, it says
[error]Error: Input required: kubernetesServiceEndpoint
Can you please try configuring connectionType and kubernetesServiceConnection in the yaml and check once.

authors: PAKalucki v-bkasu


text:
[Question]: HelmDeplyoV1 asks for kube connection when command == push

Task name
HelmDeployV1
Task version
latest
Environment type (Please select at least one enviroment where you face this issue)

[ ] Self-Hosted
[x] Microsoft Hosted
[ ] VMSS Pool
[ ] Container

Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
ubuntu-latest?
Question
Hi!
Why a Kubernetes connection is requested when the command is pushed?
Without writing scripts, I want to make a pipeline that packages a helm chart and pushes it to ACR.
From the docs
kubernetesCluster - Kubernetes cluster
string. Required when connectionType = Azure Resource Manager && command != logout && command != package.

Select an Azure Managed Cluster.

Thanks in advance for your help <3

Obv a workaround for this is to write a step with


text:
upgrade minimum agent version to 2.209.0 to support jsonwebtoken 9.0v for node greater 11

Task name: AzureVmssDeploymentV0
Description: Upgraded minimum agent version to 2.209.0v to support for node16v of the task. Jsonwebtoken 8.x stopped supporting for node11 and below. Upgrading the minimum agent version to 2.209.0v will work with node16 handler.
Documentation changes required: N
Added unit tests: N
**Attached related issue:**N
Checklist:

[X ] Task version was bumped - please check instruction how to do it
[ X] Checked that applied changes work as expected

/azp run


text:
Update getSecurityToken in azurecore

https://github.com/microsoft/azuredatastudio/blob/main/extensions/azurecore/src/azureResource/utils.ts#L119
This is still using getSecurityToken - it should be updated to use getAccountSecurityToken instead per the changes Amir did.
A call was made to azdata.accounts.getSecurityToken, this method is deprecated and will be removed in future releases. Please use getAccountSecurityToken instead.

@ranasaria @aaomidi I'm assigning this to you - could one of you two take care of this when you get a chance? (I'll try to if I have time but I have a bunch of other stuff I'm working on too)
@aaomidi Would recommend sending out a mail to owners of our stuff that use this API - I see there's some ML things that use it too for example.

repo: microsoft/azuredatastudio


text:
Views Welcome buttons don't do anything

Buttons in the "Views Welcome" contributions (when a contributed view is empty) aren't doing anything currently.

Ah-ha! I saw that issue title but didn't connect the two. I'll close this as a dupe then.
I hadn't started on it and wasn't going to get around to that until later anyways so happy to let him continue to work on it.


text:
A11y_SQLdatabase projects extension_View And More Action_Update Project From Database_Voiceover: Label names are not being announced by voiceover.

NOTE: "Please do not close this bug. This bug should only be closed by TCS, C+AI Accessibility or the Divisional Driver"
GitHub Tags:
#A11ySev1; #A11yWCAG2.1; #A11yTCS; #DesktopApp; #SH-SQL Azure Data Studio-MAC-March23; #SQL Azure Data Studio; #Name Role Value; #WCAG4.1.2 #MAC; #AINotInScope; #Voiceover;
Environment Details:
Application Name: SQL Azure Data Studio
Version: 1.42.0-insider (Universal)
MAC Version: macOS Ventura 13.3
Repro Steps:

Start Voiceover with using shortcut key Command+F5.
Launch Azure Data Studio
Tab till database project and press enter.
“Database Project” panel will open.
Tab till “View And More Action” button and press enter.
Tab till “Update Project From Database” and press enter.
Verify whether associated label names are being announced by voiceover or not.

Actual Result:
Voiceover is not announcing associated label names for 'Server, database and location' controls.
Expected Result:
Voiceover should be announcing associated label names for 'Server, database and location' controls.
Also, voiceover should be announce required for required fields.
User Impact:
Voiceover users will face difficulty while navigating if voiceover is not announcing label name for the 'Server, database and location' controls. Hence users might not be able to understand the functionality and the purpose of the controls.
Attachment:

@SachinChavhan317 this has been fixed in the latest version of the sql database projects extension (0.23.0). Please download the latest insiders build and verify this is fixed. Thanks!

@SachinChavhan317 please verify this is fixed. Thanks!

@SachinChavhan317 please verify this issue is fixed when you have a chance. Thanks!

#Closed; #Regressed:04-11-23;
Verified the issue in below environment
SQL Azure Data Studio : Version 1.44.0-insider (Universal)
MAC Version: macOS Ventura 13.3
The issue is fixed, hence closing the bug. Please find below attachment for reference. Thanks!


text:
Bump Electron to 13.5.0

The VS Code updates didn't seem to need to update anything in the core app so this should be safe to get in. I did some basic validation and things seem fine.
https://mssqltools.visualstudio.com/CrossPlatBuildScripts/_build/results?buildId=134859&view=results
Fixes a security issue with the version we got from the merge. I decided to update to the latest version VS Code is using since there weren't any major changes needed to do so.

Pull Request Test Coverage Report for Build 1664739190

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 48.175%

Totals

Change from base Build 1664608428:
0.0%

Covered Lines:
14516

Relevant Lines:
28627

💛  - Coveralls

authors: Charles-Gagnon coveralls


text:
Addon profile for Azure Monitoring for Containers

New PR because https://github.com/microsoft/bedrock/pull/526 merged prematurely.

LGTM - per review of #526 yesterday.

authors: jmspring yradsmikham

repo: microsoft/bedrock


text:
DCR: .dialog resource binding should fallback to non-hardcoded extensions.

We should add fallback for string reference binding "foo.xxx" => looks for "foo.xxx.dialog" and if not found attempts to bind to "foo.xxx",
The point of these changes is that it allows new extensions to be added to the resource explorer, and if there are object bindings for those extensions they will be used. If a file is valid json but NOT a dialog file (Such as .schema files) then they can be used directly without having to have .dialog extension.
For example, this captures the 2 scenarios:

"recognizer":"foo.lu" => will bind to attempt to bind to "foo.lu.dialog"
"schema":"foo.schema" => will attempt to bind to foo.schema.dialog, and then fall back to foo.schema, which is a valid JSON object to bind and it will load it. (Thus removing the need to have schema file be foo.schema.dialog.

PR is #3640

i didn't fully get this short-term fix, i mean i understand what it does, but seems not align with long term goal.  By fall-backing to resource.id, we are implying that we are encouraging using different file extension to distinguish types.  How about we just fallback from resource.id.dialog to resourc.id.json, and start encouraging people to serialize stuff other than dialog into json, and use "name" instead of "extension" to distinguish, like "recongizera.json"?
I means we are easily go from recongzier_a.json to a.recoginzer, but probably not the vice versa

This is about allowing you to refer to a json file (regardless of extension) without having to add .dialog on to the reference.

repo: microsoft/botbuilder-dotnet


text:
DialogStateManager.TryGetValue throws ArgumentException

Version
4.9.4
Describe the bug
I'm using DialogStateManager.TryGetValue to get a typed value from the dialog state. When attempting to cast to a wrong type, this ends in an exception being thrown.
To Reproduce
Steps to reproduce the behavior:

Store some value in state
Use dc.State.TryGetValue to retrieve the value from cache, but supply the wrong type

Expected behavior
I would expect the TryGetValue method to return false as the stored value could not be retrieved properly. The out parameter would remain null. A method with the Try prefix should never fail in an exception imho; when the Try didn't result in success it should return false.

@tomlm sending over to you for review

We have added this to the backlog and will look at it in an upcoming release. Thanks.

@lauren-mills that's great, thanks!

authors: jsiegmund lauren-mills sgellock


text:
[PORT] support lg output in activityfactory directly

Port this change from botbuilder-dotnet/master branch:
https://github.com/microsoft/botbuilder-dotnet/pull/3143

fix #3142
Microsoft.Bot.Builder.Dialogs.Adaptive.Generators

close temporarily

platform specific

authors: Danieladu tomlm

repo: microsoft/botbuilder-js


text:
allows Inspection to attach anywhere within a Teams Team

fixes #1406

Pull Request Test Coverage Report for Build 91372

6 of 7 (85.71%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.002%) to 84.32%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

libraries/botbuilder/src/inspectionMiddleware.ts
6
7
85.71%

Totals

Change from base Build 91107:
-0.002%

Covered Lines:
7841

Relevant Lines:
8963

💛  - Coveralls

authors: coveralls johnataylor