text:
Out of proc builds with BuildManager, not supported on OSX

This can be seen with the Microsoft.Build.UnitTests.BackEnd.BuildManager_Tests.SimpleBuildOutOfProcess test. The logs show, that is fails at:
System.EntryPointNotFoundException: CreateProcess   at (wrapper managed-to-native) Microsoft.Build.BackEnd.NativeMethods:CreateProcess (string,string,Microsoft.Build.BackEnd.NativeMethods/SECURITY_ATTRIBUTES&,Microsoft.Build.BackEnd.NativeMethods/SECURITY_ATTRIBUTES&,bool,uint,intptr,string,Microsoft.Build.BackEnd.NativeMethods/STARTUP_INFO&,Microsoft.Build.Back End.NativeMethods/PROCESS_INFORMATION&)   at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.LaunchNode (System.String msbuildLocation, System.String commandLineArgs) [0x0010b] in /Users/ankit/dev/msbuild/src/XMakeBuildEngine/BackEnd/Components/Communications/NodeProviderOutOfProcBase.cs:527   at Microsoft.Build.BackEnd.NodeProviderOutOfProcBase.GetNode (System.String msbuildLocation, System.String commandLineArgs, System.Int32 nodeId, Microsoft.Build.BackEnd.INodePacketFactory factory, System.Int64 hostHandshake, System.Int64 clientHandshake, Microsoft.Build.BackEnd.NodeProviderOutOfProcBase+NodeCon textTerminateDelegate terminateNode) [0x00229] in /Users/ankit/dev/msbuild/src/XMakeBuildEngine/BackEnd/Components/Communications/NodeProviderOutOfProcBase.cs:270   at Microsoft.Build.BackEnd.NodeProviderOutOfProc.CreateNode (System.Int32 nodeId, Microsoft.Build.BackEnd.INodePacketFactory factory, Microsoft.Build.BackEnd.NodeConfiguration configuration) [0x000c0] in /Users/ankit/dev/msbuild/src/XMakeBuildEngine/BackEnd/Components/Communications/NodeProviderOutOfProc.cs:128   at Microsoft.Build.BackEnd.NodeManager.AttemptCreateNode (Microsoft.Build.BackEnd.INodeProvider nodeProvider, Microsoft.Build.BackEnd.NodeConfiguration nodeConfiguration) [0x00075] in /Users/ankit/dev/msbuild/src/XMakeBuildEngine/BackEnd/Components/Communications/NodeManager.cs:361   at Microsoft.Build.BackEnd.NodeManager.CreateNode (Microsoft.Build.BackEnd.NodeConfiguration configuration, Microsoft.Build.Execution.NodeAffinity nodeAffinity) [0x00052] in /Users/ankit/dev/msbuild/src/XMakeBuildEngine/BackEnd/Components/Communications/NodeManager.cs:117   at Microsoft.Build.Execution.BuildManager.PerformSchedulingActions (System.Collections.Generic.IEnumerable1[T] responses) [0x000c3] in /Users/ankit/dev/msbuild/src/XMakeBuildEngine/BackEnd/BuildManager/BuildManager.cs:1523
at Microsoft.Build.Execution.BuildManager.HandleNewRequest (System.Int32 node, Microsoft.Build.BackEnd.BuildRequestBlocker blocker) [0x0009f] in /Users/ankit/dev/msbuild/src/XMakeBuildEngine/BackEnd/BuildManager/BuildManager.cs:1345
at Microsoft.Build.Execution.BuildManager.IssueRequestToScheduler (Microsoft.Build.Execution.BuildSubmission submission, System.Boolean allowMainThreadBuild, Microsoft.Build.BackEnd.BuildRequestBlocker blocker) [0x00069] in /Users/ankit/dev/msbuild/src/XMakeBuildEngine/BackEnd/BuildManager/BuildManager.cs:1119`
This test is being run with Environment.SetEnvironmentVariable("MSBUILDNOINPROCNODE", "1") for a out of proc build.

This is essentially a duplicate of #3588

authors: radical rainersigwald

repo: microsoft/msbuild


text:
[Perf]Can NVIDIA and AMD communicate?

Hello，
I have a problem，I have an NVIDIA GPU and an AMD GPU.Can these two GPUs communicate with each other by using MSCCL++?
Or rather, MSCCL++is only applicable for mutual communication on the same platform.
Thanks.

We haven't tried, but it would work if you go through IB or Ethernet connections. IPC connections will likely not going to work.

source: gharchive/issue

repo: microsoft/mscclpp

license: MIT

license_type: permissive

license_source: github-api


text:
[QUESTION] SQLServerBulk Copy: Unable to retrieve column metadata.

Question
I am trying to benefit from SQLServerBulkCopy to insert millions of rows in the database efficiently.
I am using Spring Boot + Spring JDBC to write the queries.
spring.datasource.url=jdbc:sqlserver://localhost:1433;database=test;encrypt=true;trustServerCertificate=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;useBulkCopyForBatchInsert=true;

Driver version: 12.8.0.jre11
The issue happens on two tables that I have. One uses Identity column and one sets the ID explicitly.
2024-08-05T16:56:52.992+02:00 DEBUG 5064 --- [app] [         task-2] c.m.s.jdbc.internals.SQLServerException  : *** SQLException: com.microsoft.sqlserver.jdbc.SQLServerException: Unable to retrieve column metadata. Unable to retrieve column metadata.

2024-08-05T16:56:52.993+02:00 DEBUG 5064 --- [app] [         task-2] c.m.s.jdbc.internals.SQLServerException  : com.microsoft.sqlserver.jdbc.SQLServerBulkCopy.getSourceMetadata(SQLServerBulkCopy.java:1870)com.microsoft.sqlserver.jdbc.SQLServerBulkCopy.writeToServer(SQLServerBulkCopy.java:1677)com.microsoft.sqlserver.jdbc.SQLServerBulkCopy.writeToServer(SQLServerBulkCopy.java:641)com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeBatch(SQLServerPreparedStatement.java:2389)com.zaxxer.hikari.pool.ProxyStatement.executeBatch(ProxyStatement.java:127)com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeBatch(HikariProxyPreparedStatement.java)org.springframework.jdbc.core.JdbcTemplate.lambda$batchUpdate$4(JdbcTemplate.java:1117)org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:658)org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:701)org.springframework.jdbc.core.JdbcTemplate.batchUpdate(JdbcTemplate.java:1101)com.exampe.repository.TestRepository.saveAllDataInBatch(TestRepository.java:82)java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)java.base/java.lang.reflect.Method.invoke(Method.java:580)org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:354)org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:392)org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:768)org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:720)

Before this I see the query being executed:
2024-08-05T16:56:52.990+02:00 DEBUG 5064 --- [app] [         task-2] c.m.s.jdbc.internals.SQLServerStatement  : SQLServerStatement:59 Executing (not server cursor) select collation_name, is_computed, encryption_type from sys.columns where object_id=OBJECT_ID('DBO.MY_TABLE_NAME') order by column_id ASC

In fact the result of this is: all values NULL and is_computed false.
The columns in this table are:
ID bigint
DataFileID bigint
All others int.
    @Transactional
    public void saveAllDataInBatch(List<Data> dataList) {
        jdbcTemplate.batchUpdate("INSERT INTO DBO.MY_TABLE(id, data_file_id, weight, weight1, weight2, weight3, weight4) VALUES(?,?,?,?,?,?,?)", dataList, 100, (ps, data) -> {
            ps.setLong(1, data.getId());
            ps.setLong(2, data.getDataFileId());
            ps.setInt(3, data.getWeight());
            ps.setInt(4, data.getWeight1());
            ps.setInt(5, data.getWeight2());
            ps.setInt(6, data.getWeight3())
            ps.setInt(7, data.getWeight4());
        });
    }

I am not sure what is wrong since all limitations mentioned in the documentation are not happening.
Can someone guide me how to fix this?

hi @orgesballa
We are not aware of any issues with bulkcopy we have tests for bulkcopy here  please take a look see what you are doing differently? If you are still having issues, please provide a schema and a standalone java repro for the issue so we can take a look.
Thanks

Hi @orgesballa,
Are you still having issues with bulkcopy? If so, please provide a repro as mentioned above, if not, we will move forward with closing this issue.

@Jeffery-Wasty
Hi sorry for the late reply.
https://github.com/orgesballa/sql-bulk-copy-example
In this exmaple, I tried to use the same way as in my real project. I used liquibase, kept the table the same with one FK and 5 INT columns.
The same error happened again, unable to retrieve column metadata.
If I remove the useBulkCopyForBatchInsert, the batch works as normally.

hi @orgesballa
Thanks for the repro we will take a look and get back to you.

Just an update @orgesballa. We have gotten the provided repro working and are trying to understand the reported issue.

Hi, thanks for the update.

The Spring framework is abstracting the problem making it difficult to determine exactly what is the issue. Is there any way you could replicate the issue calling the driver directly?

@barryw-mssql Sorry, haven't had the time. will try to provide an example today

Interesting observation orgesballa. As the tables are created via SQL using the same MSSQL driver, ideally there should be no difference between how liquibase and manual SQL creates a table. Your observation that removing liquibase as the table creator indicates that it is doing something different. If you want to explore the differences between liquibase and manual table creation further, I suggest that you enable the JDBC driver logging (https://learn.microsoft.com/en-us/sql/connect/jdbc/tracing-driver-operation?view=sql-server-ver16) and inspect the SQL generated by liquibase.
Since you now have things working we will be closing this issue. Please feel free to reopen the issue if further assistance is required.
Thx,
Barry

authors: Jeffery-Wasty barryw-mssql lilgreenbird orgesballa

repo: microsoft/mssql-jdbc


text:
Introduction of Sync-NAVApp -Mode BaseAppUpgrade?

While converting our C/AL solution to Customized BaseApp solution using Freddy's article C/AL to AL code customizations after the new Customized Base App has been published with Publish-NewApplicationToNavContainer all data is lost. This is due to usage of -useCleandatabase flag which removes al C/AL objects (including tables with data) before publishing new Customized Base App.
Is there a milestone planned where a new command Sync-NAVApp -Mode BaseAppUpgrade is introduced so that the syncing of the old C/AL tables to new AL tables is done during publishing new Customized Base App?
Sync-NAVApp -Mode BaseAppUpgrade -> Support for performant data upgrade from C/AL tables to AL tables
Thanks,
Zoran M.

Yes, we will look into this within the next ~week.

It was implemented in a different way.
https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/upgrade/upgrade-technical-upgrade-v14-v15

@freddydk
I ended up here, since there's only limited information on the 'Sync-NAVApp -Mode BaseAppUpgrade' feature (besides https://www.yammer.com/dynamicsnavdev/#/Threads/show?threadId=293479454646272). It seems not included in Dynamics 365 Business Central 2019 Release Wave 2.W1.36649 DVD. (not using Docker)
I've tested the following scenario : BC 14 database with one custom table 'MyTable1'
Running through the standard upgrade scripts (https://docs.microsoft.com/nl-be/dynamics365/business-central/dev-itpro/upgrade/upgrade-unmodified-application), the database is converted smoothly via Sync-NAVApp, and upon installing the new BC 15 extension with the 'MyTable1' object, the table is renamed on SQL (suffixed with the AppId) and data is retained. Cool!
Second scenario : BC 14 database with one custom table 'MyTable1'. For the new BC 15 extension, we need to adopt the new prefix naming and will rename the table object to 'XXX MyTable 1' (keeping the same object ID however)
Running through the standard upgrade scripts (https://docs.microsoft.com/nl-be/dynamics365/business-central/dev-itpro/upgrade/upgrade-unmodified-application), the database conversion fails on the Sync-NAVApp step

Unsupported table change. Table:MyTable; Change:Remove

Some questions:

Is the only solution to fix the above to rename the objects in C/AL (BC 14) first before doing the database upgrade ? Or can we expect some tooling that will support the same as in scenario id, not only using the same Object Name, but also respecting the same object id while renaming the SQL tables (suffixing with the AppId and prefixing with the App prefix (or suffix)?
Is -Mode BaseAppUpgrade no longer needed?
What is -PrepareCalToAlUpgrade on the Sync-NAVTenant

I don't know much about upgrade.
I know that the baseappupgrade is not implemented and not needed.
Have never heard about preparecaltoalupgrade
and on the other, I do have a session at Tech Days in a few weeks with Nikola Kukrika, where I expect a lot of these questions to be answered.
Yammer is a better place to answer these questions than here - this is only for docker related issues.
thanks

authors: freddydk fvet plagijat

repo: microsoft/navcontainerhelper


text:
Visual Studio Code Error

Visual Studio Code is giving us the following error message,
“Error: An error occurred while sending the request.
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
The remote certificate is invalid according to the validation procedure.”
This coincided with our encryption expiring. Since then we have successfully re-encrypted but are still getting the error.
The launch.json (part of it) it's using is this:
"name": "Your own server",
"server": "https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbc15exttester.eastus2.cloudapp.azure.com&data=02%7C01%7Crweigel%40microsoft.com%7C22ec9f7c4780422aad9508d7abe3dacb%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637166867878551616&sdata=lEpCn7T%2BpwHzccuckOApuQNfgWWwu4Xti3iuuvvsQfY%3D&reserved=0",
"serverInstance": "BC",
"authentication": "UserPassword",

That is definitely not the right server url.
It looks like you have rightclicked a link in outlook and selected copy link.
looking at the url - it probably should be https://bc15exttester.eastus2.cloudapp.azure.com

Yes that must be what I did, https://bc15exttester.eastus2.cloudapp.azure.com is the url being used. Error is still occurring.

and where did you get the url from?
How did you create it?
Are you sure that it is correct?
there doesn´t seem to be a server on that url?

We got that url from the landing page that pops up when logging into the vm.

So created through aka.ms/getbc - with letsencrypt, right?
I cannot connect to the URL?
Do you get the same error now?
what is the full launch.json?

Pls guys, could you help me fix this issue?

aka.ms/getbcext - image tag used: mcr.microsoft.com/businesscentral/sandbox:us
We are still getting the same error, full launch.json is attached

When you are saying you are still getting the same error - are you really getting this???
“Error: An error occurred while sending the request.
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
The remote certificate is invalid according to the validation procedure.”

Yes, attached is a screenshot.

Was this machine created today - or is this the same machine you had earlier, where you renewed the certificate?
If this is the old machine, something apparently went wrong during cert. renewal.
You can connect to the VM, start ISE and run Replace-NavServerContainer - or (if that doesn't work) you can remove the VM and recreate it.

This is an old machine that we needed to do a cert renewal for. I will try those options. thanks.

Thanks @freddydk running the replace-navservercontainer fixed this issue!

authors: Telapantela freddydk syssolmarketing


text:
Import Error of kubernetes in legacy_user_migrate.py

summary of the issue
Import Error of kubernetes in src/rest-server/deploy/legacy_user_migrate.py
Brief what process you are following:
Update v0.15.0 to v0.17.0 and runing command python paictl.py service start
There is no import error in v0.15.0 before.
Error log:

2020-03-19 13:07:15,692 [INFO] - deployment.paiLibrary.paiService.service_template_generate : The template file of service rest-server is generated.
2020-03-19 13:07:15,692 [INFO] - deployment.paiLibrary.paiService.service_management_start : Begin to start service: [ rest-server ]
2020-03-19 13:07:15,692 [INFO] - deployment.paiLibrary.paiService.service_management_start : Begin to execute service rest-server's start script.
configmap/group-configuration configured
configmap/job-exit-spec-configuration configured
Traceback (most recent call last):
File "legacy_user_migrate.py", line 10, in
from kubernetes import client, config
ImportError: No module named 'kubernetes'
2020-03-19 13:07:16,572 [ERROR] - deployment.paiLibrary.common.linux_shell : Failed to execute the start script of service rest-server
2020-03-19 13:07:16,573 [ERROR] - deployment.paiLibrary.paiService.service_management_start : Failed to start service rest-server
2020-03-19 13:07:16,573 [INFO] - deployment.paiLibrary.paiService.service_management_start : -----------------------------------------------------------
2020-03-19 13:07:16,574 [ERROR] - deployment.paiLibrary.paiService.service_management_start : Have retried 5 times, but service rest-server doesn't start. Please check it.

pip install kubernetes not works.
How to reproduce it:
OpenPAI Environment:

OpenPAI version: v0.17.0
OS: Ubuntu 16.04.6 LTS
Kernel: Linux ubuntu 4.4.0-142-generic
Hardware:
machine-sku: GENERIC:   mem: 250   gpu:     type: 2080ti     count: 8   cpu:     vcore: 64   os: ubuntu16.04

pls try pip3 install kubernetes

Thanks! @abuccts
pip3 install kubernetes and then python paictl.py service start solve my problem

authors: abuccts shuangjiexu

repo: microsoft/pai


text:
fix dropdown UI in job transfer

Fix a bug when the window is too narrow.
Before fix:

After fix:

Coverage remained the same at 34.095% when pulling ac106000b1b4642a37258f6a22fc64d5cf458718 on zhiyuhe/fix_dropdown into ffb12463fb0c5e7c1dd8613056f7f8a751c258d4 on master.

source: gharchive/pull-request


text:
Get request status code is returning 403 instead of 200

Context:
Playwright Version: 1.23.0
Operating System: Mac OS 12.4
Browser: Chrome 103.0.5060.114
Code Snippet
import com.microsoft.playwright.APIRequest;
import com.microsoft.playwright.APIRequestContext;
import com.microsoft.playwright.Playwright;

import java.util.HashMap;
import java.util.Map;

public class TestResponse {

  public static void main(String[] args) {
    try (Playwright playwright = Playwright.create()) {
      final String URL = "https://support.metronetbusiness.com/hc/en-us";
      Map<String,String> headers = new HashMap<>();
      headers.put("User-Agent", "PostmanRuntime/7.29.0");
      APIRequestContext apiRequestContext = playwright.request().newContext(new APIRequest.NewContextOptions().setExtraHTTPHeaders(headers));
      var response = apiRequestContext.get(URL);
      System.out.println("status code-"+response.status());
    }
  }
}

In Postman I am able to get the response status as 200 but in Playwright I am getting the status code as 403

Not sure If the User-Agent header as "PostmanRuntime/7.29.0" is working or if there is any other issue in Playwright?
Note: With the Restassued jar file I was able to get the status code as 200 by setting the header with "User-Agent" as "PostmanRuntime/7.29.0"

Looks like you don't pass the cookie or some other required token (in postman you have Cookie and `Postman-Token but I don't see them in your snippet).
You can  either use tracing to see what headers playwright sends to the server or run it with DEBUG=pw:api. That should give you an idea what headers are missing. If that doesn't help feel free to open a new issue and reference this one.

