text:
V0.2 datacenter first version w/o data processing

Description

Data Center Scenario without data processing

Add PhysicalMachine object
Add VirtualMachine object
Add two main events, REQUIREMENTS and FINISHED with their corresponding handlers
Add decision event using the updated event category (gen_decision_event, add_immediate_event)
Add environment metrics, including energy_consumption, success_requirements, total_latency

Linked issue(s)/Pull request(s)

issue_number

Type of Change

[ ] Non-breaking bug fix
[ ] Breaking bug fix
[x] New feature
[ ] Test
[ ] Doc update
[ ] Docker update

Related Component

[ ] Simulation toolkit
[ ] RL toolkit
[ ] Distributed toolkit

Has Been Tested

OS:

[ ] Windows
[ ] Mac OS
[ ] Linux

Python version:

[ ] 3.6
[ ] 3.7

Key information snapshot(s):

Needs Follow Up Actions

[ ] New release package
[ ] New docker image

Checklist

[ ] Add/update the related comments
[ ] Add/update the related tests
[ ] Add/update the related documentations
[ ] Update the dependent downstream modules usage

Codecov Report

Merging #189 (3ac75f1) into v0.2 (fb26bbf) will decrease coverage by 1.23%.
The diff coverage is 89.47%.

@@            Coverage Diff             @@
##             v0.2     #189      +/-   ##
==========================================
- Coverage   72.65%   71.42%   -1.24%
==========================================
  Files          87       90       +3
  Lines        4074     4206     +132
==========================================
+ Hits         2960     3004      +44
- Misses       1114     1202      +88

Flag
Coverage Δ

unittests
71.42% <89.47%> (-1.24%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

maro/simulator/scenarios/cim/common.py
72.83% <ø> (-3.25%)
:arrow_down:

...o/simulator/scenarios/citi_bike/business_engine.py
75.10% <73.33%> (ø)

maro/simulator/scenarios/cim/business_engine.py
85.82% <92.30%> (+0.05%)
:arrow_up:

maro/event_buffer/event_buffer.py
94.73% <95.00%> (-1.56%)
:arrow_down:

maro/simulator/abs_core.py
78.46% <100.00%> (ø)

maro/simulator/core.py
84.29% <100.00%> (ø)

maro/simulator/scenarios/cim/events.py
100.00% <100.00%> (ø)

...ro/rl/early_stopping/abs_early_stopping_checker.py
22.72% <0.00%> (-48.71%)
:arrow_down:

maro/rl/models/learning_model.py
35.00% <0.00%> (-15.00%)
:arrow_down:

maro/rl/models/fc_net.py

... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb26bbf...3ac75f1. Read the comment docs.

decide what to maintain in the snapshot list and use the decorator to implement it

point 2 still unsolved

authors: Jinyu-W codecov-io kyu-kuanwei

repo: microsoft/maro


text:
Proposal: Support implicitly typed DataTemplate like WPF

Proposal: Support implicitly typed DataTemplate like WPF

Summary
WPF enables specifying DataTemplates to be selected based on the binding type.
This can be implemented as following:
<ItemsControl ItemsSource="{Binding Coll}">
    <ItemsControl.Resources>
        <DataTemplate DataType="{x:Type local:ClassOne}">
            <Rectangle Width="50" Height="50" Fill="Red" />
        </DataTemplate>
        <DataTemplate DataType="{x:Type local:ClassTwo}">
            <Rectangle Width="50" Height="50" Fill="Blue" />
        </DataTemplate>
    </ItemsControl.Resources>
</ItemsControl>

The ItemsControl will automatically resolve the correct DataTemplate according to the matching DataType.
Rationale

Easy and straight forward
Avoids tedious implementations and usage of DataTemplateSelector
This feature exists in WPF

Scope

Capability
Priority

Keying DataTemplates by their type
Must

Additional keying options, perhaps bool, enum, or int
Could

Important Notes

Open Questions

WOW! I can't believe I forgot I opened the very same issue 5 years ago!
Yup same issue indeed, gonna close.

source: gharchive/issue

repo: microsoft/microsoft-ui-xaml

license: MIT

license_type: permissive

license_source: github-api


text:
Proposal: Media Composition done right

Proposal: Media Composition - allow access to all input media clips, when drawing
Summary
Say I want to render some complex media clips to into a video. Right now (at least to my knowledge), I can only do slight modifications to each video (like offseting + opacity, using overlays). However, if I want to do anything more complex, it's impossible.
What we need - on each output frame, to have access to all input videos (different Direct3d surfaces, proably), and then decide myself if/how I'll combine them.
Rationale
At this time, using Media Composition for anything short of trivial is pretty much impossible.
Any decent video editor will have to deal with overlapping input videos. Lets say I'm using Media Composition to create an output video from several input videos.
Say I have 3 input videos (you can make this as large as you want) - and I want to combine them. Basically, I want to transition between them as I wish.
So, I want to specify, when I create the Media Composition, for each input video:

when its starts/ends in the output video - this is possible right now
I want to be able to get access to each output frame - this is also possible, via Video Effects
on each output frame, I want to get all input video frames, so I can decide what/how to draw them. This is not possible right now (at least to my knowledge).

Since I can't get access to each input video frame, when rendering a media composition, I have to load the input videos by different means -> everything I've tried is insanely slow, and I can't preview the output video properly (visually, it looks jerky). Right now, I'm basically pre-caching every input video frame in memory, which is clearly insane.
Scope

Capability
Priority

Make ProcessVideoFrameContext hold an array of input frames
Must

Important notes (Implementation suggestion)
Basically, any implementation that accomplishes the above is fine by me. Here's what I would assume should happen:
The way I see it, if I apply a video effect (IBasicVideoEffect), on each frame, I should be able to access all input frames.
    public void ProcessFrame(ProcessVideoFrameContext context) { ... }

This is the function called on each frame. Therefore, ProcessVideoFrameContext should change to hold an array of input frames. The array of input frames should match the initially added clips. If for a given output frame, a certain input video is missing (either it will start later or it already finished playing), the array of input frames will contain null in its place.
Or, we could have a dictionary, and in this case, we would identify each input MediaClip via an id (string or int, it's all good).

(If you want to do this now with UWP, you can using MediaOverlays which can stack as many MediaClips on top of each other as you want, and through your own implementation of IVideoCompositor you can choose how to blend and show them. It can get a little awkward queing them up as you might need to put a bank clip in the base MediaComposition, but something for you to look at)

@JohnnyWestlake Thanks! Will definitely take a look! So long story short, I would just use MediaOverlays instead of MediaClips, and create a Video compositor.
I'll try this for sure! Will keep you posted as soon as I try it.

In essence yes, but it's not the most intuitive set of API's. The duration of the video is still determined by the contents of MediaClips (you can generate a blank clip from something like MediaClip.FromColor), so you still need something there, even if blank. And you have to deal with creating a WindowsRuntimeComponent and queuing the MediaOverlays correctly which can get awkward.
It's all technically possible underneath, just a little obtuse (but still miles friendlier than it's ever been.) But I'm not going to complain if the Media team decide to work a more elegant solution, as it's certainly not the easiest thing to wrangle.
Whether or not you'll get real time performance out of it will heavily depend on your hardware video decoder I'd imagine when you start stacking multiple overlays on it - theres only so much bandwidth they have realistically, and real-time video manipulation isn't cheap.

@JohnnyWestlake Sounds cool! :D Having said that, I will certainly give it a try.
About using the MediaClip.FromColor trick - already been doing that in another place so I'm aware of that trick :)
About creating a WindowsRuntimeComponent - that was weird - but I've end up making it work somewhere else, so I can do it again.
Queing the MediaOverlays correctly - I don't see that as the main problem. I'm just hoping the video compositor works as advertised.
About the real time performance - that will be the big question - because on top of the videos, I will be applying a lot of effects, so we'll see. As a side note, to make this real-time, I'm using 960 x 540 for preview - this should be decent, but I'll see when I actually modify the code.

authors: JohnnyWestlake jtorjo


text:
Binding an Empty Collection to MenuItemSource of NavigationViewItem still shows a Chevron

Describe the bug

Binding an Empty Collection to the MenuItemSource property of NavigationViewItem still shows a Chevron.
Steps to reproduce the bug

Steps to reproduce the behavior:

Use the model

public class Item
{
    public string Content { get; set; }
    public Collection<Item> Children { get; set; }
}

Using the object
var item = new Item { Content = "Sample", Children = new Collection<Item>() };

And bind as
<winui:NavigationViewItem
    Content="{x:Bind Content}"
    MenuItemsSource="{x:Bind Children, Mode=OneWay}">
</winui:NavigationViewItem>

Expected behavior
Currently, the check is only being made if the MenuItemsSource is null.
https://github.com/microsoft/microsoft-ui-xaml/blob/f41ff56db7bc90c4cf6ce08a3c9dbd024911b03d/dev/NavigationView/NavigationViewItem.cpp#L483
It should treat an empty collection bound to MenuItemsSource as no Children, thus not showing a Chevron.
Screenshots

Version Info

NuGet package version:

[Microsoft.UI.Xaml 2.4.2]

Windows 10 version
Saw the problem?

Insider Build (xxxxx)

May 2020 Update (19041)
Yes

November 2019 Update (18363)

May 2019 Update (18362)

October 2018 Update (17763)

April 2018 Update (17134)

Fall Creators Update (16299)

Creators Update (15063)

Device form factor
Saw the problem?

Desktop
Yes

Xbox

Surface Hub

IoT

Additional context

I don't know if this is by design. And if it is, what could be made to have a workaround this. Thank you

This sounds like a bug to me. There is no point showing the chevron when there are no children and it actually can create confusion instead. If the team confirms this is a bug, would you be willing to provide a fix seeing as you already did some investigations?

@Felix-Dev TBH, I do not have experience coding in C++. So i don't have the confidence to fix this if this happens to be a bug. 😅

I think replacing the line you linked @MarkIvanDev with the following:
    return MenuItems().Size() > 0
        || (MenuItemsSource() != nullptr && m_repeater.get().ItemsSourceView().Count() > 0)
        || HasUnrealizedChildren();

would fix it since the snippet also check if there are items, in the collection, instead of just checking that it is not null.
I think this is everything you would need to do in C++ land here. Would you then like to create a PR if this is indeed a bug (which I certainly think it is)? If not, that's fine too :)

That line above is not enough to fix the issue. We also need to update the chevron visual state when the number of child items changes from 0 to > 0 and vice-versa.
If you don't feel confident enough yet to take on this PR we'll be happy to step in here 😁 That said, it is definitely a fun experience to work on your first PR for WinUI, especially when you are fixing an issue you yourself reported. The team and the community will gladly help you out if you decide to go on this journey and need some help :)

