text:
[pxt-jacdac] List of configurable roles too long and partly unclear

Description
After adding the Jacdac extension in makecode and clicking 'Modules' you can define roles which then add the needed blocks. In a mobile device usecase where WebUSB is not available, this is a way to still be able to use the Jacdac modules.

Unfortunately, the list of possible roles, which pops up when adding a role is very long and not always clear, which makes it difficult and frustrating for inexperienced users. If I'd e.g. want to add a Kittenbot RGB ring, I'd have to choose between:  LED, LED single, LED strip.

Proposal

Reducing the list in length, e.g. to only the currently commercially available modules (Kittenbot, ..) (Forward Education uses seperate extension I assume)
Use names that are more distinct and printed on comercially available modules like 'RGB Ring' or '8 LEDs RGB Ring' instead of LED

Launching proactively all KittenBot modules is not a good idea. It will bloat the simulator view and the compiled code.

authors: fabianhugo pelikhan


text:
http - implement body inspection handler

specification https://github.com/microsoftgraph/msgraph-sdk-design/pull/116
make sure you update the documentation as well

Let me take a stab at it and see what I can do

Hi, I've been using Kiota in C# now for talking to HMRC Services in the UK.  However, they are aaplication/xml content instead of json.  So, even though responses are (or can be) in the OpenApi yaml file, nothing is generated to get them.
It all works returning a stream of the content when an OK(200) is received.
I'm thinking this issue may solve my problem from the looks of it? If I can get the status code and body content then I can handle myself.

@AndrewZenith if the xml structure is described with a JSON schema, you'll get a much better experience by:

implementing IParseNode and ISerializationWriter (+ factories) for XML.
using the structured mime types during generation
registering the new factories at runtime, so XML can be serialized/deserialized

Arguably it's a bit more work though.
And if you're willing to, you could even stand up a new project/package under the kiota community organization, so others can also use the XML implementation.

Arguably it's a bit more work though.

100+ classes for just one of the many responses.  I have the xsd's though.

source: gharchive/issue

authors: AndrewZenith baywet marcinjahn

repo: microsoft/kiota-dotnet

license: MIT

license_type: permissive

license_source: github-api


text:
api client constructor should check whether the base URL is set before trying to set it in ruby

The generation process should include an if statement that reads the current base url and only sets it when empty.
https://github.com/microsoft/kiota-samples/blob/092356cbaeb09fc2e3632ce2fee3db116b4c9fbc/msgraph-mail/ruby/graphrubyv4/api_client.rb#L35
This is to avoid overwriting another URL that might have been set on the request adapter prior to instantiating the client.

closing as duplicate of #478

Generation code lives here https://github.com/microsoft/kiota/blob/57ad7e4c5ac6cc1481601b01b77a24a46985d630/src/Kiota.Builder/Writers/Ruby/CodeMethodWriter.cs#L82

repo: microsoft/kiota


text:
Enable LTP test case on WSL

See details in commits.

@squirrelsc please rebase and resolve the conflict

@squirrelsc please rebase and resolve the conflict

Sure. I found shell doesn't supported WSL. I will add more commits.

@LiliDeng Ready to merge

source: gharchive/pull-request

authors: LiliDeng squirrelsc

repo: microsoft/lisa


text:
Don't work malmo_install.ps1 (Windows)

PS C:\Files\Malmo\scripts> .\malmo_install.ps1
WARNING: The names of some imported commands from the module 'malmo_lib' include unapproved verbs that might make them
less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose
parameter. For a list of approved verbs, type Get-Verb.
Directory: C:\Users\alber

Mode                 LastWriteTime         Length Name

d-----        18/01/2022     22:41                temp
Looking for C:\Files\Malmo\malmo.properties
=====================
Checking dependencies
Install-7Zip;
Install-Ffmpeg;
Install-Python3
7-Zip already installed.
True
=================
Installing ffmpeg
Downloading http://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-latest-win64-static.zip to \Users\alber\temp\ffmpeg.zip ...
Exception calling "DownloadFile" with "2" argument(s): "The remote name could not be resolved: 'ffmpeg.zeranoe.com'"
An error occurred, please check for error messages above. If the error persists, please raise an issue on https://github.com/Microsoft/malmo.

A lot of those dependency files that script is downloading are gone. The URL they call is dead. You may be able to find new links or try your hand at updating the dependencies. But I warn, it is and will be an uphill battle.

I provided an answer to this problem at #911. Basically, the zeranoe's link is dead so you can download the dependency from here. Also in the malmo_install file remove FFmpeg from the list of dependencies to download. I think there is an InstallList somewhere in the code, just make sure that FFmpeg is removed since you downloaded it manually.
Link to download the new zip: https://github.com/ottverse/ffmpeg-builds/raw/master/ffmpeg-20210804-65fdc0e589-win64-static.zip

repo: microsoft/malmo


text:
WinUI HyperlinkButton is not displayed underlined

Describe the bug
The HyperlinkButton default behavior is not consistent with that HyperlinkButton documentation notes.
Original post: https://stackoverflow.com/questions/71694089/winui-hyperlinkbutton-is-not-displayed-underlined
Steps to reproduce the bug
A blank WinUI3 project with <HyperlinkButton Content="www.microsoft.com" NavigateUri="http://microsoft.com"/>
Expected behavior
Consistent Behavior.
Screenshots

NuGet package version
WinUI 3 - Windows App SDK 1.0
Windows app type

[ ] UWP
[ ] Win32

Device form factor
Desktop
Windows version
Windows 11 (21H2): Build 22000
Additional context
No response

The documentation needs updating to reflect the updated design for HyperlinkButton first introduced in WinUI 2.6, see the WinUI Figma toolkit for more info.

Closing as by design.

authors: gabbybilka ojhad yangxiaopo