repo: microsoft/playwright-java


text:
Add-PowerBIWorkspaceUser doesn't accept 'Viewer' for -AccessRight

When trying to add a user to a Workspace with the Add-PowerBIWorkspaceUser cmdlet, you are unable to assign the 'Viewer' role via the -AccessRight parameter.
Add-PowerBIWorkspaceUser -Workspace (Get-PowerBIWorkspace -Name SomeWorkspace) -UserPrincipalName 'some.user@contoso.com' -AccessRight Viewer

Instead of this working, the following error is returned:
Add-PowerBIWorkspaceUser : Cannot bind parameter 'AccessRight'. Cannot convert value "Viewer" to type "Microsoft.PowerBI.Common.Api.Workspaces.WorkspaceUserAccessRight".
Error: "Unable to match the identifier name Viewer to a valid enumerator name. Specify one of the following enumerator names and try again:
Member, Admin, Contributor"
At line:1 char:146

I do confirm, I'm getting the same error! Seems the value"Viewer" is not listed at the AccessRight enumertor.

It should be added to src/Common/Common.Api/Workspaces/WorkspaceUserAccessRight.cs I assume.

Unfortunately, this is still not supported in the PowerBI powershell cmdlets nor in the REST Api.

Would be great if this can be added soon :)

This is an important fix for any DevOps CICD process