That line above is not enough to fix the issue. We also need to update the chevron visual state when the number of child items changes from 0 to > 0 and vice-versa.

Oh I thought this method was being called when the number of items changes, but it seems that we don't listen to that at all. Yes  in that case we more logic for this.

Yes you would need to hook into the collection changed event. You can do this by listening to the ItemsRepeaters ItemsSourceView CollectionChanged. An example where we do this is here:
https://github.com/microsoft/microsoft-ui-xaml/blob/c5fa8a6b45efe820b80aa994751801df553117f7/dev/Repeater/ItemsRepeater.cpp#L525
That way, you only have to register/unregister and don't have to think about whether the collection is actually INotifyCollectionChanged or not. If it is not, nothing happens, if it is, you will get notified if the collection changes.

@MarkIvanDev

But as @chingucoding said, this may need a lot more code to fix.

The code needed to add here should just be a few lines. You might need to write a test as well to cover this case but those can be written in C# :)

This is not by design. It looks like a bug for sure.

Sorry if the pull request is taking a long time. I had some problems with setting my environment again as when I was finished making the changes, the build broke and there are errors everywhere. 😅

Thank you @Felix-Dev and @chingucoding for helping me through my first pull request.

authors: Felix-Dev MarkIvanDev chingucoding ranjeshj


text:
Question: How to change display name on the desktop app from 'WinUI Desktop' to the actual display name or something else?

I am using Win UI 3 Desktop template and I always see display name as 'WinUI Desktop' irrespective of what I have in manifest file.
Can any one suggest a way or workaround?

You need to set the Title property of your Window class. The title doesn't depend on any part of the app package under Win32

I think @WamWooWam is correct, however this is not exposed to markup and needs to be set from codebehind.

@StephenLPeters should this be exposed in XAML? If packaged apps have a manifest and the original title from folks coming from UWP was there should it look there? Or will UWP folks have to change their code to adapt here, is that expected?

uhm, I'm not sure, @MikeHillberg @Austin-Lamb and @marb2000 thoughts?

@WamWooWam : Thank you, it worked and will work as a work around. But I feel it should be set for packaged apps based on manifest file.

Great point @abhi-msft, the manifest for a packaged app should be the source of truth for icons and stuff too. It'd be good to know how this is supposed to work in both environments.

Another good point. @Austin-Lamb @marb2000

@abhi-msft I found that for many reasons it was easier for me to just completely remove the Win32 titlebar and border and add my own custom implementation in XAML.  It's much easier to control all of the content, but turned out to be most important when it came to handling DPI changed events.  There is a potential issue that I have not reported yet, but it has been on my TODO to consider reporting it.
Let's say that you want to provide a Window implementation that emulates WPF's SizeToContent feature.  With this feature, it provides the client area with the exact space it needs to render and no more.  This is a critically important feature when you want to show Window's that are borderless and have a transparent background.  If however, you leave the win32 non-client area intact (TitleBar) and a DPI change occurs, a DPI aware application will automatically scale the titlebar area.  When that area is scaled it either takes away from, or adds more space to, the client's area.  If you SizeToContent its obvious because the content will either not have enough space to render or there will be slightly too much because the Win32 TitleBar either steals space from it or adds back to it.
That's not the problem though.  The problem occurs when I reacted to the DPI changed event by scaling down or up the size of the Window to assure the space was just right.  Now, if you try to drag a Window from one DPI to another (let's say one monitor is scaled at 150% and the other normal), if done "just right" this will cause an infinite recursion of DPI Changed events.  I think the resizing of the Window during the DPI Changed event can cause it to resize such that the majority of the Window ends up back on the DPI that it was on before the event fired.  Then the event fires again, the code reacts by resizing the Window and forever and so on.  It will actually lock the entire application along with Visual Studio.  The only way to regain control of your computer is to kill the process.
So, I removed the Titlebar all-together and that problem no longer occurs.  Plus I can add my own icon, text, colors and etc.  I think the Window should be completely look-less so I designed some classes https://github.com/jtbrower/WinUI that can help others until WinUI has these features built-in someday.
I have been pretty busy trying to keep up and have yet to report the infinite DPI issue because I am not really sure whos problem that is anyway?  I tried my best to blame myself but I just couldn't find a way to change the Window size and guarantee that this infinite recursion wouldn't be hit.  You have to drag the window across the DPI change just slow enough to cause its tantrum.
One of the features I still need to code is how to have slightly rounded corners where the rounded off region is completely transparent.  I look forward to figuring that one out so I can try porting over more of my application.  It seems that many people are looking for this, but nobody has publicly shared how to do it yet.  If I figure it out you will be able to find it at the link I mentioned above.

I'm revisiting old issues and cleaning up a little the Windowing area in WinUI 3.
@abhi-msft and @michael-hawker, I got your request. Today, in Preview 4, it's possible to change the title of a Window setting up the Title property in the code-behind, and the icon can be changed using Win32 APIs (I wrote a sample in #4056). However, it doesn't honor the app package properties. This is a new feature to me, given it's a new behavior for a Win32 app. IMO, if the Window doesn't have a Title and Icon set, it should use the app package one. There is a workstream in Project Reunion that is creating a library for setting these properties properly, so let's send this feedback to them. I already did it internally.
I'm closing this question. Feel free to open a feature request if you want to or open again if you have more questions.

Thanks @marb2000 is there a corresponding Reunion issue open tracking the workstream you mentioned we can link to on GitHub?

@marb2000  for the icon it this works for me latest WinUi AppSdk          var hWnd = WinRT.Interop.WindowNative.GetWindowHandle(this);         WindowId windowId = Win32Interop.GetWindowIdFromWindow(hWnd);         appWindow = AppWindow.GetFromWindowId(windowId);         appWindow.SetIcon("Logo.ico");

logo.ico has the be in the root

authors: StephenLPeters WamWooWam abhi-msft jarno9981 jtbrower marb2000 michael-hawker


text:
Bug winui3 1.0 preview 3 AppWindow::TitleBar always return null

Describe the bug
https://github.com/microsoft/WindowsAppSDK-Samples/blob/main/Samples/Windowing/cpp-winui/SampleApp/TitlebarPage.xaml.cpp
    void TitlebarPage::TitlebarBrandingBtn_Click(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::RoutedEventArgs const& e)
    {
        m_appWindow.TitleBar().ResetToDefault(); //crash  TitleBar() return null
        m_mainWindow.MyTitleBar().Visibility(winrt::Microsoft::UI::Xaml::Visibility::Collapsed);

        m_brandTitleBar = !m_brandTitleBar;
        if (AppWindowTitleBar::IsCustomizationSupported() && m_brandTitleBar)
        {
            m_appWindow.Title(L"Default titlebar with custom color customization");
            m_appWindow.TitleBar().ForegroundColor(Colors::White());
            m_appWindow.TitleBar().BackgroundColor(Colors::DarkOrange());
            m_appWindow.TitleBar().InactiveBackgroundColor(Colors::Blue());
            m_appWindow.TitleBar().InactiveForegroundColor(Colors::White());

            //Buttons
            m_appWindow.TitleBar().ButtonBackgroundColor(Colors::DarkOrange());
            m_appWindow.TitleBar().ButtonForegroundColor(Colors::White());
            m_appWindow.TitleBar().ButtonInactiveBackgroundColor(Colors::Blue());
            m_appWindow.TitleBar().ButtonInactiveForegroundColor(Colors::White());
            m_appWindow.TitleBar().ButtonHoverBackgroundColor(Colors::Green());
            m_appWindow.TitleBar().ButtonHoverForegroundColor(Colors::White());
            m_appWindow.TitleBar().ButtonPressedBackgroundColor(Colors::DarkOrange());
            m_appWindow.TitleBar().ButtonPressedForegroundColor(Colors::White());
        }
        else
        {
            m_appWindow.TitleBar().ResetToDefault();
            m_appWindow.Title(defaultTitle);
        }
    }

Steps to reproduce the bug
1.https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/Samples/Windowing/cpp-winui/SampleApp
Expected behavior
No response
Screenshots
No response
NuGet package version
No response
Windows app type

[ ] UWP
[X] Win32

Device form factor
No response
Windows version
May 2021 Update (19043)
Additional context
No response

any updates on this?

It only works with Windows 11 at this time.

is there any possibility to get the existing title bar in windows 10? is there any ETA from providing this function in windows 11?

@pratikone FYI

authors: Naveen61097 StephenLPeters bithaha kmgallahan


text:
With WinAppSDK 1.4 instantiating Multiple Windows crashes the application

Describe the bug
After updating to WinAppSDK 1.4, when instantiating multiple windows in OnLaunched of the Application class, the app crashes.
Steps to reproduce the bug

In Visual Studio create a new blank WinUI3 C# app
Open the package manager and update both BuildTools (10.0.22621.756) and WindowsAppSDK (1.4.230913002) to those versions
In the OnLaunched event add an additional var window = new MainWindow()
When running it crashes on that line.

It doesn't matter if you try to store the instance in a member variable or if you instantiate a completely different Window.
Expected behavior
On Start the application opens two windows.
Screenshots
No response
NuGet package version
WinUI 3 - Windows App SDK 1.4.0: 1.4.230822000
Windows version
Windows 10 (21H2): Build 19044
Additional context
I actually use AppSDK version 1.4.230913002 and windows version 22H2 19045, but the GitHub issue doesn't show those as selections.