repo: microsoft/microsoft-ui-xaml


text:
Update visual tree verification infra to get rid of the term "master"

Description

Update documentation, CI scripts and testing code to use new names instead of "master".
Motivation and Context

#2676
How Has This Been Tested?

Ran tests

/azp run

@chingucoding have you tested updating the visual verification reference files after this change?

@chingucoding have you tested updating the visual verification reference files after this change?

I have not tested updating file from the CI. Also we would probably need new screen shots for those since they don't have the new folder name.

@StephenLPeters Should I revert my changes to the documentation and let #2650 include those changes to prevent merge conflicts? @Felix-Dev Would you be fine with that?

@chingucoding I'm fine with merge your changes into my PR and fix any occuring merge conflicts in the developer documentation file (and update it accordingly to use the new term where I added content).

@chingucoding have you tested updating the visual verification reference files after this change?

I have not tested updating file from the CI. Also we would probably need new screen shots for those since they don't have the new folder name.

Does this have to be done in a subsequent checkin or can we do it atomically?

I have not tested updating file from the CI. Also we would probably need new screen shots for those since they don't have the new folder name.
Does this have to be done in a subsequent checkin or can we do it atomically?

Since there are no visual tree verification updates, and the only screenshot right now is the azure artifacts view I don't have access too, there is no screenshot I can update here. If someone with access to the azure directory can provide a screenshot for the updated "microsoft employee" view, we can update it with this PR. However currently the "VisualTree" folder is not present in the drop since there were no changes to the visual tree verification files.

However since #2660 also introduces new screenshots that also need to be updated, we could also do it with that PR is @Felix-Dev is fine with that.

/azp run

However since #2660 also introduces new screenshots that also need to be updated, we could also do it with that PR is @Felix-Dev is fine with that.

@chingucoding and @Felix-Dev how should we progress with merging in this and #2660?  I think merging this and updating #2660 would make sense?

@StephenLPeters Yes, we can merge this into master first and then update #2660 accordingly.

authors: Felix-Dev StephenLPeters chingucoding


text:
[0.13.n] 6DOF unable to click on some objects

Examples of things that can't be clicked on from a Quest device:

The Hello World cube
The monkey head in grab-test

Other things can be clicked on just fine, though the repros seem to be consistent.

Repro'd this on a Rift.

Easiest repro is probably the Hello World cube: ws://mres.altvr.com/helloworld

Turns out this was a simple one. Our threshold where a click becomes a long press in Altspace was set way too short: 0.15 seconds. My tests averaged around 0.2 seconds for a 6DOF trigger press, and sub 0.1 on a mouse.

Let's verify this doesn't degrade the 2D experience before closing this out. This may need to be tuned on a per-input-type basis.

authors: eanders-MS stevenvergenz

repo: microsoft/mixed-reality-extension-sdk


text:
Quick Suggestions with loading message

Hello,
I am trying to create an intellisense / code completion using CompletionItemProvider and I would like to display the "loading..." message when I press the triggered character which is dot ('.') just like what happened on the GIF below after I type FROM and then ctr+space the loading message is displayed then the completion items afterwards. I added a timeout there that's why it shows the loading message before the completion items and I would like to to the same thing when I pressed dot ('.') after a word.

I think that suggestions have two big modes of working.
One is that they are triggered manually, by the user. So the user presses ctrl+space to see suggestions. In that case, the suggestion widget renders Loading... while the results are computed. This is to give the user assurance that their command has been interpreted and the results are computing.
The automatic triggers, like pressing . are not indicative of a user explicitly asking for suggestions. It is possible that the user keeps on typing after . and does not want to see a Loading... message in their face. So in this case the suggestions render directly when the result came in.

authors: alexdima ivhanvillapando

repo: microsoft/monaco-editor


text:
[BUG] ./makelinux.sh fails on Ubuntu 22.04 and clang14

Project
MSIX SDK
Describe the bug
Running "./makelinux.sh" fails with the error:
/home/mattb/msix-packaging/lib/catch2/catch.hpp:8749:34: error: constexpr variable 'sigStackSize' must be initialized by a constant expression
    constexpr static std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
                                 ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mattb/msix-packaging/lib/catch2/catch.hpp:8749:58: note: non-constexpr function 'sysconf' cannot be used in a constant expression
    constexpr static std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
                                                         ^
/usr/include/x86_64-linux-gnu/bits/sigstksz.h:32:22: note: expanded from macro 'MINSIGSTKSZ'
# define MINSIGSTKSZ SIGSTKSZ
                     ^
/usr/include/x86_64-linux-gnu/bits/sigstksz.h:28:19: note: expanded from macro 'SIGSTKSZ'
# define SIGSTKSZ sysconf (_SC_SIGSTKSZ)
                  ^
/usr/include/unistd.h:640:17: note: declared here
extern long int sysconf (int __name) __THROW;
                ^
In file included from /home/mattb/msix-packaging/src/test/msixtest/msixtest.cpp:6:
/home/mattb/msix-packaging/lib/catch2/catch.hpp:8808:33: error: variable length array declaration not allowed at file scope
    char FatalConditionHandler::altStackMem[sigStackSize] = {};
                                ^           ~~~~~~~~~~~~