Any timeline for this?

This seems like such a simple issue to fix. Any update?

I concur!!! I had to go in and click 300 times today when sharing a report to "depermission" folks 😜
Invoke-PowerBIRestMethod -Url 'groups/some-long-hash/users' -Method POST -Body (@{identifier='someEmail@whatever.com'; groupUserAccessRight='Viewer'; principalType='User'} | ConvertTo-Json -Depth 2 -Compress)  <-- No dice

It's one year later but still no support. This seems to be an easy fix.

Is this now supported? It would be nice to get this done!

@inthemedium @kenakamu @CodeCyclone @CattieCat can you please give us a feedback?
It is almost 2 years now!
Where is the roadblock here?

Change already made in https://github.com/microsoft/powerbi-powershell/commit/036b3561d3b37b45934d092b817ecc0745cbbae9#diff-900436a0aad5c72640ff60fcc243fed6af7eac2ae0ecafc9ba1e07141b0c616a

authors: 681113366 CattieCat DNOW-BrentPearce DaveRuijter Embedded82 SQLvariant alexmahrou asyncoder mrvdsah nrablin q0-0n

repo: microsoft/powerbi-powershell


text:
Where is document?

The readme is wrong, the sample is wrong, the test is wrong, there is no macro PRO_DEF_MEM_DISPATCH. How to use this library?
And no pro::facade_builder as well.