Probably dupe of #8806

Closing as Dup of #8806

authors: CaseNewmark bpulliam kmgallahan


text:
[Question] Microsoft - why do you hate developers?

I have created *.msi installer. Now, I want to distribute it.

I can not distribute directly, because I do not have spare thousands of dollars to buy a certificate to sign the code.

OK, MS allows to publish on the store ... but not .msi files, because they are required to be signed!

OK, I found that you can publish appx/msix packages without singing the code. Would a trillion dollar worth company provide a solution to upload msi file and convert to msix? Apparently, they do not have resources or simply hate poor developers...

OK, I found MSIX Packaging tool, ..... but, to my surprise, it generates low quality icons! All my logo images look awful. And Microsoft has not given any option to create package with custom images, because, what, they do not have resources or just simply hate developers?

Even VLC is struggling with the Microsoft - https://twitter.com/videolan/status/1759688788232523788

Why not create an msix directly rather than going via msi?

@charlesroddie Because it's a Tauri app (https://tauri.app/) and Tauri currently doesn't provide appx or msix creation.

Hi @Andrew-web-coder
I understand that you're trying to publish an MSI installer to Store but are facing issues when trying to publish it.

Trusted signing is a new feature to help with simplifying the signing process.

When trying to package to MSIX, have you tried packaging your app using Windows Application Project?

If using the MSIX Packaging tool, you might want to try this , for adding custom assets.

Hope this helps! We would love to hear about your experience with these features.

@fiza-microsoft The overall developer experience was so terrible that I'm giving up on the idea of making useful and free apps.

https://github.com/microsoft/msix-packaging/issues/616#issuecomment-1966459650

@charlesroddie, MSIX suffers from the same, unfortunately: https://github.com/microsoft/msix-packaging/issues/332#issuecomment-650809083

authors: Andrew-web-coder RokeJulianLockhart charlesroddie fiza-microsoft

repo: microsoft/msix-packaging


text:
debconf not handled correctly on msodbcsql17

I am trying to predefine the ACCEPT LICENSE debconf variable for the ODBC package (msodbcsql17) like this:
echo msodbcsql17 msodbcsql/accept_eula boolean true | debconf-set-selections
But it seems to be ignored by the pre-installation script, which just checks only for the environment variable to be set. This does not work on automated installations e.g. when using puppet.

@LiohMoeller debconf support is scheduled for a future release of the ODBC driver, please stay tuned.

@LiohMoeller please check the latest ODBC documentation

It does not say anything about debconf support.

@LiohMoeller please search for the keyword "debconf". I pasted the screenshot below for your reference:

Ah, I was looking at the German version of the docs (browser default here) which does not contain the note yet. Thanks.

Resolved. Closing the issue.

authors: LiohMoeller david-puglielli yitam

repo: microsoft/msphpsql


text:
Best Practise for creating a container that can access the host's network resources

Hi,
I am fairly new to docker/bccontainer help etc. I'm looking for pointers in creating a BC container that can access the host's network resources. If you can point be in the correct direction that would be great.
Apologies if this is the wrong forum to post this type of basic question.
Regards & Thanks
Roddy

I think you would need to use transparent networking, but I am not sure.
What specifically do you need to access?

@Rodtmclean We are using transparent networking in our infrastructure. It works quite nicely.
On the docker host machines (Windows Server 2019) we simply create a new transparent network named "pub" like this:
docker network create -d transparent pub
and then we just add this flag to the New-BcContainerHelper command:
-additionalParameters '--net="pub"'
At least with our networking infrastructure that works quite flawless (unless the DHCP-Range is full, but that is another problem all together xD)

Thanks, I am going with this :).

authors: Rodtmclean freddydk staedter

repo: microsoft/navcontainerhelper


text:
Run-AlPipeline parameter installApps cannot handle special charaters (e.g. German umlaut) in filename