2 errors generated.
make[2]: *** [src/test/msixtest/CMakeFiles/msixtest.dir/build.make:90: src/test/msixtest/CMakeFiles/msixtest.dir/msixtest.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:619: src/test/msixtest/CMakeFiles/msixtest.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

To Reproduce
Steps to reproduce the behavior:

Install Ubuntu 22.04 LTS on WSL 2
sudo apt install clang cmake
run ./makelinux.sh

Expected behavior
A successful compile
Screenshots
If applicable, add screenshots to help explain your problem.
Platform
Ubuntu 22.04 LTS running on Windows 11 22000.613
Additional context
I would be happy to provide more information upon request.

It seems to work fine if I add --skip-tests

repo: microsoft/msix-packaging


text:
Update to latest googletest package and fix local tests

This change updates the GIT_TAG for the googletest external dependency to the latest commit.
To accommodate this update, motifCppTest.h is also update to reflect the removal of GTEST_IS_NULL_LITERAL_(expected) which is no longer needed.

My main concern with this changes is the compatibility with the Google test adapter used by ADO.
In the PR #40 I had to switch from the latest GTest code to the version used by that adapter in order to be able to run tests in ADO. Let's figure out first if this PR does not break it again.

authors: sid-dahiya vmoroz

repo: microsoft/mso


text:
getting exception on trying authentication=ActiveDirectoryMSI and msiClientId

Driver version
exception.txt
SQL Server version
Microsoft SQL Azure (RTM) - 12.0.2000.8   Feb 26 2020 10:26:43   Copyright (C) 2019 Microsoft Corporation
Client Operating System
Linux
JAVA/JVM version
java version "1.8.0"
Problem description
We have assigned an identity to our AKS pod , then we are trying to use the identity to connect to our sql server. We are getting following exception. We are created the identity as user in our DB with db_datawriter and  db_datareader access
Our connection string is below
jdbc:sqlserver://${sql-servername}.database.windows.net;database=${sql-db};msiClientId=AZ_SQL_QA3;encrypt=true;trustServerCertificate=true;useNTLMv2=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;authentication=ActiveDirectoryMSI
The program works with service account
We are getting following exception
##########################################################################
2020-04-16 22:27:51,410;org.apache.tomcat.jdbc.pool.ConnectionPool;main;ERROR;Unable to create initial connections of pool.;java.sql.SQLException: Can't find resource for bundle com.microsoft.sqlserver.jdbc.SQLServerResource, key R_MSITokenFailureClientId
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:332)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:212)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:739)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:671)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:483)
at org.apache.tomcat.jdbc.pool.ConnectionPool.(ConnectionPool.java:154)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:131)
at org.springframework.jdbc.datasource.DataSourceUtils.fetchConnection(DataSourceUtils.java:151)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:115)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:78)
at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:319)
at org.springframework.jdbc.support.JdbcUtils.extractDatabaseMetaData(JdbcUtils.java:356)
at org.springframework.boot.autoconfigure.orm.jpa.DatabaseLookup.getDatabase(DatabaseLookup.java:73)
at org.springframework.boot.autoconfigure.orm.jpa.JpaProperties.determineDatabase(JpaProperties.java:142)
at org.springframework.boot.autoconfigure.orm.jpa.JpaBaseConfiguration.jpaVendorAdapter(JpaBaseConfiguration.java:112)
at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration$$EnhancerBySpringCGLIB$$3e0b9f0e.CGLIB$jpaVendorAdapter$4()
at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration$$EnhancerBySpringCGLIB$$3e0b9f0e$$FastClassBySpringCGLIB$$66797235.invoke()
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363)
at org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration$$EnhancerBySpringCGLIB$$3e0b9f0e.jpaVendorAdapter()
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:456)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1288)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1127)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:273)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1237)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1164)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:509)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1288)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1127)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:273)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1237)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1164)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:509)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1288)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1127)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1083)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:853)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
at com.walgreens.rxit.hs.fhir.FhirBundleMedicationOrderApplication.main(FhirBundleMedicationOrderApplication.java:16)
exception.txt
#########################################################################

Hi @biswabandhu21 ,
Which driver version are you using?

This error message was due to an issue in the driver, which is fixed in 8.3.0-preview version, please update the driver, you should get a more descriptive error message: MSI Token failure: Failed to acquire access token from IMDS, verify your clientId.

jdbc driver version 8.2.1.jre8.
adlj ver 0.0.2

8.2.1.jre requires 1.6.4 version of adal4j. Make sure you include the correct dependencies. See Maven.

solved after taking latest jar versions

repo: microsoft/mssql-jdbc


text:
Publish-PerTenantExtensionApps: Invoke-WebRequest : The remote server returned an error (400) Bad Request.

As part of our release pipeline I am using Publish-PerTenantExtensionApps to publish the new version of the PTE. But the pubishing ends with error:
Invoke-WebRequest : The remote server returned an error: (400) Bad Request.

There is no any info what's wrong or why we get a Bad Request error on line 83. See attached printscreen:

This line in script: Publish-PerTenantExtensionApps.ps1 will caused the error:
$getExtensions = Invoke-WebRequest -Headers $authHeaders -Method Get -Uri "$automationApiUrl/companies($companyId)/extensions" -UseBasicParsing

I have tried the URL to get the extensions in POSTMAN (with OAuth2 authentication) and than it works perfectly and return a json array with the extension data of the tenant.
I also have tried this in POWERSHELL  and then something strange happen... When I use the url from the script it fails with a Bad Request error:
$getExtensions = Invoke-WebRequest -Headers $authHeaders -Method Get -Uri "https://api.businesscentral.dynamics.com/v2.0/Sandbox_Qmaze/api/microsoft/automation/v1.0/companies(fbd2d0c0-f6f8-eb11-a1de-000d3ac280dd)/extensions" -UseBasicParsing

But when I do the same with the url without /extension it works and return 200/the company informatie (or companies)
$getExtensions = Invoke-WebRequest -Headers $authHeaders -Method Get -Uri "https://api.businesscentral.dynamics.com/v2.0/$environmentName/api/microsoft/automation/v1.0/companies($companyId)" -UseBasicParsing

Version of BcContainerHelper version 3.0.4
The user has Admin access to the tenant and has Superuser permissions (and for testing I also added D365 Automation and D365 Extension Mgt permission sets)
The strange thing is we run this script by several customers, but by only one it fails and give the above error.