The code on the main branch is not release yet. If you are consuming a specific version of proxy, please refer to the README.md of that specific version. For 2.4.0, the documentation can be found here: https://github.com/microsoft/proxy/blob/2.4.0/README.md

By the way, how to make a proxy like this:
interface Messager {
    template<typename T>
    void send(T data);
    template<typename T>
    T receive();
}
Messager m;
m.send("text");
m.send(3);
int r = m.receive();

I means a proxy support template method.

Due to technical limitations, proxy does not support template conventions. It is required to specify the signatures of each convention to create a facade.

authors: mingxwa vipcxj

repo: microsoft/proxy


text:
When going back from project view carousel can no longer reach "New Project" on small screens

Describe the bug
The smallest screen I've been able to replicate this on is a browser window that is 1464 pixels in width.
When returning from project view it is impossible to drag or click your way back to the beginning of the carousel to make a new project. I was able to reproduce this on Microbit, in beta Arcade, and my local Arcade build on master.
To Reproduce
Steps to reproduce the behavior:

Make your browser window at most 1464 pixels in width
Go to https://arcade.makecode.com/ or any other MakeCode editor
Scroll to 'Project View' and open it
Click 'Go back'
Try to return to the beginning of the carousel

Expected behavior
Upon returning from project view you should be able to drag and click your way to the beginning of the carousel.
Screenshots
Note my browser size