Describe the issue
Using the installApps parameter to add dependencies to the container in Run-AlPipeline cannot find the app files, if then filenames contain special characters. In our case it's all German umlaut characters, which are not uncommon in the publisher name.
The scripts, yml and settings.json are all UTF-8. The output form the pipeline however shows an encoding error and the app is not installed.
Scripts used to create container and cause the issue
Full output of scripts
BcContainerHelper is version 3.0.12
BcContainerHelper is running as administrator
Hyper-V is Enabled
UsePsSession is True
Host is Microsoft Windows Server 2019 Datacenter - ltsc2019
Docker Client Version is 20.10.9
Docker Server Version is 20.10.9
...

  _____           _        _ _ _
 |_   _|         | |      | | (_)
   | |  _ __  ___| |_ __ _| | |_ _ __   __ _    __ _ _ __  _ __  ___
   | | | '_ \/ __| __/ _` | | | | '_ \ / _` |  / _` | '_ \| '_ \/ __|
  _| |_| | | \__ \ |_ (_| | | | | | | | (_| | | (_| | |_) | |_) \__ \
 |_____|_| |_|___/\__\__,_|_|_|_|_| |_|\__, |  \__,_| .__/| .__/|___/
                                        __/ |       | |   | |
                                       |___/        |_|   |_|

File not found: scripts/files/XYZ UnternehmenslÃ¶sungen AG_XYZ_1.2.3.4.app

The issue is unrelated to BcContainerHelper and must be related to your pipeline or script.
This script:
Run-AlPipeline `
    -pipelineName "test" `
    -imagename "my" `
    -baseFolder "C:\src\github\BusinessCentralApps\BingMaps.PTE" `
    -appFolders "BingMaps" `
    -testFolders "BingMaps.Test" `
    -installTestFramework `
    -installApps @("C:\Users\freddyk\Downloads\öpps\Apps\überappbase.app","C:\Users\freddyk\Downloads\öpps\Apps\überapp.app")

on my machine results in this installation during the pipeline:
- e7320ebb-08b3-4406-b1ec-b4927d3e280b:Microsoft_Any_19.0.0.0.app
- 23de40a6-dfe8-4f80-80db-d70f83ce8caf:Microsoft_Test Runner_19.0.0.0.app

  _____           _        _ _ _
 |_   _|         | |      | | (_)
   | |  _ __  ___| |_ __ _| | |_ _ __   __ _    __ _ _ __  _ __  ___
   | | | '_ \/ __| __/ _` | | | | '_ \ / _` |  / _` | '_ \| '_ \/ __|
  _| |_| | | \__ \ |_ (_| | | | | | | | (_| | | (_| | |_) | |_) \__ \
 |_____|_| |_|___/\__\__,_|_|_|_|_| |_|\__, |  \__,_| .__/| .__/|___/
                                        __/ |       | |   | |
                                       |___/        |_|   |_|

Publishing C:\ProgramData\BcContainerHelper\Extensions\test-bld\d409170a-b1f2-4291-8b49-7bdc762bbfc3\überappbase.app
Synchronizing Default Base App Name on tenant default
Installing Default Base App Name on tenant default
App überappbase.app successfully published
Publishing C:\ProgramData\BcContainerHelper\Extensions\test-bld\d409170a-b1f2-4291-8b49-7bdc762bbfc3\überapp.app
Synchronizing Default App Name on tenant default
Installing Default App Name on tenant default
App überapp.app successfully published

Installing apps took 16 seconds

   _____                      _ _ _
  / ____|                    (_) (_)
 | |     ___  _ __ ___  _ __  _| |_ _ __   __ _    __ _ _ __  _ __  ___
 | |    / _ \| '_ ` _ \| '_ \| | | | '_ \ / _` |  / _` | '_ \| '_ \/ __|
 | |____ (_) | | | | | | |_) | | | | | | | (_| | | (_| | |_) | |_) \__ \
  \_____\___/|_| |_| |_| .__/|_|_|_|_| |_|\__, |  \__,_| .__/| .__/|___/
                       | |                 __/ |       | |   | |
                       |_|                |___/        |_|   |_|

Compiling C:\src\github\BusinessCentralApps\BingMaps.PTE\BingMaps
Using Symbols Folder: C:\src\github\BusinessCentralApps\BingMaps.PTE\.packages

Are you using GitHub or Azure DevOps?
I had similar problems in AL-Go, but I think I have resolved them all.

What does $OutputEncoding return on your local machine? I suspect it comes from reading the settings.json file, which is UTF-8 from a PowerShell 5 session, which is ASCII by default.

In PowerShell ISE:

In PowerShell:

As suspected it's a problem with reading the settings with the wrong encoding. Get-Content 'settings.json' -Encoding UTF8 is the solution.

authors: cstuber freddydk


text:
Question regarding service account & container culture

Hey Guys,
Is it possible to use another service account than system account for NAV service? For e.g. "user manager\containeradministrator"?
We have an issue with container culture. Even if you set a culture through local environment variable (
"-e locale=nl-NL" ), service itself will run under default culture (i guess en-US).
Best Regards,
Gintautas

What OS are you running as host?
I am running Windows Server 2019 (da-DK cultute) and ltsc2019 containers and when I run this script:
$credential = New-Object pscredential 'admin', (ConvertTo-SecureString -String 'P@ssword1' -AsPlainText -Force)
New-NavContainer -imageName "mcr.microsoft.com/businesscentral/onprem:gb" -containerName fkdev -accept_eula -updateHosts -auth NavUserPassword -Credential $credential -additionalParameters @("-e locale=de-DE") -isolation hyperv | Out-Null
Invoke-ScriptInNavContainer -containerName fkdev -scriptblock { get-culture }

New-NavContainer -imageName "mcr.microsoft.com/businesscentral/onprem:gb" -containerName fkdev -accept_eula -updateHosts -auth NavUserPassword -Credential $credential -additionalParameters @("-e locale=de-DE") | Out-Null
Invoke-ScriptInNavContainer -containerName fkdev -scriptblock { get-culture }

New-NavContainer -imageName "mcr.microsoft.com/businesscentral/onprem:gb" -containerName fkdev -accept_eula -updateHosts -auth NavUserPassword -Credential $credential -isolation hyperv | Out-Null
Invoke-ScriptInNavContainer -containerName fkdev -scriptblock { get-culture }

New-NavContainer -imageName "mcr.microsoft.com/businesscentral/onprem:gb" -containerName fkdev -accept_eula -updateHosts -auth NavUserPassword -Credential $credential | Out-Null
Invoke-ScriptInNavContainer -containerName fkdev -scriptblock { get-culture }

I will get

de-DE
de-DE
en-GB
en-GB
so without specifying culture, I get the culture from the container (GB) - both in hyperv and process isolation.
Windows 10 might be different - you could run the script from above on your machine and see what you get.
BTW - I know things are different with ltsc2016 and I think 1803 had a bug in this area, so you would need to make sure that your Windows 10 is updated to 1809 (fall release) and use the latest navcontainerhelper (+ the ltsc2019 containers)

hey @freddydk,
I run windows server 2016 with ltsc2016 images.
When i run  get-culture from nav-container it gives me nl_NL, so set-culture/get-culture works fine.
But since NAV service runs under "network service" account, it runs under direct context which is not  affected by set-culture/get-culture commands executed from another user conext.
In order to change regional settings for "network service", you have to Copy your settings as shown in the screenshot. But i don't believe it's possible to do it from powershell.
Easier way would be to run NAV service, under the same user "user manager\containeradministrator". Then set-culture, would really change culture setting for the NAV service.

That change would break gMSA usage for Win Auth / AD connection, so if it happens, it should be optional

First question: How do you determine that your container is running under a wrong culture?
Second - I don't think the containeradministrator and the containeruser are real users - I don't think that is the way to go.
You could override the AdditionalSetup.ps1 with this:
Stop-Service -name $NavServiceName | Out-Null
$service = gwmi win32_service -Filter "name='$NavServiceName'"
$service.Delete() | Out-Null

Start-Sleep -Seconds 10

# Creating Business Central Service
Write-Host "Creating Business Central Service Tier"
$serviceCredentials = New-Object System.Management.Automation.PSCredential ('user manager\containeradministrator', (new-object System.Security.SecureString))
$serverFile = "$serviceTierFolder\Microsoft.Dynamics.Nav.Server.exe"
$configFile = "$serviceTierFolder\Microsoft.Dynamics.Nav.Server.exe.config"
New-Service -Name $NavServiceName -BinaryPathName """$serverFile"" `$$ServerInstance /config ""$configFile""" -DisplayName "Dynamics 365 Business Central Server [$ServerInstance]" -Description "$serverInstance" -StartupType manual -Credential $serviceCredentials -DependsOn @("HTTP") | Out-Null
Start-Service -name $NavServiceName

Which will remove the service and recreate it as containeradministrator.
It doesn't work though - it fails - I think because containeradministrator isn't a user.
You could also try with the added admin windows user - but you would have to give that user logon as a service rights first - not sure how to do that in PowerShell.

Maybe easiest thing is really to modify the registry settings inside the container here: HKEY_USERS.DEFAULT\Control Panel\International

I think recreating the service is a wild goose chase - won't work.
How do you determine that your container is running under a wrong culture?

Sorry for the late reply. Here's how i test it:

Create my container using parameter "-e locale=nl-NL"
Run container's powershell session and check Get-Culture. As expected it's nl-NL

Invoke another command container's power-shell session to export object to the text file:

& "C:\Program Files (x86)\Microsoft Dynamics NAV\130\RoleTailored Client\finsql.exe" "Command=ExportObjects`,Filter=`"Type=Table;ID=3`"`,ServerName=localhost\SQLEXPRESS`,Database=`"mydatabase`"`,LogFile=`"C:\temp\`"`,File=`"C:\temp\export.txt`"" | Write-Output

Check the content of the text file. As expected, Date/Time properties are formatted  in Dutch format

Now i run the same export, but this time from NAV, so code goes through NST session. Here's NAV code:

Process := Process.Start(
'C:\Program Files (x86)\Microsoft Dynamics NAV\130\RoleTailored Client\finsql.exe',
'Command=ExportObjects,Filter="Type=Table;ID=3",ServerName=localhost\SQLEXPRESS,Database="mydatabase",LogFile="C:\temp\",File="C:\temp\exportfroNST.txt"'
);
Process.WaitForExit;

I check exported file again. This time date/time format is formatted according to en-US format

So here's the proof that NST user runs under different Culture settings than container's powershell session.
I believe there's other ways to test the same thing. The reason i chose the export of NAV file, because have some functionality export NAV files to txt and here we noticed an issue.
You could have the same problem in the areas were regional settings matter. One that comes to my mind now, is export to csv files.  There default delimiter (either comma, or semi-column) is taken based on regional settings.
Best Regards,
Gintautas

Hey @freddydk,
Did you have a chance to look into this?

Yes, NavContainerHelper 0.6.2.3 contains a fix, which might help you:
0.6.2.3
Added parameter locale to New-NavContainer to override the culture setting of the container
BugFix: Export-NavContainerObjects in hyperv ltsc2019 containers caused destructive encoding of the object files
Use different folder name for PsTestTool to avoid using old cached versions
BugFix: Convert-Txt2Al, Create-MyDeltaFolder, Create-MyOriginalFolder (and Convert-ModifiedObjectsToAl and Export-ModifiedObjectsAsDeltas) in hyperv ltsc2019 containers caused destructive encoding of files
More detailed:
The problem (bug) was in Split-NAVApplicationObjectFile (and some of the other cmdlets)
In both containers (hyperv and process) the objects file is written in OEM format (which is what you want)
Splitting uses the default encoding (which it wrongly believes is the same as finsql exported the file with) to read the file, meaning that it reads a OEM file using UTF8 encoding, which becomes destructive.
Only solution really to this problem is to convert the objects file to UTF8 - split the file and then convert the splitted files back to OEM.
Also I added a -locale parameter to new-navcontainer, which allows you to override the locale in the container, i.e. -locale da-DK (for the export text files)

if anyone has the same issue, here's how we solved it:
connect to your image using system account (the one that runs NAV service)
docker exec -it --user "NT AUTHORITY\SYSTEM" CONTAINER_NAME powershell.exe
once you are in, set the culture to your proffered:
set-culture "nl-NL"
restart your container
docker restart CONTAINER_NAME
Now, you navservice will run under you preferred culture.
We needed it for OMA addin. OMA is running import/export of nav/text files. Since it's running on the server side, culture info is very important.
Hope it comes handy for anyone.
Gintautas

Nice discovery - will check whether I will add this to new-navcontainer if you specify culture.

Hey @freddydk,
Did you find a way to incorporate it to new-navcontainer?

I totally forgot about this, I am oof the next days, could you reopen the issue?
Hent Outlook til iOShttps://aka.ms/o0ukef

Fra: Gintautas notifications@github.com
Sendt: Friday, July 24, 2020 7:44:46 AM
Til: microsoft/navcontainerhelper navcontainerhelper@noreply.github.com
Cc: Freddy Kristiansen Freddy.Kristiansen@microsoft.com; Mention mention@noreply.github.com
Emne: Re: [microsoft/navcontainerhelper] Question regarding service account & container culture (#344)
Hey @freddydkhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ffreddydk&data=02|01|freddy.kristiansen%40microsoft.com|950c294bf95549aa6d7a08d82f94ac57|72f988bf86f141af91ab2d7cd011db47|1|0|637311662883623757&sdata=Cy2z4I01VoT6ciJmede0LglqKGWoCoKoSepuP1GEutI%3D&reserved=0,
Did you find a way to incorporate it to new-navcontainer?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fnavcontainerhelper%2Fissues%2F344%23issuecomment-663356866&data=02|01|freddy.kristiansen%40microsoft.com|950c294bf95549aa6d7a08d82f94ac57|72f988bf86f141af91ab2d7cd011db47|1|0|637311662883633756&sdata=Tzklf2z5MqhBSW7NG1oA3GMtBpXsKbQpDr56JhJUxf4%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACSGUA26BF2LMT3H5CUHZJLR5ENU5ANCNFSM4GWM42DQ&data=02|01|freddy.kristiansen%40microsoft.com|950c294bf95549aa6d7a08d82f94ac57|72f988bf86f141af91ab2d7cd011db47|1|0|637311662883633756&sdata=ENvGFKgKqksQd53Eb86HqFK0J34gzFdQQ3fE%2Fd5GP64%3D&reserved=0.

I believe only you can re-open it now

Hey @freddydk, just checking if you got some plans/updates for the case?

Sorry.
Just had a look - it seems like there is no good way to do this from inside the container, best option is probably what you suggested.
Do you know whether it is needed to restart the container - or whether it is sufficient to restart the service tier?
Would this command do the trick?
$containerName = "bcserver"
$locale = "da-DK"
docker exec --user "NT AUTHORITY\SYSTEM" $containerName powershell.exe "set-culture '$locale'; . 'c:\run\prompt.ps1' -silent; . 'c:\run\serviceSettings.ps1'; Set-NavServerInstance -ServerInstance `$serverInstance -restart"

If this is the case, I can add a parameter to new-bccontainer called -SetServiceTierUserLocale which would run this after creating the container.

I think it's enough to restart just the service

The parameter is there, and has been so for ~6 months.
It was actually included in this checkin https://github.com/microsoft/navcontainerhelper/commit/ec511b8361f64eb4cacec51cd21d825dfd3090fd
(on the wrong issue)

authors: freddydk gintuoklis tfenster


text:
how to add channel constriction  in the pruning config

Hi, I've look through the docs and could not find how to set in the pruning config(suppose we use l1-norm-pruner) so that remained convs have channel number that is divisible by a certain number, say 8.
Thanks.

hello @RunningLeon , sorry we don't have this feature right now, but it's on our to-do list, which stage you want to apply the channel constriction, in pruner simulated pruning or in pruning speedup or both?
And could you explain why this feature is important to you so that we can re-evaluate this feature's priority?
For now, there is a workaround can make the remained channel number can be divisible by 8, you could set the sparsity to a certain value, here is an example:
    import math
    config_list = []
    target_remained = 0.3
    div_num = 8
    for name, module in model.named_modules():
        if isinstance(module, torch.nn.Conv2d):
            if module.out_channels < div_num:
                continue
            remained_num = math.ceil((module.out_channels // div_num) * target_remained) * div_num
            config_list.append({'op_names': [name], 'sparsity': (module.out_channels - remained_num) / module.out_channels})

hello @RunningLeon , sorry we don't have this feature right now, but it's on our to-do list, which stage you want to apply the channel constriction, in pruner simulated pruning or in pruning speedup or both? And could you explain why this feature is important to you so that we can re-evaluate this feature's priority?
For now, there is a workaround can make the remained channel number can be divisible by 8, you could set the sparsity to a certain value, here is an example:
    import math
    config_list = []
    target_remained = 0.3
    div_num = 8
    for name, module in model.named_modules():
        if isinstance(module, torch.nn.Conv2d):
            if module.out_channels < div_num:
                continue
            remained_num = math.ceil((module.out_channels // div_num) * target_remained) * div_num
            config_list.append({'op_names': [name], 'sparsity': (module.out_channels - remained_num) / module.out_channels})

@J-shang Hi, thanks for your reply. I'd prefer both.
The motivation is that for backends like TensorRT, if the channel number meets some requirements, the performance would be better. For instance, for structured sparsity for TensorRT, the channel number should be 128 * x, see this doc.
The workaround does not work for pruner which automatically decides different sparsity for different layers or convs.

@J-shang Hi, thanks for your reply.

I'd prefer both.
The motivation is that for backends like TensorRT, if the channel number meets some requirements, the performance would be better. For instance, for structured sparsity for TensorRT, the channel number should be 128 * x, see this doc.
The workaround does not work for pruner which automatically decides different sparsity for different layers or convs.

@RunningLeon , hello, thanks for your information. I believe this is a reasonable motivation for us to make this feature a higher priority, we will discuss about this feature and let you know if this is done.

Thanks a lot. Looking forward to this feature.

authors: J-shang RunningLeon

repo: microsoft/nni


text:
support libFuzzer's __libfuzzer_extra_counters for coverage analysis

multiple fuzzers that provide their own coverage instrumentation make use of libfuzzer's feature of __libfuzzer_extra_counters to pass map coverage to something libFuzzer can inspect.

libfuzzer-dotnet https://github.com/Metalnem/libfuzzer-dotnet/blob/543b170a67bdd39e9ba260fe54bc93c77b877c24/libfuzzer-dotnet.cc#L19-L20
go-fuzz https://github.com/dvyukov/go-fuzz/blob/6a8e9d1f2415cf672ddbe864c2d4092287b33a21/go-fuzz-build/main.go#L851-L864

For libfuzzer-dotnet, this is copied via a shared-memory segment from a secondary process after each LLVMFuzzerTestOneInput.

Given the changes in coverage, having a more meaningful understanding of coverage for these other coverage utilities would be good, but probably not focused on extra_counters.  Instead, I imagine refocusing this work item to address other libfuzzer-like coverage would be useful.

Made redundant by #2006.

authors: bmc-msft ranweiler

repo: microsoft/onefuzz


text:
Integrate symbolic shape inference

Port and integrate symbolic shape inference from ONNX Runtime as an analysis pass / feature

Another issue that is relevant is: enable shape-inference for ORT's custom ops (in the optimizer/rewriter, which currently uses onnx shape inference).
Is the above issue intended for the same purpose, or is it intended to enable the "symbolic" part? Wondering if we should create a separate issue or not (for issue I mention).

I created the issue thinking we may be able to absorb the symbolic shape inference tool from onnxruntime as a pass. We may be able to enable shape inference for ort ops via the same route?

authors: gramalingam justinchuby

repo: microsoft/onnxscript


text:
Task container's hostname support

What would you like to be added:
Hostname to IP address mapping like job-ssh.
Why is this needed:
Access other containers' opened port with a shorter/readable URL.
Without this feature, how does the current module work:
Modify the ssh config file to enable ssh access across task containers.
Components that may involve changes:
Runtime plugin.
Could be implemented by host file or HOSTALISES env var (http://blog.tremily.us/posts/HOSTALIASES/)

To make it more cleanly, this requests is asking to ssh task container from other task container by using ssh task_name -p port instead using ssh task_ip -p port

repo: microsoft/pai


text:
Use latest memray

Fixes #175

Codecov Report

Merging #183 (7ffaddd) into main (684e4b6) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #183   +/-   ##
=======================================
  Coverage   87.41%   87.41%
=======================================
  Files          12       12
  Lines        2186     2186
=======================================
  Hits         1911     1911
  Misses        275      275

source: gharchive/pull-request

authors: codecov-commenter tonybaloney

repo: microsoft/picologging


text:
add junit (experimental) in sidebar

Depends on https://github.com/microsoft/playwright/pull/29406

Updated it in https://github.com/microsoft/playwright.dev/pull/1319 since it required a roll.

authors: jfgreffier yury-s


text:
Configurable polling interval for asynchronous operation status while overwriting old status line

The spam of operation status log entries is really annoying. We are having customers were solution import and upgrade are taking several hours. A four second polling interval for the status update is not necessary.
Therefore I would really appreciate either of both of two solutions:

Overwrite the last status line entry with the new one. The values changing in the same line would still indicate its alive.
A configurable setting for the interval to poll for the current status. If it takes like 3 hours to import and upgrade a big solution I really would like to not poll for it every 4 seconds. This adds up to 900 lines of status log lines for just one hour.

@HansMeiser999 yes, on long-running tasks, the progress reporting is creating way too much noise.
We'll discuss how to improve that while still showing processing progress.
Ideally, we'd like to avoid asking the pipeline authors to have to manage the polling timeout, so nr 2 above is NOT our favorite...
AB#2924286

this issue is fixed

authors: HansMeiser999 davidjenni petrochuk

repo: microsoft/powerplatform-build-tools


text:
powerplatform-vscode Loc checkin for WO71206

powerplatform-vscode Loc checkin for WO71206

Please note that additional stings were added later last week. We are handing them to localization today. ETA is this Thursday.
Thanks,
Hiro
From: Crash Collison @.>
Sent: Monday, September 12, 2022 3:19 PM
To: microsoft/powerplatform-vscode @.>
Cc: Hiro Fukumoto (Pactera Technologies Inc) @.>; Author @.>
Subject: Re: [microsoft/powerplatform-vscode] powerplatform-vscode Loc checkin for WO71206 (PR #288)
@tehcrashxor approved this pull request.
Spot checked a couple languages, and the strings used by the main version of the extension are loading as expected. Checking with @ashishchoudhary001https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fashishchoudhary001&data=05|01|v-hifuku%40microsoft.com|8259dd0a4f124fa2b6bd08da950cca08|72f988bf86f141af91ab2d7cd011db47|1|0|637986179430101016|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=YdFNGf0LkpJqcVQHPg2jDF%2Fg4v5aSZTCuq8l4cdw524%3D&reserved=0 about the missing translations used by the Web extension per the other comment.

In loc/translations-import/vscode-powerplatform.fr.xlfhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fpowerplatform-vscode%2Fpull%2F288%23discussion_r968980947&data=05|01|v-hifuku%40microsoft.com|8259dd0a4f124fa2b6bd08da950cca08|72f988bf86f141af91ab2d7cd011db47|1|0|637986179430101016|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=Zj7K5yB%2BuM3zryBcomJH0d3wbNOiAWf38LSvaSUuW9E%3D&reserved=0:

@@ -145,6 +145,46 @@ L'authentification interactive n'est pas disponible pour les scénarios dist

     <source xml:lang="en">PAC CLI is not supported in VS Code for the Web</source>

     <target state="translated">PAC CLI n'est pas pris en charge dans VS Code pour le Web</target>

   </trans-unit>

 <trans-unit id="microsoft-powerapps-portals.walkthrough.title">

Looks like there are a decent number of strings in the package.json section of the translated xlf files here that don't have translations added.
I think that should be fine, as these are used by the Web Only version of the extension, which currently doesn't load translations anyway due to a VS Code Web issue. @ashishchoudhary001https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fashishchoudhary001&data=05|01|v-hifuku%40microsoft.com|8259dd0a4f124fa2b6bd08da950cca08|72f988bf86f141af91ab2d7cd011db47|1|0|637986179430257286|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=MXjupAlCsSU9rQJi776dke6NxnugoGDI%2B3oy4mfXUjg%3D&reserved=0 , can you confirm that?

Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fpowerplatform-vscode%2Fpull%2F288%23pullrequestreview-1104900114&data=05|01|v-hifuku%40microsoft.com|8259dd0a4f124fa2b6bd08da950cca08|72f988bf86f141af91ab2d7cd011db47|1|0|637986179430257286|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=JVH6Qw5OFvVOdD8vcdbK9mEan8%2BS4z2BGJRBsGlvd9w%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAZJTUAL5PANJH7KZGWUSQCDV56T5FANCNFSM6AAAAAAQKXWBSM&data=05|01|v-hifuku%40microsoft.com|8259dd0a4f124fa2b6bd08da950cca08|72f988bf86f141af91ab2d7cd011db47|1|0|637986179430257286|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=Y%2BHMIsYx56odA4tRESxqv8gmThzB1zPKpuViA7fm4Ew%3D&reserved=0.
You are receiving this because you authored the thread.Message ID: @.@.>>

repo: microsoft/powerplatform-vscode


text:
IT for file system updates utility

IT For FileSystemUpdatesUtility. Also added proxy quire package to stub node dependency.

stale PR

authors: tyaginidhi v-vbhanndari


text:
Add try catch in process pool

Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
All Promptflow Contribution checklist:

[ ] The pull request does not introduce [breaking changes].
[ ] CHANGELOG is updated for new features, bug fixes or other significant changes.
[ ] I have read the contribution guidelines.
[ ] Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: suggested workflow.

General Guidelines and Best Practices

[ ] Title of the pull request is clear and informative.
[ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[ ] Pull request includes test coverage for the included changes.

You may add more context in the PR description

repo: microsoft/promptflow


text:
online learning blog

A blog post that lists the online learning opportunties in MakeCode. I've started and quickly gave up. Not sure how to structure it. Anybody has a preference?

Let me think about it and see if I can draft something up...

Can we wait to post this until Monday?  I want to take a pass through and add some stuff (Game Jam, our MakeCode Live Video schedule, Teams integration, etc.) but don't have time today...

Yes it can. I want to start streaming Monday. We can also post this and update as it evolves.

authors: Jaqster pelikhan

repo: microsoft/pxt


text:
More accessibility - better Narrator support, keyboard navigation

fixes https://github.com/microsoft/pxt-microbit/issues/3629
fixes  https://github.com/microsoft/pxt-microbit/issues/3605
fixes https://github.com/microsoft/pxt-microbit/issues/3603
fixes https://github.com/microsoft/pxt-microbit/issues/3596
should have made a separate commit for each one D:

oh yeah master already had the button role so I removed my change


text:
Python language server crashed by Libzip on 2021.8.1

Environment data

Language Server version: 2021.8.1
OS and version: linux x64
Python version (and distribution if applicable, e.g. Anaconda): Miniconda Python 3.7.10 64-bit
python.analysis.indexing: undefined
python.analysis.typeCheckingMode: off

Expected behaviour
If it's hard to fix, will there be a switch to disable this feature?
Actual behaviour
In fact, I'm still facing the same issue as #1421 and #1417 since version of 6.1. I tried to not bothering you after 6.2 by freezing my pylance to 5.4 and disabling extension auto-update, but it's quite inconvenient to disable all updates.
Logs

[Info  - 11:13:53 AM] Server root directory: /~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist
Libzip Error: Not a zip archive
    at h.makeLibzipError (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipFS.js:149:29)
    at new h (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipFS.js:121:28)
    at I.getZipSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipOpenFS.js:816:28)
    at I.makeCallSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipOpenFS.js:697:21)
    at I.readdirSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipOpenFS.js:614:21)
    at c.readdirSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ProxiedFS.js:201:28)
    at C.readdirSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ProxiedFS.js:201:28)
    at D.readdirEntriesSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/src/common/realFileSystem.ts:212:23)
    at t.PyrightFileSystem.processPartialStubPackages (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/src/pyrightFileSystem.ts:187:46)
    at _0x4e647c.ensurePartialStubPackages (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/src/analyzer/importResolver.ts:587:25)
Libzip Error: Not a zip archive
    at h.makeLibzipError (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipFS.js:149:29)
    at new h (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipFS.js:121:28)
    at I.getZipSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipOpenFS.js:816:28)
    at I.makeCallSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipOpenFS.js:697:21)
    at I.readdirSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ZipOpenFS.js:614:21)
    at c.readdirSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ProxiedFS.js:201:28)
    at C.readdirSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/node_modules/@yarnpkg/fslib/lib/ProxiedFS.js:201:28)
    at D.readdirEntriesSync (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/src/common/realFileSystem.ts:212:23)
    at t.PyrightFileSystem.processPartialStubPackages (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/src/pyrightFileSystem.ts:187:46)
    at _0x4e647c.ensurePartialStubPackages (/~/.vscode-server/extensions/ms-python.vscode-pylance-2021.8.1/dist/pyright-internal/src/analyzer/importResolver.ts:587:25)