the fix for this seems to be the same as for #2371

I already found the issue Freddy, unfortunately I use the wrong admin user. The user which I use is Global Admin in the tenant but hasn't a Business Central license.
The only strange thing is that the webrequest return a 500 Bad Request instead of a license error which is much clearer to reproduce the problem!

I actually might be able to find a better error message (did that in another case) - will check that out.
Lets leave this open for that.

you can try to grab the change I just checked in and test with the wrong user again and see what error message you get now
You have to manually download the file from my branch (or grab the change) and apply - I haven't checked into main yet.

I have tested the change Freddy, it looks good! With the wrong account I get the following (much clearer) error message:
The remote server returned an error: (400) Bad Request. {"error":{"code":"Application_DialogException","message":"You do not have the required permissions to install the selected app.
Contact your Partner or system administrator to install the app or assign you permissions.

@IesMeulmeester how did you resolved the issue? I am Global Admin and have a BC license assigned in the tenant.

authors: HazardMK IesMeulmeester freddydk

repo: microsoft/navcontainerhelper


text:
Setup-BcContainerTestUsers and Entitlements?

Describe the issue
After reading Working with Working with Development Sandboxes and Entitlements and New-NavContainer -assignPremiumPlan didn't produce a docker container where the entitlements were enforced (see #3174), I created a docker container and used Setup-BcContainerTestUsers instead.
I took the premium user and added SUPER-Permissions to test if the Entitlements would be enforced here, but I tested with the same report and got the same result. The Entitlements are still not being enforced.

So the question is how do we get cloud sandbox docker containers where the permissions behave like the real cloud environment, which would be really helpful for developing for AppSource and cloud customers (PTE).
Scripts used to create container and cause the issue
$Credential = Get-Credential
New-BcContainer `
    -accept_eula `
    -alwaysPull `
    -updateHosts `
    -containername test `
    -artifactUrl "https://bcartifacts.azureedge.net/sandbox/22.4.59114.60133/de" `
    -PublicDnsName dockerhub.company.org `
    -useSSL `
    -useTraefik `
    -shortcuts None `
    -myscripts @("C:\ProgramData\company\SetupCertificate.ps1", "C:\ProgramData\company\companySSL.PFX") `
    -auth NavUserPassword `
    -Credential $Credential `
    -licenseFile "C:\ProgramData\company\dockerLicenseFiles\lic.bclicense"

Setup-BcContainerTestUsers -containerName test -tenant default -password $Credential.Password -credential $Credential

Full output of scripts

BcContainerHelper version 5.0.3
BC.HelperFunctions emits usage statistics telemetry to Microsoft
BcContainerHelper is version 5.0.3
BcContainerHelper is running as administrator
HyperV is Enabled
UsePsSession is True
Host is Microsoft Windows Server 2019 Standard - 10.0.17763.4737
Docker Client Version is 19.03.5
Docker Server Version is 19.03.5
Removing Desktop shortcuts
Fetching all docker images
Fetching all docker volumes
Enabling SSL as otherwise all clients will see mixed HTTP / HTTPS request, which will cause problems e.g. on the mobile
 and modern windows clients
Pulling image mcr.microsoft.com/businesscentral:10.0.17763.4737
10.0.17763.4737: Pulling from businesscentral
Using image mcr.microsoft.com/businesscentral:10.0.17763.4737
PublicDnsName is dockerhub.company.org
Creating Container test
Style: sandbox
Multitenant: Yes
Version: 22.4.59114.60133
Platform: 22.0.60117.0
Generic Tag: 1.0.2.14
Container OS Version: 10.0.17763.4737 (ltsc2019)
Host OS Version: 10.0.17763.4737 (ltsc2019)
Using process isolation
Using locale de-DE
Adding special CheckHealth.ps1 to enable Traefik support
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file C:\ProgramData\company\dockerLicenseFiles\lic.bclicense
Additional Parameters:
-e webserverinstance=test
-e publicdnsname=dockerhub.company.org
-l "traefik.protocol=https"
-l "traefik.web.frontend.rule=PathPrefix:/test"
-l "traefik.web.port=443"
-l "traefik.soap.frontend.rule=PathPrefix:/testsoap;ReplacePathRegex: ^/testsoap(.*) /BC$1"
-l "traefik.soap.port=7047"
-l "traefik.rest.frontend.rule=PathPrefix:/testrest;ReplacePathRegex: ^/testrest(.*) /BC$1"
-l "traefik.rest.port=7048"
-l "traefik.dev.frontend.rule=PathPrefix:/testdev;ReplacePathRegex: ^/testdev(.*) /BC$1"
-l "traefik.dev.port=7049"
-l "traefik.snap.frontend.rule=PathPrefix:/testsnap;ReplacePathRegex: ^/testsnap(.*) /BC$1"
-l "traefik.snap.port=7083"
-l "traefik.dl.frontend.rule=PathPrefixStrip:/testdl"
-l "traefik.dl.port=8080"
-l "traefik.dl.protocol=http"
-l "traefik.enable=true"
-l "traefik.frontend.entryPoints=https"
--env customNavSettings=PublicODataBaseUrl=https://dockerhub.company.org/testrest/odata,PublicSOAPBaseUrl=ht
tps://dockerhub.company.org/testsoap/ws,PublicWebBaseUrl=https://dockerhub.company.org/test
Files in C:\ProgramData\BcContainerHelper\Extensions\test\my:
- AdditionalOutput.ps1
- CheckHealth.ps1
- license.bclicense
- MainLoop.ps1
- companySSL.PFX
- SetupCertificate.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container test from image mcr.microsoft.com/businesscentral:10.0.17763.4737
41570b346180c2075cd15aa6881f5ec736d26019895a56e1cc703d2a470b4065
Waiting for container test to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/22.4.59114.60133/de
Using installer from C:\Run\210-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
WARNING: Waiting for service 'SQL Server (SQLEXPRESS) (MSSQL$SQLEXPRESS)' to
start...
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\22.4.59114.60133\platform\ServiceTier\Program Files
c:\dl\sandbox\22.4.59114.60133\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\22.4.59114.60133\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\22.4.59114.60133\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\sandbox\22.4.59114.60133\platform\WebClient\Microsoft Dynamics NAV
Copying ModernDev Files
c:\dl\sandbox\22.4.59114.60133\platform
c:\dl\sandbox\22.4.59114.60133\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\22.4.59114.60133\de\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\22.4.59114.60133\platform\Test Assemblies
Copying Extensions
C:\dl\sandbox\22.4.59114.60133\de\Extensions
Copying Applications
C:\dl\sandbox\22.4.59114.60133\platform\Applications
Copying Applications.DE
C:\dl\sandbox\22.4.59114.60133\de\Applications.DE
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Restoring CRONUS Demo Database
Setting CompatibilityLevel for tenant on localhost\SQLEXPRESS
Exporting Application to CRONUS
Removing Application from tenant
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Starting Business Central Service Tier
Importing license file
Copying Database on localhost\SQLEXPRESS from tenant to default
Taking database tenant offline
Copying database files
Attaching files as new Database default
Putting database tenant back online
Mounting tenant database
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Stopping Business Central Service Tier
Installation took 330 seconds
Installation complete
Initializing...
Setting host.containerhelper.internal to 172.24.176.1 in container hosts file
Starting Container
Hostname is test
PublicDnsName is dockerhub.company.org
Using NavUserPassword Authentication
Certificate File Thumbprint 28EAC4018B94AB194E7F1E3FE451385C82C3AC1F
Import Certificate to LocalMachine\my
Modifying Service Tier Config File with Instance Specific Settings
Modifying Service Tier Config File with settings from environment variable
Setting PublicODataBaseUrl to https://dockerhub.company.org/testrest/odata
Setting PublicSOAPBaseUrl to https://dockerhub.company.org/testsoap/ws
Setting PublicWebBaseUrl to https://dockerhub.company.org/test
Starting Service Tier
CertificateThumprint 28EAC4018B94AB194E7F1E3FE451385C82C3AC1F
Registering event sources
Creating DotNetCore Web Server Instance
Using application pool name: test
Using default container name: NavWebApplicationContainer
Copy files to WWW root C:\inetpub\wwwroot\test
Create the application pool test
Create website: NavWebApplicationContainer with SSL
Update configuration: navsettings.json
Done Configuring Web Client
Enabling Financials User Experience
Using license file 'c:\run\my\license.bclicense'
Import License
Dismounting Tenant
Mounting Tenant
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Creating http download site
Setting SA Password and enabling SA
Creating admin as SQL User and add to sysadmin
Creating SUPER user
Container IP Address: 172.24.176.40
Container Hostname  : test
Container Dns Name  : dockerhub.company.org
Web Client          : https://dockerhub.company.org/test/?tenant=default
Dev. Server         : https://dockerhub.company.org
Dev. ServerInstance : BC
Dev. Server Tenant  : default
Setting test to 172.24.176.40 in host hosts file
Setting test-default to 172.24.176.40 in host hosts file
Setting test-default to 172.24.176.40 in container hosts file

Files:
http://dockerhub.company.org:8080/ALLanguage.vsix

Container Total Physical Memory is 511.9Gb
Container Free Physical Memory is 237.2Gb

Initialization took 50 seconds
Ready for connections!
Reading CustomSettings.config from test
Cleanup old dotnet core assemblies
Container test successfully created
Because of Traefik, the following URLs need to be used when accessing the container from outside your Docker host:
Web Client:        https://dockerhub.company.org/test
SOAP WebServices:  https://dockerhub.company.org/testsoap
OData WebServices: https://dockerhub.company.org/testrest
Dev Service:       https://dockerhub.company.org/testdev
Snapshot Service:  https://dockerhub.company.org/testsnap
File downloads:    https://dockerhub.company.org/testdl
Health check returns False, restarting container
Removing Session test
test
Waiting for container test to be ready

Initializing...
Setting host.containerhelper.internal to 172.24.176.1 in container hosts file
Restarting Container
PublicDnsName unchanged
Hostname is test
PublicDnsName is dockerhub.company.org
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Starting Service Tier
Container IP Address: 172.24.181.66
Container Hostname  : test
Container Dns Name  : dockerhub.company.org
Web Client          : https://dockerhub.company.org/test?tenant=default
Dev. Server         : https://dockerhub.company.org
Dev. ServerInstance : BC
Dev. Server Tenant  : default
Setting test to 172.24.181.66 in host hosts file
Setting test-default to 172.24.181.66 in host hosts file
Setting test-default to 172.24.181.66 in container hosts file

Files:
http://dockerhub.company.org:8080/ALLanguage.vsix

Container Total Physical Memory is 511.9Gb
Container Free Physical Memory is 242.5Gb

Initialization took 11 seconds
Ready for connections!
Waiting for tenants to be mounted

Use:
Get-BcContainerEventLog -containerName test to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName test to get debug information about the container
Enter-BcContainer -containerName test to open a PowerShell prompt inside the container
Remove-BcContainer -containerName test to remove the container again
docker logs test to retrieve information about URL's again
Synchronizing Permissions Mock on default
App successfully synchronized
Installing Permissions Mock on default
App successfully installed
Synchronizing Test Runner on default
App successfully synchronized
Installing Test Runner on default
App successfully installed
Synchronizing Any on default
App successfully synchronized
Installing Any on default
App successfully installed
Synchronizing Library Assert on default
App successfully synchronized
Installing Library Assert on default
App successfully installed
Skipping app 'C:\Applications.DE\Microsoft_Permissions Mock_22.4.59114.60133.app' as it is already installed
Synchronizing Library Variable Storage on default
App successfully synchronized
Installing Library Variable Storage on default
App successfully installed
TestToolkit successfully imported
Publishing C:\ProgramData\BcContainerHelper\Extensions\test\9a54c6f8-9588-4da1-9dad-3978168b4dae\Microsoft_System
Application Test Library.app
Synchronizing System Application Test Library on tenant default
Installing System Application Test Library on tenant default
App Microsoft_System Application Test Library.app successfully published
Downloading C:\Users\adm_dago\AppData\Local\Temp\ed55d054-211e-4bf4-b5a2-14868fef2739
Downloading using WebClient
Publishing C:\ProgramData\BcContainerHelper\Extensions\test\264445fa-f7bd-4f4f-b615-36ef3425d87f\ed55d054-211e-4bf
4-b5a2-14868fef2739.app
Synchronizing CreateTestUsers on tenant default
Installing CreateTestUsers on tenant default
App ed55d054-211e-4bf4-b5a2-14868fef2739.app successfully published
Invoke GET on https://172.24.181.66:7048/BC/api/v1.0/companies?$filter=name%20eq%20%27CRONUS%20DE%27&tenant=default
Invoke POST on https://172.24.181.66:7048/BC/api/Microsoft/Setup/beta/companies(c6c2cb6d-da46-ee11-be72-6045bde99bee)/t
estUsers?tenant=default
Uninstalling CreateTestUsers from tenant default
Unpublishing CreateTestUsers
App successfully unpublished
Uninstalling System Application Test Library from tenant default
Unpublishing System Application Test Library
App successfully unpublished
...

I will be discussing what we can do next week with some people internally

authors: DanielGoehler freddydk


text:
Compile-AppInNavContainer hangs in DevOps

when using Compile-AppInNavContainer in build pipeline very often the task just hangs - and I'm not really sure where to look for the problem.
Here's the output from the task (as you can see from timestamps I had to cancel it)
2019-11-13T23:06:03.4165720Z Compilation ended at '0:5:59.402'.
2019-11-13T23:06:03.4169381Z
2019-11-13T23:06:03.4242436Z C:\agents\BuildAgent-demo\_work\1\a\Demo_SampleApp_1.0.0.0.app successfully created in 60 seconds
2019-11-13T23:06:03.4278428Z ##[debug]$LASTEXITCODE: 0
2019-11-13T23:10:25.3206264Z ##[debug]Leaving Invoke-VstsTool.
2019-11-13T23:10:25.3242870Z ##[debug]Leaving C:\agents\BuildAgent-demo\_work\_tasks\PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1\2.151.2\powershell.ps1.
2019-11-13T23:10:25.3978775Z ##[error]The operation was canceled.
the command being executed is pretty straight forward:
Compile-AppInNavContainer     -containerName $containerName
-credential $credential     -appProjectFolder $buildProjectFolder
-appOutputFolder $buildOutputFolder | Out-Null
Also I've noticed that if I don't recreate the container (comment out tasks for creating/removing) - this never happens.
Any ideas where to start looking for a problem/solution?

Hi @AndriusAndrulevicius
how did you solve this? We have the same issue from time to time. When rerunning the job it normally works, but it is a bit annoying.

Hi @cmuris,
are you cleaning the workspace before compiling?
adding "workspace:  clean: all" to the compilation job seems to solve that issue.
P.S.
sorry to be "never mind, I figured it out" type of guy...

Thanks for the fast reply! In this particular case it was set to "clear sources" for whatever reason. I set it to "all" now and rerunning it worked instantly. I will monitor this.
Thanks
Christian

authors: AndriusAndrulevicius cmuris


text:
support third party tuner, assessor, advisor.

Currently, some contributors write tuners for NNI, and they'd like to merge tuners into NNI repo. It's not easy to control quality and fix bugs. So it's better to let contributors maintain their tuner, assessor, advisor on their repos, and NNI provides a way to install it. It's a different scenario with customized, as it's focus on sharing.
Supported functions,

Install by nnictl packages like below. Support a config url. In the config, it should includes, name, type(tuner, assessor, advisor), dependent pip packages, copied sources, entry(inherited tuner), help url(optional), description(optional)
nnictl package install --config=https://github.com/my/tuner/customized_tuner.config
List supported tuners, so user know which is installed.
When using it, user just needs to specify name, not full path like customized tuner. It needs NNI to check name conflict when install package.
uninstall?

The fundamental issue is name resolution of tuners, no matter its usage scenarios (built-in, customized, etc. ). In my opinion, a good design to leverage Python module search mechanism and let user make the tuner available through one of the following ways:

configure PYTHONPATH with the code of tuner
install tuner module through package management systems such as pip or conda

Then config.yml can looks like:
tuner:
    tunerName: tuner.module.name # just make this tuner class importable
...

My key concern is to keep the software complexity of NNI at a low level.

The fundamental issue is name resolution of tuners, no matter its usage scenarios (built-in, customized, etc. ). In my opinion, a good design to leverage Python module search mechanism and let user make the tuner available through one of the following ways:

configure PYTHONPATH with the code of tuner
install tuner module through package management systems such as pip or conda

Then config.yml can looks like:
tuner:
    tunerName: tuner.module.name # just make this tuner class importable
...

My key concern is to keep the software complexity of NNI at a low level.

I added one more feature, NNI should support a configurable name list, so that user needs to specify name in config only. And when installation, NNI should detect name conflict.

@QuanluZhang - i believe this is supported with #2287, right?

@QuanluZhang - i believe this is supported with #2287, right?

yes, it had been supported, although I'm not sure whether in this pr. I will close this issue, feel free to reopen it.

authors: kvartet leckie-chn scarlett2018 squirrelsc

repo: microsoft/nni


text:
When creating a bug, generate the OneFuzz commands to download the binaries and crash file

We currently create a comment when we create a bug. It looks something like this:
This input caused the fuzz target C:\onefuzz\blob-containers\fuzzpremium02\exename.exe to crash. The faulting input SHA256 hash is 1a591cf3578fb86a7f17b1e80cce9e0ec433b94d71a1297dfc083fa75fe5a9ba
It would be more helpful to include the OneFuzz commands to download the crashing input and the setup container files.
AB#42134881

We also need to point out that some bugs might not be repro-able on local machine. They might have custom setup scripts that require modifying the VM in ways that you would not want to do to your local dev box 🙂

authors: Porges mgreisen

repo: microsoft/onefuzz


text:
Fix {target_harness} expansion in template

This seems to have been inadvertently broken by 41f973184ec7653c7048872362e47e2ca9999f89.
The missing variable expansion was exposed by #2789, so tasks using {target_harness} (which is not a valid expansion) fail.

Codecov Report

Merging #2866 (0bc3178) into main (1b07b7d) will decrease coverage by 1.50%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2866      +/-   ##
==========================================
- Coverage   28.09%   26.60%   -1.50%
==========================================
  Files         302      125     -177
  Lines       35629    13408   -22221
==========================================
- Hits        10011     3567    -6444
+ Misses      25618     9841   -15777

Impacted Files
Coverage Δ

src/agent/input-tester/src/test_result/mod.rs

src/agent/onefuzz-task/src/tasks/fuzz/generator.rs

src/agent/input-tester/src/logging.rs

src/agent/stacktrace-parser/src/lib.rs

...c/agent/dynamic-library/src/bin/dynamic-library.rs

src/agent/coverage/src/timer.rs

src/agent/srcview/src/modoff.rs

src/agent/coverage/src/cobertura.rs

src/agent/onefuzz/src/memory/tests_linux.rs

src/agent/onefuzz/src/monitor/tests.rs

... and 167 more

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

This is a real bug, but it only lingered because that template has been superseded by what we currently call libfuzzer dotnet_dll.
Since a major release is coming up, now would be a great time to just remove the old POC implementation entirely. PR for that here: #2875

Closing in favour of #2875

authors: Porges codecov-commenter ranweiler


text:
[webportal] Fix permission UI of read-only storage

fix #4688
After fix:

Can we use RO instead of R? It is easier to understand RO because Kubernetes and Linux also uses it.

Coverage remained the same at 34.607% when pulling 2b00a15c2a0f63f8b00778872633f72b24bdcefb on yiyi/webportal_fix_permission_UI_of_readonly_storage into 7cbf51353c6992d65961fb4e261743cc78160244 on master.

Can we use RO instead of R? It is easier to understand RO because Kubernetes and Linux also uses it.

Done.

authors: coveralls hzy46 yiyione

repo: microsoft/pai


text:
Add pylint config

I find all the pylint warnings around docstrings distracting, and since it doesn't seem that docstrings are actually a high priority in this codebase, this config turns off the warnings. Let me know if you prefer a different approach.

Codecov Report

Merging #107 (88a9d34) into main (762f49f) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #107   +/-   ##
=======================================
  Coverage   88.93%   88.93%
=======================================
  Files          11       11
  Lines        2069     2069
=======================================
  Hits         1840     1840
  Misses        229      229

Impacted Files
Coverage Δ

src/picologging/handlers.py
94.48% <0.00%> (ø)

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

authors: codecov-commenter pamelafox

repo: microsoft/picologging


text:
[Documentation] Getting started - VS Code should show "Show output of tests"

The Getting started - VS Code ( https://playwright.dev/docs/getting-started-vscode ) is a good introduction
to using Playwright in VS Code. However there is a little bit of information that can be added to help the user.
In the "View and Run All Tests" section, there is a small inconspicuous button that is used to reveal the test output.
See attached picture for what I mean. Updating the documentation in whatever way suitable will probably assist future
readers.
Thanks,

closing this as docs have been updated

authors: debs-obrien khtan


text:
Support for deploy command

Support for --deploy DRIVE_NAME to automatically copy .hex/.uf2 file to drive.

I guess it would be mostly useful if it detected the drive. Otherwise you can just do: makecode && cp built/binary.uf2 /Volumes/MICROBIT or something

authors: mmoskal pelikhan

repo: microsoft/pxt-mkc


text:
Delete project message

Hi,
When I delete a project in Editor, It shows following message.
What should I do?
https://drive.google.com/file/d/1r855a0YfpovR9NKn37MYKNdtHisVBAEL/view?usp=sharing
and
https://drive.google.com/open?id=1wsJU4dAlwPeTaoBymS8hZTEem0eoQvOk
Thanks.

Deleting is not supported in localhost - which is for development only.

Note: you can copy paste screenshots into the GitHub text editor directly.

Thank you for your answer.

authors: kigateG pelikhan

repo: microsoft/pxt-robotis


text:
Merge translations

Support for XLIFF

This is still relevant.

repo: microsoft/pxt


text:
Type error not caught for tuple of incorrect type

 Environment data

Language Server version: 2021.3.2
OS and version: darwin x64
Python version (and distribution if applicable, e.g. Anaconda): 3.9.2
python.analysis.indexing: undefined
python.analysis.typeCheckingMode: basic

 Expected behaviour
Expected type error would be flagged by Pylance.
 Actual behaviour
Pylance doesn't raise any errors.
 Logs
Python Language Server Log
[Info  - 8:03:11 PM] Pylance language server 2021.3.2 (pyright 85309906) starting
[Info  - 8:03:11 PM] Server root directory: /Users/johnli/.vscode/extensions/ms-python.vscode-pylance-2021.3.2/dist
[Info  - 8:03:11 PM] No configuration file found.
[Info  - 8:03:11 PM] Setting pythonPath for service "pylance_errors": "/Users/johnli/bin/python"
Search paths found for configured python interpreter:
  /usr/local/Cellar/python@3.9/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9
  /usr/local/Cellar/python@3.9/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload
  /usr/local/lib/python3.9/site-packages
[Error - 8:03:11 PM] stubPath /Users/johnli/src/pylance_errors/typings is not a valid directory.
[Info  - 8:03:12 PM] Assuming Python version 3.9
[Info  - 8:03:12 PM] Assuming Python platform Darwin
[Info  - 8:03:12 PM] Searching for source files
[Info  - 8:03:12 PM] Found 2 source files
[Info  - 8:03:12 PM] Background analysis(1) root directory: /Users/johnli/.vscode/extensions/ms-python.vscode-pylance-2021.3.2/dist
[Info  - 8:03:12 PM] Background analysis(1) started
Background analysis message: setConfigOptions
Background analysis message: setTrackedFiles
Background analysis message: markAllFilesDirty
Background analysis message: ensurePartialStubPackages
Background analysis message: setFileOpened
Background analysis message: analyze
[BG(1)] analyzing: /Users/johnli/src/pylance_errors/pylance_false_negative_tuple.py ...
[BG(1)]   parsing: /Users/johnli/src/pylance_errors/pylance_false_negative_tuple.py (17ms)
[BG(1)]   parsing: /Users/johnli/.vscode/extensions/ms-python.vscode-pylance-2021.3.2/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 2ms] (78ms)
[BG(1)]   binding: /Users/johnli/.vscode/extensions/ms-python.vscode-pylance-2021.3.2/dist/typeshed-fallback/stdlib/builtins.pyi (31ms)
[BG(1)]   binding: /Users/johnli/src/pylance_errors/pylance_false_negative_tuple.py (0ms)
[BG(1)]   checking: /Users/johnli/src/pylance_errors/pylance_false_negative_tuple.py ...
[BG(1)]     parsing: /Users/johnli/.vscode/extensions/ms-python.vscode-pylance-2021.3.2/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi [fs read 0ms] (9ms)
[BG(1)]     binding: /Users/johnli/.vscode/extensions/ms-python.vscode-pylance-2021.3.2/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi (1ms)
[BG(1)]     parsing: /Users/johnli/.vscode/extensions/ms-python.vscode-pylance-2021.3.2/dist/typeshed-fallback/stdlib/typing.pyi [fs read 0ms] (22ms)
[BG(1)]     binding: /Users/johnli/.vscode/extensions/ms-python.vscode-pylance-2021.3.2/dist/typeshed-fallback/stdlib/typing.pyi (9ms)
[BG(1)]     parsing: /Users/johnli/.vscode/extensions/ms-python.vscode-pylance-2021.3.2/dist/typeshed-fallback/stubs/typing-extensions/typing_extensions.pyi [fs read 1ms] (4ms)
[BG(1)]     binding: /Users/johnli/.vscode/extensions/ms-python.vscode-pylance-2021.3.2/dist/typeshed-fallback/stubs/typing-extensions/typing_extensions.pyi (1ms)
[BG(1)]     parsing: /Users/johnli/.vscode/extensions/ms-python.vscode-pylance-2021.3.2/dist/typeshed-fallback/stdlib/abc.pyi [fs read 0ms] (0ms)
[BG(1)]     binding: /Users/johnli/.vscode/extensions/ms-python.vscode-pylance-2021.3.2/dist/typeshed-fallback/stdlib/abc.pyi (0ms)
[BG(1)]   checking: /Users/johnli/src/pylance_errors/pylance_false_negative_tuple.py (83ms)
[BG(1)] analyzing: /Users/johnli/src/pylance_errors/pylance_false_negative_tuple.py (211ms)
Background analysis message: resumeAnalysis
[FG] parsing: /Users/johnli/src/pylance_errors/pylance_false_negative_tuple.py (21ms)
[FG] parsing: /Users/johnli/.vscode/extensions/ms-python.vscode-pylance-2021.3.2/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 2ms] (85ms)
[FG] binding: /Users/johnli/.vscode/extensions/ms-python.vscode-pylance-2021.3.2/dist/typeshed-fallback/stdlib/builtins.pyi (29ms)
[FG] binding: /Users/johnli/src/pylance_errors/pylance_false_negative_tuple.py (0ms)

 Code Snippet / Additional information
lookup_ints is annotated to return a tuple of strs, but the code returns a tuple of bools. Pylance doesn't raise any errors.
# pylance doesn't raise any errors, even though `bools` contains bool and not str.
def lookup_ints(ints: list[int], id_to_bool: dict[int, bool]) -> tuple[str, ...]:
    # (variable) bools: tuple[bool]
    bools = tuple(id_to_bool[i] for i in ints)
    return bools

id_to_bool = {1: True, 2: False}
result = lookup_ints([1, 2], id_to_bool)
print(type(result), result)   # <class 'tuple'> (True, False)

mypy correctly finds the error:
$ mypy pylance_false_negative_tuple.py
pylance_false_negative_tuple.py:5: error: Incompatible return value type (got "Tuple[bool, ...]", expected "Tuple[str, ...]")
Found 1 error in 1 file (checked 1 source file)

Thanks for the bug report. This was due to a regression that crept into the code a few months ago. I've fixed the bug and updated our unit tests to ensure that such a regression won't go uncaught in the future.
This will be fixed in the next release of pylance.

This issue has been fixed in version 2021.3.4, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202134-31-march-2021

authors: erictraut jakebailey jli

repo: microsoft/pylance-release