Desktop (please complete the following information):

OS: OSX
Browser: Chrome

Should be fixed now.

authors: JacobBovee abchatra

repo: microsoft/pxt-arcade


text:
Script Manager - ability to rename projects

I thought we had this feature in the Script Manager before?
But I don't see it.  If it's not there, we should definitely add it - that's one of the biggest scenarios for people to rename their Untitled projects.

How would they know what to rename it to if they cannot preview the code?

Not planned.

authors: Jaqster abchatra pelikhan

repo: microsoft/pxt


text:
Docs 2.0: print icon (other icons) [if easy]

The page already uses the custom font from pxt. Best to add them there and use them as usual. Don't link to .svg as it was done in the PR.

authors: darzu pelikhan


text:
Broken relative imports inserted with multiple module paths

Hi - I have run into some frustrating behaviour with relative import suggestions. I hope this issue can be helpful.
When using a project that has multiple separate module hierarchies, it is impossible to configure the automatic imports in a way that is satisfactory.
The behaviour we want is that imports from the local module are imported relatively, and imports across modules are imported absolutely.
As far as I can tell, there is no way to get this behaviour, no matter what I set in python.analysis.include, python.analysis.exclude and python.analysis.extraPaths.
I should be able to specify which directories are expected on the python path at runtime, but this does not seem possible.
Environment data

Pylance version: v2024.9.2
OS and version: Fedora Linux 40 Workstation
Python version: Python 3.12.6 (system provided)

Code Snippet

A minimal example can be found here: https://github.com/maxeonyx/pyimport-issue-minimal
To run the project, use:
PYTHONPATH=appsrc:depsrc python -m appmodule

Repro Steps

Clone the following repo: https://github.com/maxeonyx/pyimport-issue-minimal

Comment out your VSCode user settings so that they don't interfere with the workspace settings in this project.

Open the repo in VSCode.

Open appsrc/appmodule/__main__.py. Take the suggested action. The created import is not correct

Expected behavior
Relative mode
The following imports should be inserted in relative import mode:
from . import do_thing
from sharedmodule.patterns import retry

Absolute mode
The following imports should be inserted in absolute import mode:
from appmodule import do_thing
from sharedmodule.patterns import retry

Actual behavior
The following imports are what are actually inserted:
Relative mode:
from . import do_thing
from ...depsrc.sharedmodule.patterns import retry

The ...depsrc.sharedmodule.patterns import is NOT correct as per my python.analysis.* settings.
Absolute mode
This works correctly:
from appmodule import do_thing
from sharedmodule.patterns import retry

Note
Note that ...depsrc is NOT expected to be on the python path at runtime. I have set python.analysis.autoSearchPaths to false so the workspace root should not be one of the search paths.
If we have the from ...depsrc.sharedmodule.patterns import retry version, when we run with the following command, we will get ImportError: attempted relative import beyond top-level package.
PYTHONPATH=appsrc:depsrc python -m appmodule

Thanks for the issue. This would be an enhancement request, being able to specify which paths should be absolute and which are relative. Probably requiring a new setting.

Transferring to a discussion item or up votes.

authors: maxeonyx rchiodo

repo: microsoft/pylance-release


text:
Inconsistent highlighting

Does this issue occur when all extensions are disabled?: Yes/No

VS Code Version: 1.95.1
OS Version: Windows 11

Steps to Reproduce:
In the code below, the argv in sys.argv isn't highlighted in the first function. This seems to be because vscode infers that the condition (if args is None) should never be true, due to the previous line. I'm not sure if this is intended behaviour though, because in the second function, sys.argv is highlighted, despite it being more obvious that the condition should never be true.

import sys
from typing import Optional
from copy import copy

def first(args: Optional[list[str]]) -> None:
    args = copy(sys.argv)
    print(sys.argv if args is None else args)

def second(args: Optional[list[str]]) -> None:
    print(sys.argv if sys.argv is None else args)