Code Snippet / Additional information

XXX

Thanks for the logs.

I tried to not bothering you after 6.2 by freezing my pylance to 5.4 and disabling extension auto-update, but it's quite inconvenient to disable all updates.

Please, do bother us, otherwise we don't know that this is still an issue!

Can you provide full trace logs for this?
I'm wondering if you can find the broken zip/egg file; the current code should be ensuring that any zipfiles it opens are valid zips, but perhaps this file is broken in a way we aren't detecting.

I've submitted a fix which should fix these lipzip errors.

authors: FireBrother jakebailey

repo: microsoft/pylance-release


text:
looks like there is tokenizer bug?

probably we need to figure out before release new version.

oops. wrong number of quote issue :)


text:
Pylance 2020.7.1 not working

Issue Type: Bug
My Pylance ver just got upgraded to 2020.7.1. Since the upgrade, Pylance has stopped working. VS Code has become slow and times unreponsive.  I have de installed and tried the earlier ver 2020.7.0 which seems to work.
Extension version: 2020.7.1
VS Code version: Code 1.47.0 (d5e9aa0227e057a60c82568bf31c04730dc15dcd, 2020-07-09T08:02:06.629Z)
OS version: Windows_NT x64 10.0.17134

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz (4 x 2295)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
7.88GB (1.68GB free)

Process Argv
.

Screen Reader
no

VM
0%

2020.7.0 had a significant regression which prevented a number of features from working including all diagnostics. I wouldn't recommend using it (even over 2020.6.1).
Can you provide any other information? Our bug template should have asked for logs, screenshots, etc, which would help us in identifying the problem.

Withdrawing this issue. It seems to working fine. It might have something to do my i5 laptop. It seems working fine. I have have also tested it on my i7 machine. Both seem to working now.

authors: Trid-collab jakebailey


text:
analysis bug

Environment data

Language Server version: Microsoft Python Language Server version 0.4.38.0
OS: Darwin x64 18.0.0
VSCode Version: 1.38.1
Python version (& distribution if applicable, e.g. Anaconda): python 2.7.16 64-bit

Expected behaviour
p can go to function p inside t2
Actual behaviour
Cant go to definition
Code Snippet / Additional lnformation

class t1(object):
    def __init__(self, obj):
        self.obj = obj
        return

class t2(object):
    def p(self):
        print "haha"

a = t1(t2())
a.obj.p()

I'm not sure we'd be able to do this at the moment without you explicitly writing out that t1 is some generic structure with type annotations (but you're still on Python 2).
We already can't find what obj is:

Because it could be anything, and our analysis doesn't create specific versions of t1 for every invocation with a new "obj".

authors: jakebailey wziww

repo: microsoft/python-language-server


text:
Add function to in toshiba smb solver to enable submitting protobuf jobs

Add a function to allow Toshiba SMB solver to submit protobuf problems

This is old/stale, so I'm closing it.

authors: sanjgupt vxfield

repo: microsoft/qdk-python


text:
Use the XML exception tag in doc comments (C#)

Adds proper XML tags for any exceptions previously mentioned within the summary tag.
Currently, this is only done for C# projects, since most of the F# code uses implicit summary tags.
Ref #699

A few TODOs prior to merge:

[ ] Remove "Thrown if" prefix from exception tag descriptions. Otherwise, generated documentation might be redundant (e.g. DocFX will put these descriptions inside column entitled "Conditions").
[ ] Add paramref tags for all parameter references in exception descriptions.
[ ] Combine exception tags with the same cref (approach TBD).
[ ] Add see tags for code references to exception tag descriptions.

This one is ready for another look @samarsha
Thanks for all of the great discussion so far!

/azp run

authors: kevinhartman samarsha

repo: microsoft/qsharp-compiler


text:
Adding example of item access operator ::

This closes #323

Hi @bettinaheim, could you please review this?

Thank you so much for your comments @cgranade !
I will rename the function and the NewType for clarification :)

Hi @cgranade, could you please review this?

repo: microsoft/qsharp-language


text:
Poetry Install crashes for python-preview branch.

Describe the bug
The poetry install command fails at debugpy installation. Possibly due to hashing error on 'debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.dll'.
To Reproduce
Steps to reproduce the behavior:

Checkout python-preview branch: git checkout python-preview
Change directory to python: cd python
Install Poetry: pip install poetry
Run Poetry installation: poetry install
Should install most but stops and fails at debugpy.

Expected behavior
I was walking through the README.md tutorial for python setup in the branch. Expected the install to go through nicely.
Log
This is the log after a second install attempt.
Package operations: 7 installs, 0 updates, 0 removals

  • Installing debugpy (1.6.6)

  _WheelFileValidationError

  ["In C:\\Users\\peter\\AppData\\Local\\pypoetry\\Cache\\artifacts\\f3\\fe\\7e\\ae79971a5d18da24266b2396f07920898302fe5605d3467a4c20e44be7\\debugpy-1.6.6-cp310-cp310-win_amd64.whl, hash / size of debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.cp310-win_amd64.pyd didn't match RECORD", "In C:\\Users\\peter\\AppData\\Local\\pypoetry\\Cache\\artifacts\\f3\\fe\\7e\\ae79971a5d18da24266b2396f07920898302fe5605d3467a4c20e44be7\\debugpy-1.6.6-cp310-cp310-win_amd64.whl, hash / size of debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.cp310-win_amd64.pyd didn't match RECORD", "In C:\\Users\\peter\\AppData\\Local\\pypoetry\\Cache\\artifacts\\f3\\fe\\7e\\ae79971a5d18da24266b2396f07920898302fe5605d3467a4c20e44be7\\debugpy-1.6.6-cp310-cp310-win_amd64.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.dll didn't match RECORD", "In C:\\Users\\peter\\AppData\\Local\\pypoetry\\Cache\\artifacts\\f3\\fe\\7e\\ae79971a5d18da24266b2396f07920898302fe5605d3467a4c20e44be7\\debugpy-1.6.6-cp310-cp310-win_amd64.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.dll didn't match RECORD", "In C:\\Users\\peter\\AppData\\Local\\pypoetry\\Cache\\artifacts\\f3\\fe\\7e\\ae79971a5d18da24266b2396f07920898302fe5605d3467a4c20e44be7\\debugpy-1.6.6-cp310-cp310-win_amd64.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.exe didn't match RECORD", "In C:\\Users\\peter\\AppData\\Local\\pypoetry\\Cache\\artifacts\\f3\\fe\\7e\\ae79971a5d18da24266b2396f07920898302fe5605d3467a4c20e44be7\\debugpy-1.6.6-cp310-cp310-win_amd64.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.exe didn't match RECORD", "In C:\\Users\\peter\\AppData\\Local\\pypoetry\\Cache\\artifacts\\f3\\fe\\7e\\ae79971a5d18da24266b2396f07920898302fe5605d3467a4c20e44be7\\debugpy-1.6.6-cp310-cp310-win_amd64.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.dll didn't match RECORD", "In C:\\Users\\peter\\AppData\\Local\\pypoetry\\Cache\\artifacts\\f3\\fe\\7e\\ae79971a5d18da24266b2396f07920898302fe5605d3467a4c20e44be7\\debugpy-1.6.6-cp310-cp310-win_amd64.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.dll didn't match RECORD"]

  at ~\AppData\Local\Programs\Python\Python310\lib\site-packages\installer\sources.py:289 in validate_record
      285│                         f"In {self._zipfile.filename}, hash / size of {item.filename} didn't match RECORD"
      286│                     )
      287│
      288│         if issues:
    → 289│             raise _WheelFileValidationError(issues)
      290│
      291│     def get_contents(self) -> Iterator[WheelContentElement]:
      292│         """Sequential access to all contents of the wheel (including dist-info files).
      293│

Desktop (please complete the following information):

OS [dxdiag]: Windows 10 Pro 64-bit Build 19044
Python: Python 3.10.6
Pip: 23.0.1
VSCode:

1.76.2
ee2b180d582a7f601fa6ecfdad8d9fd269ab1884
x64

@alexchaomander , can you take a look please?

Same problem for python 3.11.2

@alexchaomander
Just tried it, didn't work. Might work for other people though.
For other people who want to try on windows:
poetry config --list
Should give you this:
cache-dir = "C:\\Users\\peter\\AppData\\Local\\pypoetry\\Cache"
experimental.new-installer = true
experimental.system-git-client = false
installer.max-workers = null
installer.modern-installation = true
installer.parallel = true
virtualenvs.create = true
virtualenvs.in-project = null
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.no-setuptools = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}\\virtualenvs"  # C:\Users\peter\AppData\Local\pypoetry\Cache\virtualenvs
virtualenvs.prefer-active-python = false
virtualenvs.prompt = "{project_name}-py{python_version}"

Then you can try manually deleting the pypoetry folder with the cache-dir.

I can reproduce this now! (I run an ubuntu desktop and WSL normally, but setup on regular Windows to reproduce this.)
This issue seems to be the culprit: https://github.com/microsoft/debugpy/issues/1246
For now, it seems the workaround is:
poetry config installer.modern-installation false --local

After that, you should be able to complete:
poetry install

poetry shell

python

And, in the python terminal, do something like import semantic_kernel as sk.

authors: Codie-Petersen jjhenkel richardk53 timlaverty

repo: microsoft/semantic-kernel


text:
[BUG] Spring Azure Cloud 4.4.1 Service Bus with stream binder results into AuthorizationFailed

Describe the bug
Spring Azure Cloud 4.4.1 Service Bus with stream binder results into AuthorizationFailed
Exception or Stack Trace
results into following error
NOTE: on different environment different object id is displayed in error
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.azure.messaging.servicebus.ServiceBusClientBuilder]: Factory method 'serviceBusClientBuilder' threw exception; nested exception is java.lang.RuntimeException: Fetching ServiceBusNamespace with name '<some valid servicebus namespace>' failed due to: com.azure.core.management.exception.ManagementException: Status code 403, "{"error":{"code":"AuthorizationFailed","message":"The client '8f455a17-6010-45b5-9e6a-a39d74a64ac0' with object id '8f455a17-6010-45b5-9e6a-a39d74a64ac0' does not have authorization to perform action 'Microsoft.ServiceBus/namespaces/read' over scope '/subscriptions/<some valid subscription id>/resourceGroups/<some valid resource group>/providers/Microsoft.ServiceBus/namespaces/<some valid servicebus namespace>' or the scope is invalid. If access was recently granted, please refresh your credentials."}}": The client '8f455a17-6010-45b5-9e6a-a39d74a64ac0' with object id '8f455a17-6010-45b5-9e6a-a39d74a64ac0' does not have authorization to perform action 'Microsoft.ServiceBus/namespaces/read' over scope '/subscriptions/<some valid subscription id>/resourceGroups/<some valid resource group>/providers/Microsoft.ServiceBus/namespaces/<some valid servicebus namespace>' or the scope is invalid. If access was recently granted, please refresh your credentials.
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
	... 19 common frames omitted
Caused by: java.lang.RuntimeException: Fetching ServiceBusNamespace with name '<some valid servicebus namespace>' failed due to: com.azure.core.management.exception.ManagementException: Status code 403, "{"error":{"code":"AuthorizationFailed","message":"The client '8f455a17-6010-45b5-9e6a-a39d74a64ac0' with object id '8f455a17-6010-45b5-9e6a-a39d74a64ac0' does not have authorization to perform action 'Microsoft.ServiceBus/namespaces/read' over scope '/subscriptions/<some valid subscription id>/resourceGroups/<some valid resource group>/providers/Microsoft.ServiceBus/namespaces/<some valid servicebus namespace>' or the scope is invalid. If access was recently granted, please refresh your credentials."}}": The client '8f455a17-6010-45b5-9e6a-a39d74a64ac0' with object id '8f455a17-6010-45b5-9e6a-a39d74a64ac0' does not have authorization to perform action 'Microsoft.ServiceBus/namespaces/read' over scope '/subscriptions/<some valid subscription id>/resourceGroups/<some valid resource group>/providers/Microsoft.ServiceBus/namespaces/<some valid servicebus namespace>' or the scope is invalid. If access was recently granted, please refresh your credentials.
	at com.azure.spring.cloud.resourcemanager.implementation.crud.AbstractResourceCrud.get(AbstractResourceCrud.java:62)
	at com.azure.spring.cloud.resourcemanager.implementation.connectionstring.ServiceBusArmConnectionStringProvider.getConnectionString(ServiceBusArmConnectionStringProvider.java:39)
	at com.azure.spring.cloud.core.implementation.factory.AbstractAzureServiceClientBuilderFactory.configureConnectionString(AbstractAzureServiceClientBuilderFactory.java:231)
	at com.azure.spring.cloud.core.implementation.factory.AbstractAzureServiceClientBuilderFactory.configureCore(AbstractAzureServiceClientBuilderFactory.java:152)
	at com.azure.spring.cloud.core.implementation.factory.AbstractAzureAmqpClientBuilderFactory.configureCore(AbstractAzureAmqpClientBuilderFactory.java:58)
	at com.azure.spring.cloud.core.implementation.factory.AbstractAzureServiceClientBuilderFactory.build(AbstractAzureServiceClientBuilderFactory.java:126)
	at com.azure.spring.cloud.autoconfigure.servicebus.AzureServiceBusClientBuilderConfiguration.serviceBusClientBuilder(AzureServiceBusClientBuilderConfiguration.java:50)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	... 20 common frames omitted
Caused by: com.azure.core.management.exception.ManagementException: Status code 403, "{"error":{"code":"AuthorizationFailed","message":"The client '8f455a17-6010-45b5-9e6a-a39d74a64ac0' with object id '8f455a17-6010-45b5-9e6a-a39d74a64ac0' does not have authorization to perform action 'Microsoft.ServiceBus/namespaces/read' over scope '/subscriptions/<some valid subscription id >/resourceGroups/<some valid resource group>/providers/Microsoft.ServiceBus/namespaces/<some valid servicebus namespace>' or the scope is invalid. If access was recently granted, please refresh your credentials."}}"
	at java.lang.invoke.MethodHandle.invokeWithArguments(Unknown Source)
	at com.azure.core.implementation.http.rest.ResponseExceptionConstructorCache.invoke(ResponseExceptionConstructorCache.java:56)
	at com.azure.core.implementation.http.rest.RestProxyBase.instantiateUnexpectedException(RestProxyBase.java:377)
	at com.azure.core.implementation.http.rest.AsyncRestProxy.lambda$ensureExpectedStatus$1(AsyncRestProxy.java:117)
	at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:113)
	at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2398)
	at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:171)
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:2194)
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:2068)
	at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:96)
	at reactor.core.publisher.MonoJust.subscribe(MonoJust.java:55)
	at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64)
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:157)
	at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129)
	at reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137)
	at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129)
	at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129)
	at reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onNext(FluxHide.java:137)
	at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:122)
	at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:79)
	at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816)
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:151)
	at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129)
	at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816)
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:151)
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.complete(MonoIgnoreThen.java:292)
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.onNext(MonoIgnoreThen.java:187)
	at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816)
	at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:249)
	at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816)
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:151)
	at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:129)
	at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1816)
	at reactor.core.publisher.MonoCollect$CollectSubscriber.onComplete(MonoCollect.java:160)
	at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1817)
	at reactor.core.publisher.FluxCallable.subscribe(FluxCallable.java:49)
	at reactor.core.publisher.InternalMonoOperator.subscribe(InternalMonoOperator.java:64)
	at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:157)
	at reactor.core.publisher.SerializedSubscriber.onNext(SerializedSubscriber.java:99)
	at reactor.core.publisher.FluxRetryWhen$RetryWhenMainSubscriber.onNext(FluxRetryWhen.java:174)
	at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:79)
	at reactor.core.publisher.Operators$MonoInnerProducerBase.complete(Operators.java:2664)
	at reactor.core.publisher.MonoSingle$SingleSubscriber.onComplete(MonoSingle.java:180)
	at reactor.core.publisher.MonoFlatMapMany$FlatMapManyInner.onComplete(MonoFlatMapMany.java:260)
	at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:144)
	at reactor.core.publisher.FluxDoFinally$DoFinallySubscriber.onComplete(FluxDoFinally.java:128)
	at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onComplete(FluxMapFuseable.java:152)
	at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1817)
	at reactor.core.publisher.MonoCollect$CollectSubscriber.onComplete(MonoCollect.java:160)
	at reactor.core.publisher.FluxHandle$HandleSubscriber.onComplete(FluxHandle.java:220)
	at reactor.core.publisher.FluxMap$MapConditionalSubscriber.onComplete(FluxMap.java:275)
	at reactor.netty.channel.FluxReceive.onInboundComplete(FluxReceive.java:400)
	at reactor.netty.channel.ChannelOperations.onInboundComplete(ChannelOperations.java:419)
	at reactor.netty.channel.ChannelOperations.terminate(ChannelOperations.java:473)
	at reactor.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:703)
	at reactor.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:93)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:327)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:299)
	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1373)
	at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1236)
	at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1285)
	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:510)
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:449)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:279)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Unknown Source)
	Suppressed: java.lang.Exception: #block terminated with an error
		at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:99)
		at reactor.core.publisher.Mono.block(Mono.java:1707)
		at com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.GroupableResourcesImpl.getByResourceGroup(GroupableResourcesImpl.java:106)
		at com.azure.resourcemanager.resources.fluentcore.arm.collection.implementation.GroupableResourcesImpl.getByResourceGroup(GroupableResourcesImpl.java:28)
		at com.azure.spring.cloud.resourcemanager.implementation.crud.ServiceBusNamespaceCrud.internalGet(ServiceBusNamespaceCrud.java:35)
		at com.azure.spring.cloud.resourcemanager.implementation.crud.ServiceBusNamespaceCrud.internalGet(ServiceBusNamespaceCrud.java:15)
		at com.azure.spring.cloud.resourcemanager.implementation.crud.AbstractResourceCrud.get(AbstractResourceCrud.java:59)
		at com.azure.spring.cloud.resourcemanager.implementation.connectionstring.ServiceBusArmConnectionStringProvider.getConnectionString(ServiceBusArmConnectionStringProvider.java:39)
		at com.azure.spring.cloud.core.implementation.factory.AbstractAzureServiceClientBuilderFactory.configureConnectionString(AbstractAzureServiceClientBuilderFactory.java:231)
		at com.azure.spring.cloud.core.implementation.factory.AbstractAzureServiceClientBuilderFactory.configureCore(AbstractAzureServiceClientBuilderFactory.java:152)
		at com.azure.spring.cloud.core.implementation.factory.AbstractAzureAmqpClientBuilderFactory.configureCore(AbstractAzureAmqpClientBuilderFactory.java:58)
		at com.azure.spring.cloud.core.implementation.factory.AbstractAzureServiceClientBuilderFactory.build(AbstractAzureServiceClientBuilderFactory.java:126)
		at com.azure.spring.cloud.autoconfigure.servicebus.AzureServiceBusClientBuilderConfiguration.serviceBusClientBuilder(AzureServiceBusClientBuilderConfiguration.java:50)
		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
		at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
		at java.lang.reflect.Method.invoke(Unknown Source)
		at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
		at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
		at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
		at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
		at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
		at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
		at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
		at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
		at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
		at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
		at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
		at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
		at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
		at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
		at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147)
		at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734)
		at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
		at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
		at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
		at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)

To Reproduce

Code Snippet
spring.cloud.azure.credential.client-id=<some valid value>
spring.cloud.azure.credential.client-secret=<some valid value>
spring.cloud.azure.profile.tenant-id=<some valid value>
spring.cloud.azure.servicebus.namespace=<some valid value>
spring.cloud.azure.profile.subscription-id=<some valid value>
spring.cloud.azure.servicebus.resource.resource-group=<some valid value>

Expected behavior

Screenshots

Content (please complete the following information if possible):

Additional context

Information Checklist

[ ] Bug Description Added
[ ] Repro Steps Added
[ ] Setup information Added

@VarshaGadekar do you need to create the service bus queue or topic? If not, you could remove the following properties
spring.cloud.azure.profile.subscription-id=<some valid value>
spring.cloud.azure.servicebus.resource.resource-group=<some valid value>

The error is because the service principal isn't authorized to read resources in the given namespace.

I dont want to create queue or topic. The application is either producer or consumer based on business logic for different queues/topics.
spring.cloud.azure.credential.client-id=
spring.cloud.azure.credential.client-secret=
spring.cloud.azure.profile.tenant-id=
spring.cloud.azure.servicebus.namespace=
When I tried to use without resource-group and subscription-id with only above parameters it gives following error:
{"dd.trace_id":"0", "dd.span_id":"0", "thread_id":"reactor-executor-1", "az.sdk.message":"onLinkRemoteClose","connectionId":"MF_26ff17_1667798177941","errorCondition":"amqp:unauthorized-access","errorDescription":"Unauthorized access. 'Listen' claim(s) are required to perform this operation. Resource: 'sb://com-niq-ri-cdar-np-shared-service-bus.servicebus.windows.net/'. TrackingId:c434470f795743a4a3b870381908184e_G17, SystemTracker:gateway7, Timestamp:2022-11-07T05:16:22","linkName":"_f5d972_1667798178172","entityPath":""}
I checked that the client-id, client-secret, tenant-id and namespace are correctly configured and access policy has 'Manage', 'Send', 'Listen' assigned.

Have you assigned the Service Bus Owner/Sender/Receiver role to the service principal https://microsoft.github.io/spring-cloud-azure/current/reference/html/index.html#authorize-access-with-azure-active-directory? @VarshaGadekar

hi @saragluna can you please confirm why Spring Azure Cloud needs to assign above roles with Azure AD?
Because if we directly use Azure APIs it does not need these roles. keyvault Endpoint with tenant-id, client-id and client-secret works and provides us the sas token.

@VarshaGadekar are you storing the sas token in Key Vault?
Put KV aside, if you try to access service bus, there are two approaches: one via the connection string (this will give you the sas token), another is via Azure AD service principals or managed identities (this approach requires the roles).
What did you mean by using Azure APIs directly? What are these APIs and how do you call them?

yes we are using key-vault.
following way with Azure API's worked:
String serviceBusSAS = AzureUtils.getServiceBusSAS(clientId, clientSecret, keyvaultUrl, secretName); com.microsoft.azure.servicebus.QueueClient queueClient = com.microsoft.azure.servicebus.QueueClient( 				new com.microsoft.azure.servicebus.primitives.ConnectionStringBuilder(serviceBusSAS + ";EntityPath=my-test-service-bus-queue", "my-test-service-bus-queue"), 				ReceiveMode.RECEIVEANDDELETE);
once above 	queueClient is created as bean we can use as follows
AzureUtils.sendServiceBusMessage(queueClient, objectMapper.writeValueAsString(fileQueueMessage));
AzureUtils.java has following
import java.time.Duration; import org.springframework.http.MediaType; import com.azure.messaging.servicebus.ServiceBusMessage; import com.azure.messaging.servicebus.ServiceBusSenderClient; import com.microsoft.azure.servicebus.Message;
with method
	public static void sendServiceBusMessage(final ServiceBusSenderClient client, final String content) { 		final ServiceBusMessage message = new ServiceBusMessage(content); 		message.setContentType(MediaType.APPLICATION_JSON_VALUE); 		message.setTimeToLive(Duration.ofMinutes(10)); 		client.sendMessage(message); 	}

Ok got it. The serviceBusSAS is the connection string for the service bus namespace, so in the code you posted the application connects to the service bus using the connection string. The service principal (client id) only needs the role to access the KV.
But if you are connecting to the Service Bus using that service principal, you need to assign it the role I mentioned before.
Another approach is you provide the spring.cloud.azure.servicebus.connection-string property to your application. The property can be saved to the KV using key spring-cloud-azure-servicebus-connectionstring.

yes spring.cloud.azure.servicebus.connection-string is working fine.
However can you please confirm if it is possible for Spring Azure Cloud Stream Binder to not mandate the role Owner/Sender/Receiver with Azure AD?
Can there be some way with spring azure cloud stream binder (may be in future) to use above way which will need only client id?

In my understanding, if you want to connect using an Azure AD user/service principal/managed identity, you need to grant permissions to that identity. Just like how you assign role/access policy to the service principal to access KV.
The request is not coming from the library, it's coming from the Azure Service. Whenever you authenticate the application using an Azure AD identity, the client will request an access token from Azure AD, and then use that token to access the Azure Service. In this process, it reflects how it works with OAuth 2.0, the Azure AD is the authorization server, and the Azure Service is the resource server. The Azure Service's responsibility is to check that the token sent to it has a corresponding role in performing actions.
What do you mean by spring azure cloud stream binder (may be in future) to use above way which will need only client id?

Thank you for providing all details. I was saying if internally spring azure cloud stream binder can provide some way to use service principal and internally it can generate the spring.cloud.azure.servicebus.connection-string with service principle and skipping the Azure AD identity route.

@VarshaGadekar yes, we can provide that by requesting Azure Resource Manager (ARM) for the connection string. But this step requires the service principal to have management roles.

ok thank you @saragluna.

I will close this issue now, please reopen it if you have any other questions.

authors: VarshaGadekar saragluna

repo: microsoft/spring-cloud-azure


text:
Expose time, date, mouse, ideally CPU / GPU / memory utilization to custom HLSL shaders

Description of the new feature/enhancement

Custom shaders rock, but they would rock even more if they were interactive. They simply don't know what's happening outside of the shader. I would love to have my shaders respond to what's happening on the system: for example, have them change color by time of day, or have them act up and be all energetic when CPU utilization is high, and calm down when CPU utilization is low. That would be a totally sweet command prompt.
Proposed technical implementation details (optional)

On the HLSL side, expose additional state in the cbuffer. I don't think this would break existing shaders if we just add items to the end of the cbuffer, but even if it does, hey, it's an experimental feature as someone said. :)
cbuffer PixelShaderSettings {
  float  Time;
  float  Scale;
  float2 Resolution;
  float4 Background;

  // Additional proposed constants

  float4 TimeOfDay;        // .x = hours; .y = minutes; .z = seconds; .w = msecs
  float4 Date;             // .x = year;  .y = month;   .z = day
  float  CpuUtilization;
  float  MemoryUtilization;
  float  GpuUtilization;   // ok, may be a long shot, but would be nice to have
  float2 Mouse;            // Mouse coordinates if mouse is over the window! Interactive pixel shader backgrounds! :)
};

Minor tech note: if fetching cpu / memory / gpu utilization is costly, it's ok to do them every 500ms or so. They don't need to be per-frame.

Funny that, even though not quite related, the first thought I had about this is #3459, which also requires time, date, etc.

repo: microsoft/terminal