I can reproduce this issue using pylance 2024.11.100

authors: KacieKK johndoknjas


text:
About the setting of trunc_days

In the document, the function of the parameter trunc_days is to avoid future information leakage:
"The trading days to be truncated the data in this segment may need ‘days’ data days are based on the test_start. For example, if the label contains the information of 2 days in the near future, the prediction horizon 1 day. (e.g. the prediction target is Ref($close, -2)/Ref($close, -1) - 1) the days should be 2 + 1 == 3 days."
I know what it means, but I still confused about why such process is necessary? If we don't truncate the days, when the segment is {"train": 2008/1/3-2008/1/29, "test":2008/1/30-2008/3/4}, why the information leakage happens?

Could someone explain it in detail? Thank you!

repo: microsoft/qlib


text:
Vision Data Analysis / Data Balance E2E Tests

Added Data Analysis / Data Balance tests for the vision dashboard.
Description

Checklist

[ ] I have added screenshots above for all UI changes.
[x] I have added e2e tests for all UI changes.
[ ] Documentation was updated if it was needed.

Why did you close it? @Advitya17

repo: microsoft/responsible-ai-toolbox


text:
fix: move PR template to default location

.github/PULL_REQUEST_TEMPLATE/*.md is supported to host multiple pull request templates, but they must be explicitly selected via a URL Query Parameter .
This moves the template in to the default location so that it will be applied to all PRs.

it's still wrong 😭

repo: microsoft/retina


text:
Implement Round-Robin Load Balancing

Load balance by taking the "next" backend in the list for each incoming request. We wrap around to the start of the list when we run out of backends.
Since requests will likely be highly-concurrent, there's some complexity here in how the state is maintained. Also, since backends can change, we'll need to consider how this algorithm behaves in that case. Naively, this would be a simple atomic counter that the load balancer does an atomic increment-and-return, then modulus by the number of backends to figure out which backend to use.

The challenge in the current object model is finding somewhere to store this per-backend state. Health checks also throw this off since they keep churning the list of available backends.

I have started writing an implementation for this.

I talked to @anurse about the design, and what we came up with was different from what I was originally thinking. I was originally thinking of having a cache based on a signature for the collection of endpoints storing the counter for a mod operation.
I we think that the round robin should be unique to each cluster of back end endpoints, then it should be stored as part of the Backend.
Implementation wise, would it make sense to have a feature collection on the back end, similar to HttpContext, and proxy code can then stash/fetch into that as needed.
Do we also want to have a dictionary so that config can specify parameters for routes and backends, that are later picked up by custom modules?

Yes there will be to be some way to track state in the backend, and that will need to be thread safe.

Should this just be a counter property on BackEndInfo, or should we have a dictionry? Do we have a thread-safe dictionary?

ConcurrentDictionary might work, we'll see if we need to go that far. We'll also need to account for the fact that the Backend objects are torn down and rebuilt if there's a config change so any state you add to them is ephemeral. That might be OK to reset RoundRobin on a config change, they're not that common.
There's a type in this repo called AtomicCounter that would be useful for tracking a simple incrementing value. If we're not overly concerned about the endpoints list being unstable then the counter might be all we need.
All of this being said, RoundRobin isn't much better than Random, I'm not sure it's worth adding.

ConcurrentDictionary might work, we'll see if we need to go that far. We'll also need to account for the fact that the Backend objects are torn down and rebuilt if there's a config change so any state you add to them is ephemeral. That might be OK to reset RoundRobin on a config change, they're not that common.

I don’t think a dictionary will be needed, just an atomic counter associated with the backend. I also think it’s totally reasonable to  reset round-robin state when a backend is reloaded. It should be preserved when other config reload if possible though.

There's a type in this repo called AtomicCounter that would be useful for tracking a simple incrementing value. If we're not overly concerned about the endpoints list being unstable then the counter might be all we need.

Sounds perfect

All of this being said, RoundRobin isn't much better than Random, I'm not sure it's worth adding.

Think of it more as a price-of-admission feature. We can debate the value of it but given its broad support across the rest of the proxy landscape I doubt its reasonable to skip it.

Think of it more as a price-of-admission feature. We can debate the value of it but given its broad support across the rest of the proxy landscape I doubt its reasonable to skip it.

I can't remember where I heard it, but one of the things cloud customers expect is that when they pay for 5 VM's and put a load balancer in front of them, is that all 5 will have about equal loads.

I don’t think a dictionary will be needed, just an atomic counter associated with the backend. I also think it’s totally reasonable to reset round-robin state when a backend is reloaded. It should be preserved when other config reload if possible though.

The design question is do we add this specific property to the backend configuration, or do we add "feature" support to the backend as a dictionary. If we did the latter, then could the dictionary be maintained across reloads - if the name of the backend matches then it should be retained. To notify the features, the types could implement a INotifyConfigChange interface that if implemented would be called.
The reason that I am pushing this direction is that it feels like it would enable more extensibility scenarios - which should forever be in the back of our minds.

I can't remember where I heard it, but one of the things cloud customers expect is that when they pay for 5 VM's and put a load balancer in front of them, is that all 5 will have about equal loads.

This is definitely a use case for round robin I've heard. We can debate it's reasonability, but people do have a desire to balance the load, even if no backends are actually overloaded.

The design question is do we add this specific property to the backend configuration, or do we add "feature" support to the backend as a dictionary.

Yep, agreed. One wrinkle is that IFeatureCollection used in ASP.NET Core is not thread-safe (I believe..?). Even if it were safe to use concurrently, it doesn't really have the kinds of collection primitives we'd need (GetOrAdd, etc.)

https://github.com/microsoft/reverse-proxy/issues/87

authors: Tratcher anurse samsp-msft

repo: microsoft/reverse-proxy


text:
Fix #109: bootstrap vuln.

Upgrade bootstrap from 4.1.3 to 4.3.1.

Merged and published. Feel free to comment pst hoc.

repo: microsoft/sarif-website


text:
.Net: Implementing cosine similarity in duckdb engine

Motivation and Context

This pr moves cosine similarity calculation into duckDb engine to improve performance and memory usage.
Description
Moving cosine similarity calculation on the server there is no need to marshal out more data than the one scoring enough and meeting the result limit.

Contribution Checklist

[x] The code builds clean without any errors or warnings
[x] The PR follows the SK Contribution Guidelines and the pre-submission formatting script raises no violations
[x] All unit tests pass, and I have added new tests where possible
[x] I didn't break anyone :smile:

@colombod Thank you for contribution, having similarity calculation on server side is a huge improvement.
Idea for future improvements - currently we save all collections and records in one table. I'm wondering if it will be possible to create new table per collection. From DB architecture and data isolation perspective, I think this is the right approach, but would be great to know your opinion on this.

Very good point. I kept it this way because, with polyglot notebook, it is possible to send commands to the duckDB and manage persistency and loading from parquet files. From my understanding they deal with a single table.

repo: microsoft/semantic-kernel


text:
Reload System Variable when opening a new TAB instead of reload the entire application

Description of the new feature/enhancement
When installing something, for eg using winget, that changes the system path.
Windows terminal must be reloaded.
Instead would be more interesting, if it was enough to open a new tab for that.

Proposed technical implementation details (optional)
I guess when opening a new tab, is loading the user environmental settings and merge with the system settings.
The system settings are only loaded when windows terminal is opened the first time and "cached".
It might be interesting to have a way to reload them in a new tab.
It could be possible, i think, because at least once are read. So if those are changed should be possible to re-fresh them.
Ignoring for now the split screen.

if i am installing with winget github cli for instance.
that package add an environment system path to the gh.exe
that forces to close windows terminal and re open it again to apply that changes.
That is not a "big issue" but is just annoying.
Having something that could refresh the system variables and make them available to the next shell to open (just considering a new tab at the moment, but it could be in a split screen too), it would increase the productivity.
NOTE:
I am not sure neither honestly if it is related to the windows terminal or the shell in use or winget itself that should trigger something as a post install.
MY best guess is that is related to windows terminal as those system environmental variable looks like are loaded when loading the first time the app and then ignored after that, independently of the guest shell in use.

If I've understood you correctly, there's already an issue open for this. See #1125.

@j4james it looks like it is the same kind of issue, so yes, this can be a duplicate of it.
thanks.

/dup #1125
Thanks all!

authors: Raffaello j4james zadjii-msft

repo: microsoft/terminal


text:
When will the initial build released?

README says

The Windows Terminal is in the very early alpha stage, and not ready for the general public quite yet. If you want to jump in early, you can try building it yourself from source. Otherwise, you'll need to wait until Mid-June for an official preview build to drop.

When will we get it? Mid June is here!

Get what? Source code are available

Get what?

We expect the app on App store!

Get what?

"an official preview build"

Yes, I am not a C/C++/C# developer and don't know how to build it. I expect it too.

According FAQ;

Otherwise, you'll need to wait until Mid-June for an official preview build to drop.

Maybe today? :)

根据FAQ;

否则，您需要等到6月中旬才能正式预览构建。

可能是今天？:)

不可能是今天了 ### ****。。。。。。。。。。。。。。。

Since Mid-June is a range of days, I'll implore you to please stay tuned. Thanks for being excited!

authors: AnikHasibul DHowett-MSFT Renha ZzzhaoGZ egigoka jliu666 lhutyra


text:
Startup lag when using a preset to open multiple terminal tabs/panes

Windows Terminal version
1.13.11431.0
Windows build number
10.0.19044.1706
Other Software
kubectl v1.18.5
WSL (version 2) running Ubuntu (kernel version: 4.19.128)
Steps to reproduce

Setup config file so that WT starts with 2 tabs:

first tab contains 5 panes with powershell (1 big on left, 4 vertically small on right)
second tab contains 5 panes with bash  (1 big on left, 4 vertically small on right)
top right pane of powershell runs a kubectl proxy on startup

Open WT

Expected Behavior
It used to open the terminal in less than a second WT to open and for the tabs to be visible, with maybe only the individual panes not being responsive yet until half a second later.
Actual Behavior
Nowadays it takes 3-4 seconds before even the first pane is visible. The pane area is see-through and the top bar is black, rather than white and without any of the tabs showing until after the 3-4 seconds (see image)

What it looks like after it is done loading:

Sounds a lot like #13105 to me

Yup. This seems to be a duplicate of #13105. They used different keywords, so my search for similar issues didn't find it. Closing this one


text:
Alt-clicking a profile doesn't open in a pane when Narrator is turned on

Windows Terminal version
1.13.10336.0
Windows build number
10.0.19044.1706
Other Software
Windows Narrator
Steps to reproduce

Open any shell in Windows Terminal.
Open the profile menu and click on an entry while pressing the Alt key.
Note that the profile is opened in a pane of the current window. Close that pane.
Now turn on the Windows Narrator screen reader.
Open the profile menu again and click on an entry while pressing the Alt key.
Note that the profile is now opened in a separate tab.

Expected Behavior
Alt-clicking on a profile should always open it in a pane of the current window.
Actual Behavior
When the narrator is turned on, alt-clicking opens the profile in a separate tab.
Btw, if there's some accessibility reason for this, that's fine. I was just testing something with the narrator and was surprised by the behavior, but it's not something that affects me personally.

WOW. Yea that's wild. Why doesn't that work?
Thanks for finding this one!

I did some logging of the alt state being tested here:
https://github.com/microsoft/terminal/blob/24a53d4968f8a1c5648cbc49a4be2d0bc0b28a72/src/cascadia/TerminalApp/TerminalPage.cpp#L1003-L1006
And it seems that alt key is just not registering as Down when the Narrator is on. Sometimes the state shows as Locked, so I thought maybe we were supposed to be testing for either Locked or Down, but sometimes it's just 0. Maybe this is a bug in winrt?

Issue still repros after #14221 merged.
However, I'd bet that we could fix by leveraging the IDirectKeyListener. Assigning to myself and giving it a try this cycle if I have time. If it doesn't work, back to the 22H2 milestone it goes!

Ok well, played around with this for a bit. Surprised to see that the Alt key doesn't get detected by TerminalPage::OnDirectKeyEvent(). I went as far as to make a class that implements MenuFlyoutItem and IDirectKeyListener and use that for the profiles, but the Alt key isn't hit there either.
So yeah, that's weird. No idea where the Alt key is being picked up. Back to 22H2, I guess.

I thought TerminalPage::OnDirectKeyEvent only got triggered for very specific keypresses involving alt... IIRC it was only for alt key releases, alt+space, and for f7.
I bet it's this:
    bool AppLogic::OnDirectKeyEvent(const uint32_t vkey, const uint8_t scanCode, const bool down)
    {
        if (_root)
        {
            // Manually bubble the OnDirectKeyEvent event up through the focus tree.
            auto xamlRoot{ _root->XamlRoot() };
            auto focusedObject{ Windows::UI::Xaml::Input::FocusManager::GetFocusedElement(xamlRoot) };
            do {...}

A MenuFlyout isn't a child of the XamlRoot, so we'd never bubble through this OnDirectKeyEvent call to a MenuFlyoutItem that did implement it.

I'm inclined to say this is just an issue with the CoreWindow API and Narrator interfering. Both GetKeyEvent and GetAsyncKeyEvent don't seem to reliably return the status of that element.
So is the solution to manually listen for keydown/keyup to know if the key is currently pressed? Do we need to do that for other keys beside alt then? Regarding OnDirectKeyEvent, while it currently only raises for Alt and F7 being released, we could also modify the behavior to raise for alt being pressed.

Hmm I think there isn't really a way for us to sensibly work around this. I tried adding an "Alt key down" check in here but that didn't seem to get triggered if Narrator is open. My guess would be that Narrator is more powerful than us here, after all Narrator has the shortcuts Alt+Left/Alt+Right to move the narration.

Welp, that's surely annoying.... Wait there's gotta be a way, right? Like, tapping alt in Edge still focuses the menu, even with narrator open, so there's gotta be some way of getting alt keypresses.
Unless there's some weird interplay between XAML islands and narrator here, like... the input not even making it to the root HWND. That seems insane though...

Not sure how the alt hotkey works in Edge, but maybe Edge is not listening for Alt Key down but rather Alt Key up to activate?
The issue in our case is that we receive the alt down event after the button was clicked. In what scenario does powertoys handle the alt key?

I was using the page that lets you rebind the Powertoys Run keybinding, but lo and behold, it doesn't work on key down with narrator enabled either. I guess I wasn't paying close enough attention 😅

/2am_thought: if we manually track alt-down/up, that won't work. If Someone alt-tabs away from us, we'll get an alt down, but not an alt up, and permanently think alt was pressed. yikes.

Great...
So are we really left to find a way to get GetKeyState/GetAsynKeyState to work reliably? Or we find another way that does not involve us manually tracking key presses/key lifts for alt key (and possible other keys that might not work) but I can't think of any other API beside the already mentioned ones.

We're reaching out to the Narrator team (internally) for some help on this one. I'm starting to worry this is a Hard problem / entirely unsolvable :(
oh god I had an immensely dumb idea, but we could filter all the win32 mouse events in winMain, look for alt in the modifiers there, and if we get a mouse+click event there, stash a boolean in AppLogic/TerminalPage as a one-time-use "hey was alt held for this louse event".
That would be crazy dumb though. Let's hope narrator has a better idea.

I don't want to sound too pessimistic but how would you look at the alt modifiers inside the message loop? The WM_LBUTTONDOWN event mentions that you should use GetKeyState to check for alt being pressed, similar is also said for the WM_POINTERUP event. And well, if GetKeyState would work correctly, we wouldn't have that problem in the first place.
Really looking forward to what the narrator team is saying.
PS: I'm really amazed how much I learn as part of this issue, thank you @zadjii-msft, @carlos-zamora and @j4james !

psh pessimism is like our main export here on the Terminal 😝 We're all learning a lot about the platform this week, that's for sure

authors: carlos-zamora chingucoding j4james zadjii-msft