text:
Cannot find WinForm Form Dialog triggered from Word Add-In

Hello,
I'm using WinAppDriver driven by Appium, trying to test a Word Add-In WinForms application, currently running into an issue trying to locate a dialog that appears.
The issue: We have a Microsoft Word COM Add-In that has a button on it that we use to open up a Form Dialog (calling xxx.ShowDialog(this). We have been using the both sessions and the wordElement callingxxxSession.FindByName, xxxSession.FindByAccessibilityId, xxxSession.FindByXpath, and xxxSession.FindByClass but still cannot find it.
I have opened up Inspect.exe and can hover over the dialog and it will bring show properties of the Dialog (confirming the Name and AutomationId and other values like Children controls and it's Ancestors), it does not show where it this element exists in the TreeView view of Inspect.exe which is on the left hand side.
Has anyone had this issue?
//This is how we are setting up the Sessions:
WindowsDriver<WindowsElement> driverWinWord;
WindowsDriver<WindowsElement> driverDesktop;
AppiumOptions optionsWinWord;
AppiumOptions optionsDesktop;

optionsWinWord = new AppiumOptions();
optionsWinWord.AddAdditionalCapability("app", "winword");
optionsWinWord.AddAdditionalCapability("appArguments", fileName);
optionsWinWord.AddAdditionalCapability("ms:waitForAppLaunch", "6");

driverWinWord = new WindowsDriver<WindowsElement>(new Uri(url), optionsWinWord);

optionsDesktop = new AppiumOptions();
optionsDesktop.AddAdditionalCapability("app", "Root");

driverDesktop = new WindowsDriver<WindowsElement>(new Uri(url), optionsDesktop);

var wordElement = driverWinWord.FindElementByClassName("OpusApp");

We have tried calling FindXXX within retry logic and tried using Appiums WebDriverWait technique in case it needed more time to find the element.
I have also looked at the PageSource of both of our sessions and cannot see the dialog in the XML, so I am pretty confident it isn't a timing issue, just that WAD cannot see it (even though Inspect.exe sees it, but just doesn't know where it is with regards to the rest of the controls on the desktop).
Any advice?
Let me know if you need some more information.

Get a WindowsElement to the word document
Navigate xml search for the popup relative to than element
I generally search by window title, rather than class

Thanks for getting back to me. We already get a WindowsElement for the instance of Word, can you show me what you mean to do an XML Search? Or do you mean XPath?

My guess based on
driverWinWord = new WindowsDriver(new Uri(url), optionsWinWord);
is
popupWindow = driverWinWord.FindElementByName(popupName) as WindowsElement;

At the moment we are unable to find this element within our session (I have tried FindByName, FindByAccessibilityId, FindByClass etc).

We are already trying this.

", it does not show where it this element exists in the TreeView view of Inspect.exe which is on the left hand side." Do you mean that inspect does not show the element.

Its not the entire code base, but it should get you started.
You will have to prune away the sanity checks (window visible etc)
 parentWindowName is the title of the word document being edited.
     for the file SpellCheck.docx is would be "SpellCheck.docx - Word"
StrWindowClass is the class name of the popup
    for the spell check popup it is "bosa_sdm_msword"
popupName is the name of the popup
    for spell check it is "Spelling: English (United States)"

GetRootWindow returns a WindowsElement to the Word application relative to the root

  public static WindowsElement FindClassPopupWindow(string parentwindowName,
                                                      string strWindowClass,
                                                      string popupName,
                                                      Int32 intDelayInSeconds)
  {
     Boolean bIsVisible;
     IntPtr intHandle;
     WindowsElement CreateNewProjectWindow;
     WindowsElement popupWindow;
     Int32 intTimeout;
     Int32 loopCount;
     Int32 loopLimit;

     bIsVisible = GuiTestUtilities.GuiRootAccess.IsRootWindowVisible(parentwindowName, 16);
     Assert.IsTrue(bIsVisible, "Root window not visible " + parentwindowName);

     intHandle = Utilities.OSWindowApi.FindClassPopUp(parentwindowName,
                                                      strWindowClass,
                                                      popupName);
     Assert.AreNotEqual(0, intHandle, "Popup window not visible" + popupName);

     Utilities.OSWindowApi.SetWindowFocus(intHandle);
     intTimeout = intDelayInSeconds + 10;
     CreateNewProjectWindow = GetRootWindow(parentwindowName, intTimeout);
     Assert.IsNotNull(CreateNewProjectWindow);

     loopCount = 0;
     loopLimit = (intDelayInSeconds + 2) / 3;
     popupWindow = null;
     while ((popupWindow == null) && (loopCount < loopLimit))
     {
        try
        {
           popupWindow = CreateNewProjectWindow.FindElementByName(popupName) as WindowsElement;
        }
        catch
        {
           loopCount += 1;
           popupWindow = null;

        }
     }
     return (popupWindow);

  }

", it does not show where it this element exists in the TreeView view of Inspect.exe which is on the left hand side." Do you mean that inspect does not show the element.

In the Inspect.exe tool there is a Left and Right view, the Left is a Treeview of all the controls laid out as a tree (parent > child etc), on the right is information about a highlighted tool. When I hover over the dialog I have information appearing about the dialog element in the Right  view, but not in the Left (as in it cannot show me who the parent element is).
Below is an example of an element appearing correctly in both left and right views (it is the "Paste" button in MSWord)

For our dialog it does not show or highlight it in the left view. I have tried going through each node and it is not there. However I can see information about it in the right hand control
Hope that makes sense?

Its not the entire code base, but it should get you started. You will have to prune away the sanity checks (window visible etc)
 parentWindowName is the title of the word document being edited.
     for the file SpellCheck.docx is would be "SpellCheck.docx - Word"
StrWindowClass is the class name of the popup
    for the spell check popup it is "bosa_sdm_msword"
popupName is the name of the popup
    for spell check it is "Spelling: English (United States)"

GetRootWindow returns a WindowsElement to the Word application relative to the root

  public static WindowsElement FindClassPopupWindow(string parentwindowName,
                                                      string strWindowClass,
                                                      string popupName,
                                                      Int32 intDelayInSeconds)
  {
     Boolean bIsVisible;
     IntPtr intHandle;
     WindowsElement CreateNewProjectWindow;
     WindowsElement popupWindow;
     Int32 intTimeout;
     Int32 loopCount;
     Int32 loopLimit;

     bIsVisible = GuiTestUtilities.GuiRootAccess.IsRootWindowVisible(parentwindowName, 16);
     Assert.IsTrue(bIsVisible, "Root window not visible " + parentwindowName);

     intHandle = Utilities.OSWindowApi.FindClassPopUp(parentwindowName,
                                                      strWindowClass,
                                                      popupName);
     Assert.AreNotEqual(0, intHandle, "Popup window not visible" + popupName);

     Utilities.OSWindowApi.SetWindowFocus(intHandle);
     intTimeout = intDelayInSeconds + 10;
     CreateNewProjectWindow = GetRootWindow(parentwindowName, intTimeout);
     Assert.IsNotNull(CreateNewProjectWindow);

     loopCount = 0;
     loopLimit = (intDelayInSeconds + 2) / 3;
     popupWindow = null;
     while ((popupWindow == null) && (loopCount < loopLimit))
     {
        try
        {
           popupWindow = CreateNewProjectWindow.FindElementByName(popupName) as WindowsElement;
        }
        catch
        {
           loopCount += 1;
           popupWindow = null;

        }
     }
     return (popupWindow);

  }

Ok great thank you. I will see if this helps and will report back.

", it does not show where it this element exists in the TreeView view of Inspect.exe which is on the left hand side." Do you mean that inspect does not show the element.

In the Inspect.exe tool there is a Left and Right view, the Left is a Treeview of all the controls laid out as a tree (parent > child etc), on the right is information about a selected/highlighted element. When I hover over the dialog I have information appearing about the dialog element in the Right view (like Name, ControlType, AutomationId, ClassName etc etc), but not in the Left (as in it cannot show me who the parent element is).
Below is an example of an element appearing correctly in both left and right views (it is the "Paste" button in MSWord)  For our dialog it does not show or highlight it in the left view. I have tried going through each node and it is not there. However I can see information about it in the right hand control
Hope that makes sense?

Apologies for stupid question, but did you try using the refresh button in inspect.

It do not particularly like using Inspect or Accessibility Insights.
Sometime it is necessarily to get the actual XML time synchronous with the execution of the testing code. (ie what Inspect see and what your test code sees may be different)
You can dump the session XML using
  public static void SaveSourceToFile(WindowsDriver<WindowsElement> session,
                                      string strFile)

  {
     bool bExists;
      var source = session.PageSource;

     Assert.AreNotEqual(source.Length, 0);

     bExists = Utilities.OSFileUtilities.DoesFileExist(strFile);
     if (bExists)
     {
        Utilities.OSFileUtilities.DeleteFile(strFile);
     }

     System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
     System.Xml.XmlTextWriter w = new System.Xml.XmlTextWriter(strFile,
                                                              System.Text.Encoding.BigEndianUnicode);
     xmlDoc.LoadXml(source);

     xmlDoc.WriteTo(w);
     w.Close();

  }

It do not particularly like using Inspect or Accessibility Insights. Sometime it is necessarily to get the actual XML time synchronous with the execution of the testing code. (ie what Inspect see and what your test code sees may be different)
You can dump the session XML using
  public static void SaveSourceToFile(WindowsDriver<WindowsElement> session,
                                      string strFile)

  {
     bool bExists;
      var source = session.PageSource;

     Assert.AreNotEqual(source.Length, 0);

     bExists = Utilities.OSFileUtilities.DoesFileExist(strFile);
     if (bExists)
     {
        Utilities.OSFileUtilities.DeleteFile(strFile);
     }

     System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
     System.Xml.XmlTextWriter w = new System.Xml.XmlTextWriter(strFile,
                                                              System.Text.Encoding.BigEndianUnicode);
     xmlDoc.LoadXml(source);

     xmlDoc.WriteTo(w);
     w.Close();

  }

Amazing thank!!

@DLightstone so for the above attached code FindClassPopup() I have assumed the line Utilities.OSWindowApi.SetWindowFocus(intHandle); is essentially:
[DllImport("user32.dll")]
public static extern bool SetForegroundWindow(IntPtr hWnd);

Is that correct?
At the moment I am struggling with what is: Utilities.OSWindowApi.FindClassPopUp(parentwindowName, strWindowClass,popupName);.
Are you able to share some light what these do please, I am trying to follow your example to find the dialog form. Cheers

FindClassPopUp is part of the sanity checks
It get the Windows window handle to the popup
you can eliminate the sanity checks
 bIsVisible = GuiTestUtilities.GuiRootAccess.IsRootWindowVisible(parentwindowName, 16);
 Assert.IsTrue(bIsVisible, "Root window not visible " + parentwindowName);

 intHandle = Utilities.OSWindowApi.FindClassPopUp(parentwindowName,
                                                  strWindowClass,
                                                  popupName);
 Assert.AreNotEqual(0, intHandle, "Popup window not visible" + popupName);

 Utilities.OSWindowApi.SetWindowFocus(intHandle);

=======================

@DLightstone  Ah I see! Thank you for confirming that.

@DLightstone apologies for not getting back to this sooner, with the holidays and ramping back up into work only just getting a chance to get back to you.
Unfortunately approach didn't make the difference. I appreciate the process that this code is essentially refreshing our Driver when there are changes made to the UI (like in my scenario the new Dialog box). However I was still unable to locate the Dialog using this.
Does anyone have any other ideas?

To dump the XML just before you want to look for the popup.
using  public static void SaveSourceToFile(WindowsDriver session,
string strFile)
See which windows are visible.

I will do that now.

Thank you @DLightstone for your assistance.
Finally figured out what was going on (well sort of) - essentially the framework we use to create a COM Add-In (AddinExpres) seemed to be sandboxing the dialog so we could never see or access it through Appium. Basically the way we instantiated the dialog it seemed to appear underneath the AddinExpress panel, however by calling the instantiation code in a different way was able to run it so that it would appear in Word as a control that I could access via Appium.
I think I may raise this with the framework and see if they can provide me with a reason it didn't work the original way.

@hicks86
Good to learn that.
I also made some discoveries.
In particular locating Word Documents via the document title (ie document name) is not a good idea.
Seems Microsoft used the title to convey status information as part of the title.
If you search on the document name only you may not find anything
To locate popups,  I decided FindByClass (of the popup) is more reliable

Ah yes @DLightstone  we have since moved away from trying to find it by name and do so via FindByClass() as well.
Thank you again I have learnt a fair bit during this invetigation proces aswell!!

repo: microsoft/WinAppDriver


text:
Single project msix can't load assets from project reference

Describe the bug
Single project msix can't load assets from project reference, including XBF and images.
Steps to reproduce the bug

Steps to reproduce the behavior:

Create a single project WinUI project, do some necessary modification, and verify it works.
Create a class library project, with a UserControl in it. Do necessary modification to make it builds.
Add the user control to main window. Build and run the app.
Throws XamlParseException that can't load XBF for the UserControl.

Expected behavior
Runs without exception.
Version Info

NuGet package version:
[Microsoft.WindowsAppSDK 1.0.0-preview3]

Windows version
Saw the problem?

19043
Yes

Additional context
It's not specific for XBF. Asset images from class library project don't load neither.
It reproduces on platform-ed and AnyCPU (with workaround) class library.

Duplicate of internal bug http://task.ms/36600654 which is assigned to @ryalanms.

Closing as we've fixed this in the upcoming 1.0 GA release!

source: gharchive/issue

authors: andrewleader evelynwu-msft huoyaoyuan

repo: microsoft/WindowsAppSDK

license: MIT

license_type: permissive

license_source: github-api


text:
[0.8 Preview] Builds failing with latest VS 16.10

We've discovered an incompatibility with 0.8 Preview and the latest VS 16.10 release (which is no longer Preview), which results in a build-time error when trying to build some WinUI 3 projects.
This seems to only affect 0.8 Preview as far as we're aware.
We've identified one or two issues and are working on a fix, if you run into this, please share your error!

I don't know if this is related or not, but 16.10/16.11 preview throws some xaml compilation errors I haven't been able to identify causes for... I originally opened an issue on winui repo looking for help tracking it down (I'm not 100% convinced it's not something stupid I'm doing, but I haven't figured out a cause yet), but this may be a better place for it: https://github.com/microsoft/microsoft-ui-xaml/issues/5143#issue-910809106

Hey @jmiddour, any chance you could try out the new 0.8 RC and see if your issue still repros? The updated NuGet packages are attached to the bottom of the GitHub Release here: https://github.com/microsoft/ProjectReunion/releases/tag/v0.8.0-rc

@andrewleader I confirmed the issue still repros.  Here's the stacktrace after doing a build -v:d:
       Using "CompileXaml" task from assembly "C:\Users\userid\.nuget\packages\microsoft.projectreunion.winui\0.8.0-rc\buildTransitive\..\tools\Microsoft.UI.Xaml.Markup.Compiler.dll".
       Task "CompileXaml"
         Xaml Compiler Marker: 5:08:56 PM: 522 perfXC_StartPass1, organizationWinuiApplication
         Xaml Compiler Marker: 5:08:56 PM: 540 perfXC_FingerprintCheck, Reference Assemblies Fingerprint Changed
         Xaml Compiler Marker: 5:08:56 PM: 541 perfXC_CreatingTypeUniverse
         Xaml Compiler Marker: 5:08:56 PM: 542 perfXC_CreatedTypeUniverse
         Xaml Compiler Marker: 5:08:56 PM: 544 perfXC_CreatingSchemaContext
   1:7>C:\Users\userid\.nuget\packages\microsoft.projectreunion.winui\0.8.0-rc\buildTransitive\Microsoft.UI.Xaml.Markup.Compiler.interop.targets(465,9): Xaml Internal Error error WMC9999: Operation is not supported on this platform. [C:\Repos\organization.WinNativeApp\src\working\templates\organizationWinuiApplication\organizationWinuiApplication\organizationWinuiApplication.csproj]
            at System.Runtime.InteropServices.RuntimeEnvironment.GetRuntimeInterfaceAsObject(Guid clsid, Guid riid) in System.Runtime.InteropServices.dll:token 0x6000048+0x5
            at System.Reflection.Adds.MetadataDispenser.GetDispenserShim() in Microsoft.UI.Xaml.Markup.Compiler.dll:token 0x60012e9+0x1f
            at System.Reflection.Adds.MetadataDispenser.OpenFileAsFileMapping(String fileName) in Microsoft.UI.Xaml.Markup.Compiler.dll:token 0x60012eb+0x8
            at Microsoft.UI.Xaml.Markup.Compiler.Lmr.Loader.OpenMetadataFile(String filename) in Microsoft.UI.Xaml.Markup.Compiler.dll:token 0x6001c73+0x1
            at Microsoft.UI.Xaml.Markup.Compiler.Lmr.Loader.ReadAssemblyFromFile(String file) in Microsoft.UI.Xaml.Markup.Compiler.dll:token 0x6001c75+0x1
            at Microsoft.UI.Xaml.Markup.Compiler.Lmr.XamlTypeUniverse.LoadAssemblyFromFile(String path) in Microsoft.UI.Xaml.Markup.Compiler.dll:token 0x6001ffd+0xe
            at Microsoft.UI.Xaml.Markup.Compiler.CompileXamlInternal.TryLoadAssembly(String reference) in Microsoft.UI.Xaml.Markup.Compiler.dll:token 0x60013df+0x1b
            at Microsoft.UI.Xaml.Markup.Compiler.CompileXamlInternal.LoadAssembly(String reference) in Microsoft.UI.Xaml.Markup.Compiler.dll:token 0x60013de+0x1
            at Microsoft.UI.Xaml.Markup.Compiler.CompileXamlInternal.LoadAssemblyItem(String item, Boolean isSystemAssembly) in Microsoft.UI.Xaml.Markup.Compiler.dll:token 0x60013dd+0x9
            at Microsoft.UI.Xaml.Markup.Compiler.CompileXamlInternal.LoadAssemblyItems(List`1 referenceAssemblies, Boolean isSystemAssembly) in Microsoft.UI.Xaml.Markup.Compiler.dll:token 0x60013dc+0x1a
            at Microsoft.UI.Xaml.Markup.Compiler.CompileXamlInternal.LoadSchemaContext() in Microsoft.UI.Xaml.Markup.Compiler.dll:token 0x60013e7+0x17
            at Microsoft.UI.Xaml.Markup.Compiler.CompileXamlInternal.DoExecute() in Microsoft.UI.Xaml.Markup.Compiler.dll:token 0x60013d9+0x243
         Xaml Compiler Marker: 5:08:56 PM: 568 perfXC_EndPass1, organizationWinuiApplication

@jmiddour thanks for confirming it still hits on 0.8 RC. I think the bug that you filed is the best place to continue this, I pinged a couple folks.

This is still an issue with 0.8 stable.
I just do dotnet build on the default sample. Actual building inside the VS is working. I have hopes start poking with NativeAOT and WinUI, but that's need working CLI build first.

Closing this old issue. If anyone still has remaining issues, please open or re-ping a different thread.
dotnet build is not supported yet as we still have msbuild dependencies.

authors: andrewleader jmiddour kant2002


text:
How to "Got to line number 1234"?

I now that XML is not "thinking" in lines, but sometimes I have the same XML opened in XMLNotepad and in a pure texteditor where I know that my cursor is now in line number 1234.
It would be nice (but not the most important thing) to have a feature for "Goto Line number xy" too.

nice idea.

I added Ctrl+G in this pull request in case you want to try it out:
https://github.com/microsoft/XmlNotepad/pull/251

Hi Chris
is there a link to download the msi / exe / .. ?
I don't know how to use these Githb features..

XmlNotepad.zip
I uploaded a zip file right here in this comment.  Let me know how it goes, thanks.

Fixed in https://github.com/microsoft/XmlNotepad/releases/tag/2.9.0.0

authors: Pierre-de-la-Verre lovettchris

repo: microsoft/XmlNotepad


text:
Fix CredScan violations

Details
Fix CredScan violations
Motivation
Remove from webpack module with CredScan violations
Pull request checklist

[ ] Addresses an existing issue: Fixes #0000
[ ] Added relevant unit test for your changes. (yarn test)
[ ] Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
[ ] Ran precheckin (yarn precheckin)

Codecov Report

Merging #567 (9a72769) into main (3c65bdd) will not change coverage.
The diff coverage is n/a.

:exclamation: Current head 9a72769 differs from pull request most recent head 3f9e82e. Consider uploading reports for the commit 3f9e82e to get more accurate results

@@           Coverage Diff           @@
##             main     #567   +/-   ##
=======================================
  Coverage   85.59%   85.59%
=======================================
  Files          23       23
  Lines         486      486
  Branches       30       30
=======================================
  Hits          416      416
  Misses         69       69
  Partials        1        1

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 3c65bdd...3f9e82e. Read the comment docs.

source: gharchive/pull-request

authors: codecov-commenter lamaks

repo: microsoft/accessibility-insights-action


text:
Correcting argument name of error output

This PR fixes the argument name in the following error message:

Error: If keystore is used, all of the following arguments must be set: --store-file, --store-password, --key-alias, --key-password

--store-file argument name is no more used, so it has been replaced with correct argument name --store-path.

/azp run

authors: AnatolyPristensky DmitriyKirakosyan

repo: microsoft/appcenter-cli


text:
Define controllers version with application json file

Hello,
I want to test the ASP.NET Core example with OData API Explorer (https://github.com/microsoft/aspnet-api-versioning/tree/master/samples/aspnetcore/SwaggerODataSample))
Is it possible to define the version of the controllers at the level of Startup.cs (to recover in a file json of configuration).
I want to use only one version in the code and set the version number in an appsettings.json file.

Yes - this is possible. This can be achieved using the Conventions API. There are number of variations shown in the wiki or you can also look at the Conventions Example. You can load your versions from a file and apply them with the fluent API or you can create your own convention that is configured to read the API versions from the file to apply them.

I wish to be able to modify the url of the swagger:
options.SwaggerEndpoint($"/swagger/{description.GroupName}/swagger.json", description.GroupName.ToUpperInvariant());
If I modify description.GroupName by my version variable it does not work anymore.
How can I do ?

I found a solution that works in my case where I want to register the version that is in a json file :
services.AddApiVersioning(
o =>
{
o.AssumeDefaultVersionWhenUnspecified = true;
o.DefaultApiVersion = new ApiVersion(MajorVersion, MinorVersion);
o.ReportApiVersions = true;
});
NB: I only use one version for my controllers.

repo: microsoft/aspnet-api-versioning


text:
How to update ChromaDB after documents in the 'docs' folder have been updated?

How to update ChromaDB after documents in the 'docs' folder have been updated? Currently, I clear the 'ChromaDB' folder and wait for it to re-index. Is there any other function or method for a direct update?
When I modify the document and rerun the code, it shows a message: 'Number of requested results 20 is greater than the number of elements in index 2, updating n_results = 2,' but, in reality, it doesn't use my latest version of 'docs

I believe @thinkall can help here.

Hi @xianzhisheng , could you upgrade pyautogen to the latest version and set get_or_create to be True?
    retrieve_config={
        "task": "qa",
        "docs_path": corpus_file,
        "get_or_create ": True,
    },

authors: qingyun-wu thinkall xianzhisheng

repo: microsoft/autogen


text:
Add support for system message in Claude Notebook

Why are these changes needed?
Claude example does not yet support system message. This PR add support for system message of Anthropic API.

Related issue number
#2246

Checks

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

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 36.31%. Comparing base (46bee1f) to head (04a2305).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2280      +/-   ##
==========================================
- Coverage   38.17%   36.31%   -1.86%
==========================================
  Files          78       78
  Lines        7812     7812
  Branches     1669     1669
==========================================
- Hits         2982     2837     -145
- Misses       4581     4736     +155
+ Partials      249      239      -10

Flag
Coverage Δ

unittests
36.31% <ø> (-1.85%)
:arrow_down:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

authors: codecov-commenter levscaut


text:
[FEATURE_REQ] Support pre-definition for Spring Apps maven plugin

Plugin name and version
azure-spring-apps-maven-plugin, 1.17.0
Plugin configuration in your pom.xml
<plugin>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-spring-apps-maven-plugin</artifactId>
    <version>1.17.0</version>
    <configuration>
        <appName>customers-service</appName>
        <isPublic>false</isPublic>
        <deployment>
            <cpu>1</cpu>
            <memoryInGB>1</memoryInGB>
            <instanceCount>1</instanceCount>
            <runtimeVersion>Java 17</runtimeVersion>
        </deployment>
    </configuration>
</plugin>

Expected behavior
The node configuration of the maven plugin azure-spring-apps-maven-plugin .
The configuration of the Maven plugin can define default configuration items or deployment items. When executing xxx:config, if the user does not want to use the default value, give a new value, such as <appName>customers-service</appName>, <runtimeVersion>Java 17</runtimeVersion>, etc. When saving into the POM file, all configured configurations will be merged into the maven plugin configuration node.
Actual behavior
Will skip config the module if there's a pre-definition for the Spring apps maven plugin.
Steps to reproduce the problem

Clone code https://github.com/Azure-Samples/spring-petclinic-microservices

Navigate to the sample project directory, and add the below plugin for the customer module:
<plugin>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-spring-apps-maven-plugin</artifactId>
    <version>1.17.0</version>
    <configuration>
        <appName>customers-service</appName>
        <isPublic>false</isPublic>
        <deployment>
            <cpu>1</cpu>
            <memoryInGB>1</memoryInGB>
            <instanceCount>1</instanceCount>
            <runtimeVersion>Java 17</runtimeVersion>
        </deployment>
    </configuration>
</plugin>

Execute mvnw com.microsoft.azure:azure-spring-apps-maven-plugin:1.17.0:config to configure all the sub-modules to ASA, it will skip the module customer.

@moarychan Thanks for your report and sorry for the late response, currently spring apps maven plugin does not support modify existing configuration, but if you want to set cpu/memory during config, you may add -DadvancedOptions, here is the screen shot

repo: microsoft/azure-maven-plugins


text:
[BUG]: launching self-hosted agent from powershell core prompt causes powershell-based tasks to fail

What happened?
I provisioned a new self-hosted agent and ran it interactively using ./run.cmd from a pwsh prompt in my system. All jobs containing a powershell based task fail with obscure error messages:
See: https://jessehouwing.net/vsbuild-task-fails-on-self-hosted-azure-pipelines-agent/
Turns out this is caused by launching the agent from a powershell core prompt. Stopping the agent and starting it from PowerShell 5.1 or from a Windows Shell solves the issue. Would be nice if the agent detected this and would fail to start with a proper error message.
Versions
Azure DevOps Service
Windows 11 version 22H2 (0S Build 22621.2283)
Azure Pipelines Agent 3.225.0
VSBuild task: 1.214.0
Environment type (Please select at least one enviroment where you face this issue)

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

Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Windows 11 version 22H2 (0S Build 22621.2283)
Version controll system
Git
Relevant log output
2023-09-18T13:24:55.1897667Z ##[section]Starting: VSBuild
2023-09-18T13:24:55.2042232Z ==============================================================================
2023-09-18T13:24:55.2042611Z Task         : Visual Studio build
2023-09-18T13:24:55.2042705Z Description  : Build with MSBuild and set the Visual Studio version property
2023-09-18T13:24:55.2042827Z Version      : 1.214.0
2023-09-18T13:24:55.2042907Z Author       : Microsoft Corporation
2023-09-18T13:24:55.2042985Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/visual-studio-build
2023-09-18T13:24:55.2043127Z ==============================================================================
2023-09-18T13:24:56.8956825Z ##[error]The following error occurred while loading the extended type data file: Error in TypeData "System.Security.AccessControl.ObjectSecurity": The member AuditToString is already present.
Error in TypeData "System.Security.AccessControl.ObjectSecurity": The member AccessToString is already present.
Error in TypeData "System.Security.AccessControl.ObjectSecurity": The member Sddl is already present.
Error in TypeData "System.Security.AccessControl.ObjectSecurity": The member Access is already present.
Error in TypeData "System.Security.AccessControl.ObjectSecurity": The member Group is already present.
Error in TypeData "System.Security.AccessControl.ObjectSecurity": The member Owner is already present.
Error in TypeData "System.Security.AccessControl.ObjectSecurity": The member Path is already present.

2023-09-18T13:24:57.0291684Z ##[error]The 'ConvertTo-SecureString' command was found in the module 'Microsoft.PowerShell.Security', but the module could not be loaded. For more information, run 'Import-Module Microsoft.PowerShell.Security'.
2023-09-18T13:24:57.0552980Z ##[section]Finishing: VSBuild

Hi @jessehouwing, could you set the AZP_AGENT_CLEANUP_PSMODULES_IN_POWERSHELL pipeline variable / agent environment variable to true and run your pipeline again?

AZP_AGENT_CLEANUP_PSMODULES_IN_POWERSHELL

I set it as an environment variable in the pwsh promt, but that works!

@jessehouwing, let me close this issue for now. Feel free to reopen it or open a new issue if you have more questions.

It's still a but I need to enable an agent knob for it to work normally :). I'd at least expected a warning in the logs upon launching the agent.

Not working when running as a service with agent v 3.230.0

Hi @jessehouwing, could you set the AZP_AGENT_CLEANUP_PSMODULES_IN_POWERSHELL pipeline variable / agent environment variable to true and run your pipeline again?

Hi @DenisRumyantsev! Could you help me? How can I set this var correctly?
I do that in this way:
pool:
  name: mypool

variables:
  AZP_AGENT_CLEANUP_PSMODULES_IN_POWERSHELL: 'true'

steps:

  - powershell: |
      $env:Path
    displayName: 'Print paths'

but still receive an error.
What am I doing wrong? How can I specify env variable for agent (can I) ?

Hi @jessehouwing, could you set the AZP_AGENT_CLEANUP_PSMODULES_IN_POWERSHELL pipeline variable / agent environment variable to true and run your pipeline again?

Hi @DenisRumyantsev! Could you help me? How can I set this var correctly? I do that in this way:
pool:
  name: mypool

variables:
  AZP_AGENT_CLEANUP_PSMODULES_IN_POWERSHELL: 'true'

steps:

  - powershell: |
      $env:Path
    displayName: 'Print paths'

but still receive an error. What am I doing wrong? How can I specify env variable for agent (can I) ?

I've had to set it in the systems environment variables, then had to restart the agent.

authors: DenisRumyantsev WizMe-M endorria jessehouwing

repo: microsoft/azure-pipelines-agent


text:
Replace deprecated 'sonarqube' command with 'sonar'

With version 3.5 of org.sonarqube, the command sonarqube was deprecated in favour of sonar.
This results in deprecation warnings within the pipeline as soon as a version above 3.5 is selected for sonarQubeGradlePluginVersion (Source: https://sonarsource.atlassian.net/browse/SONARGRADL-93). This PR remedies that.

@microsoft-github-policy-service agree company="Technische Informationssysteme GmbH"

But I think this PR will not fix the deprecation warning when sqGradlePluginVersionChoice=build and the SonarQube Gradle plugin version defined in the build configuration is above 3.5.0. However, I do not know how to fix this as the plugin version of the Gradle configuration file is not available in the pipeline.

@aleksandrlevochkin is there any way to review this change? We are already past the one-year anniversary ;)


text:
Artifacts do not download on multi stage yaml build using DownloadPipelineArtifactV2

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

Server - Azure Pipelines

account name: lambda3
team project name: sdk
build definition name: template
build number: buildid: 12494

Agent - Hosted:

agent queue name: Default
OS of the machine running the agent and the agent version: Windows, agent version 2.155.1

Issue Description
When you try to download the artifacts on a multi stage build definition using the DownloadPipelineArtifactV2 task it will only download the artifacts from the first stage. In my scenario I have 3 stages, and I product the artifacts on the second stage, while the first stage only has a code coverage artifact. What I've seen is that the code coverage artifacts (1st stage) download, while the ones from the 2nd stage don't.
Note: I am using a self hosted agent, and I noted that the artifacts were not being removed between each build, which created problems, as leftover artifacts from previous builds were still around. So, I had the idea of downloading the artifacts to the Agent.TempDirectory, so it would be removed for sure.
This was all on a deployment stage.
If you let the download happen naturally, it will download all the artifacts, the problem only happens when you use the DownloadPipelineArtifactV2 task directly.
I also noticed that the Build Summary shows no artifacts for the second stage, it only shows one artifact for the 1st stage. But the artifacts tab does show all 3 artifacts.
Task logs
These are the partial logs for the download of the last two artifacts, named vsix and nupkg:
Information, Start downloading artifact - vsix
Information, Minimatch patterns: [**]
Information, Filtered 1 files from the Minimatch filters supplied.
Information, Could not initialize dataport.
Information, Downloaded 0.0 MB out of 0.1 MB (0%).
Information, Downloaded 0.1 MB out of 0.1 MB (100%).
Information,
Download statistics:
Total Content: 0.1 MB
Physical Content Downloaded: 0.1 MB
Compression Saved: 0.0 MB
Local Caching Saved: 0.0 MB
Chunks Downloaded: 1
Nodes Downloaded: 0

Information, Start downloading artifact - nupkgs
Information, Minimatch patterns: [**]
Information, Filtered 1 files from the Minimatch filters supplied.
Information, Could not initialize dataport.
Information, Downloaded 0.0 MB out of 0.0 MB (0%).
Information, Downloaded 0.0 MB out of 0.0 MB (100%).
Information,
Download statistics:
Total Content: 0.0 MB
Physical Content Downloaded: 0.0 MB
Compression Saved: 0.0 MB
Local Caching Saved: 0.0 MB
Chunks Downloaded: 1
Nodes Downloaded: 0

I'm seeing what I can only imagine is the same problem.
- download: current
  displayName: 'Download Scripts'
  artifact: Topic
  patterns: '@(SetBranchName|StopAppPool).ps1'

In this case the new version of StopAppPool.ps1 included a bug that was picked up in code review, but somehow succeeded in the build pipeline. I determined that this was because the file had already been downloaded by a previous run to the agent, and when downloaded again it was not replaced.
This seems like a fairly serious problem if older files could be run or referenced by newer builds.
Logs:
Download from the specified build: #31512
Download artifact to: D:\_work\2/Topic
Information, DedupManifestArtifactClient will correlate http requests with X-TFS-Session dd19eddf-ef99-4fe8-a1d0-95af501bf76f
Information, Minimatch patterns: [@(SetBranchName|StopAppPool).ps1]
Information, ArtifactHttpRetryMessageHandler.SendAsync: https://vsblobprodsu6weu.vsblob.visualstudio.com/A5fa85633-6985-41ba-aea7-07750da8fd2b/_apis/dedup/chunks/9AAB181E66DF90A0E055E64EAA06683EB5FBD773FF7B59357A6760E31B7BEFB101 attempt 1/6 failed with StatusCode RedirectMethod, IsRetryableResponse False
Information, Filtered 2 files from the Minimatch filters supplied.
Information, Could not initialize dataport.
Information, Downloaded 0.0 MB out of 0.0 MB (0%).
Information, Downloaded 0.0 MB out of 0.0 MB (100%).
Information,
Download statistics:
Total Content: 0.0 MB
Physical Content Downloaded: 0.0 MB
Compression Saved: 0.0 MB
Local Caching Saved: 0.0 MB
Chunks Downloaded: 2
Nodes Downloaded: 0

@giggio I cannot repro the issue you mentioned. In my pipeline, I have stage 1 with build and pipeline artifacts published, in the stage 2, I have another build and pipeline artifact published and in the stage 3, I have a download pipeline artifact V2 task and it will download both build artifacts and pipeline artifacts if the multi-download  mode is selected.
One thing to note is that, The jobs by default does NOT run in order, you will need to select dependencies. For in example, in this case, in the stage 3, I need to specify that the stage 1 and 2 are the dependencies.

I've been experiencing this problem today as well. If an artifact has previously been downloaded by the agent, it is used in the subsequent stages instead of the latest being downloaded.  Even though when you view the artifact in Azure DevOps, it shows the files as they should be.
In my case, I had renamed 2 files.  The artifact in Azure DevOps looked ok, with the 2 new filenames being present, but when the job was running, it was using the older artifact version with the 2 old filenames.  The solution for me was to log into each agent's work folder and delete the cached version.

@giggio Are you still seeing the issue after adding dependencies? If so, can you provide your sample build def/yaml schema?
@TabithaLarkin @giggio
Regarding the old artifacts not being deleted in the agent, In the DPA V2 task, the default download directory is working directory and by design it won't get cleaned up when running a new build.

@GarethOates I'm not sure I understand the scenario you described. Can you provide a sample build definition/ yaml schema of the issue you ran into?

Sorry, I should have been a bit clearer about what my particular scenario is with regards to the 'build' and 'deploy' steps.
name: $(BuildDefinitionName).$(Build.SourceBranchName)$(Rev:.r)
trigger:
  batch: true
  branches:
    include:
    - master

stages:
- stage: BUILD
  jobs:
  - job: GetFiles
    displayName: Fetch the Template Files
    pool:
      vmImage: 'ubuntu-16.04'
    steps:
    - publish: $(System.DefaultWorkingDirectory)
      artifact: documents

- stage: TEST
  displayName: Deploy to TEST
  variables:
    SiteUrl: 'http://oursharepointarea.com/dokumenter'
    InnholdLibrary: 'DokumentMaler'
    FMLibrary: 'DokumentmalerFM'
  jobs:
  - deployment: TEST
    pool: TEST-Vera
    environment: TEST - SharePoint
    strategy:
      runOnce:
        deploy:
          steps:
            - download: current
              artifact: documents

            - task: PowerShell@2
              displayName: 'Upload Innhold Documents'
              inputs:
                targetType: filePath
                filePath: '$(Pipeline.Workspace)/documents/Scripts/UploadDokument.ps1'
                arguments: '$(SiteUrl) $(InnholdLibrary) $(Pipeline.Workspace)/documents/Innhold'
                failOnStderr: true

            - task: PowerShell@2
              displayName: 'Upload DocumentMalerFM Documents'
              inputs:
                targetType: filePath
                filePath: '$(Pipeline.Workspace)/documents/Scripts/UploadDokument.ps1'
                arguments: '$(SiteUrl) $(FMLibrary) ''$(Pipeline.Workspace)/documents/FM Templates'''
                failOnStderr: true

- stage: QA
  displayName: Deploy to QA
  variables:
    SiteUrl: 'http://oursharepointarea.com/dokumenter'
    InnholdLibrary: 'DokumentMaler'
    FMLibrary: 'DokumentmalerFM'
  jobs:
  - deployment: QA
    pool: QA-Vera
    environment: QA - SharePoint
    strategy:
      runOnce:
        deploy:
          steps:
            - download: current
              artifact: documents
            - task: PowerShell@2
              displayName: 'Upload Innhold Documents'
              inputs:
                targetType: filePath
                filePath: '$(Pipeline.Workspace)/documents/Scripts/UploadDokument.ps1'
                arguments: '$(SiteUrl) $(InnholdLibrary) $(Pipeline.Workspace)/documents/Innhold'
                failOnStderr: true

            - task: PowerShell@2
              displayName: 'Upload DocumentMalerFM Documents'
              inputs:
                targetType: filePath
                filePath: '$(Pipeline.Workspace)/documents/Scripts/UploadDokument.ps1'
                arguments: '$(SiteUrl) $(FMLibrary) ''$(Pipeline.Workspace)/documents/FM Templates'''
                failOnStderr: true

- stage: PROD
  displayName: Deploy to PROD
  variables:
    SiteUrl: 'http://oursharepointarea.com/dokumenter'
    InnholdLibrary: 'DokumentMaler'
    FMLibrary: 'DokumentmalerFM'
  jobs:
  - deployment: PROD
    pool: PROD-Vera
    environment: PROD - SharePoint
    strategy:
      runOnce:
        deploy:
          steps:
            - download: current
              artifact: documents

            - task: PowerShell@2
              displayName: 'Upload Innhold Documents'
              inputs:
                targetType: filePath
                filePath: '$(Pipeline.Workspace)/documents/Scripts/UploadDokument.ps1'
                arguments: '$(SiteUrl) $(InnholdLibrary) $(Pipeline.Workspace)/documents/Innhold'
                failOnStderr: true

            - task: PowerShell@2
              displayName: 'Upload DocumentMalerFM Documents'
              inputs:
                targetType: filePath
                filePath: '$(Pipeline.Workspace)/documents/Scripts/UploadDokument.ps1'
                arguments: '$(SiteUrl) $(FMLibrary) ''$(Pipeline.Workspace)/documents/FM Templates'''
                failOnStderr: true

I have a git repo which contains a collection of .docx and .pdf files.  The yaml file I have here describes the process by which we upload those documents to our different SharePoint environments, using a simple Powershell script.  This script loops over each .docx or .pdf file in the pipeline artifact directory and attempts to upload that file to SharePoint.
What I noticed when I updated the git repository to either include new files, or rename existing files, was that in deploy stages of my pipeline, the list of files being looped over and uploaded did not reflect the latest changes made to the repository, but instead was looping over an out of date collection of files.
I discovered that what was happening was, the 'download' task was not downloading the latest pipeline artifact produced in the previous stage, but was instead using a previously downloaded (and now old) cached version of the artifact.
So when my script was looping round all the files in the directory, those that were changed, added or renamed were not being included in this process.
I worked around this, by connecting to each agent and deleting the 'documents' artifact from the working directory.  This then forced the download step to fetch the latest version of the documents artifact, which contained the correct files.

@GarethOates Thanks for the additional info. Can you please try adding dependsOn input field in the yaml schema and assign the stage name it's dependent on to the value and see if it works?
For example:
dependsOn:

Build
Test
QA

For reference: https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema

I'm afraid that didn't fix the problem.

@GarethOates Thanks for the updates. I think that goes back to the scenario where old artifacts are not being deleted in the agent. In the DPA V2 task, the default download directory is working directory and by design, it won't get cleaned up when running a new build
I think you can try specifying $(System.ArtifactsDirectory) as the download directory, files inside of that folder should get cleaned up when the agent is running a new build/pipeline.
In the meantime, we will evaluate to see if it makes sense to set the default download directory to some folder that gets cleaned at the beginning of each run.

Ok, so does that mean I can’t use the shortcut version of those tasks like - download: current and must instead define the tasks fully, specifying the directory myself?
If so, I’ll do that. It might make sense to mention this caveat (if you can call it that) in the docs somewhere.  I’ll have a go at updating them and submitting a PR tomorrow CET, unless you beat me to it, or don’t agree that it needs mentioning. 😊

@GarethOates Sorry for the inconvenience. Fro the download keyword, unfortunately the target input field is currently not exposed but it should have the capability for users to specify a custom download directory very soon.
For now if you'd like to use a different download directory, yes, you will need to define the task fully.

Referenced in https://stackoverflow.com/questions/62042095/how-do-you-download-all-pipeline-resources-in-a-job/62056385#62056385

If the solution is using the "DownloadPipelineArtifact task instead of the download keyword" then @microsoft you need to update your docs - this is driving folks crazy.

authors: GarethOates StephenLarkin cawoodm giggio jahsu-MSFT trajano

repo: microsoft/azure-pipelines-tasks


text:
Implemented support for Go Language

Task name:
Description:
Documentation changes required: (Y/N)
Added unit tests: (Y/N)
Attached related issue: (Y/N)
Checklist:

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

Adding support for Go Language

Adding support for Go Language.

Please update title of PR to [AzureTestPlanTask]: Implemented support for Go Language
Add pipeline link in description where this change was tested


text:
existing kube config is overwritten instead of merged

Scenario which you are working on
https://azurearcjumpstart.io/azure_arc_jumpstart/azure_arc_k8s/alibaba/alibaba_terraform/
Describe the bug
Once you apply the terraform plan, your existing kube config in ~/.kube/config is overwritten instead of merged. Resulting in loosing all of your existing kube configs.
To Reproduce

apply the plan
see the created kubeconfig file to overwrite exising configs

Expected behavior
The new kubeconfig should be merged with the old one.
The old one should not be overwritten. As I loose all my existing configurations.

Looping @KaiWalter

@foliba found the RC and is working on a fix: terraform plan is overwriting the complete kubeconfig

authors: KaiWalter foliba likamrat


text:
powershell notebook

Issue Type: Bug
When choosing powershell as kernel the first time you start ADS and create a new notebook from the menu, it  wants to install Python instead of powershell.
regards
jack
Azure Data Studio version: azuredatastudio 1.18.1 (5b3b97f4a34018f3b37b0fce30e32f2af7ad78fa, 2020-05-26T21:14:29.147Z)
OS version: Windows_NT x64 10.0.18363

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 2208)

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)
15.74GB (6.35GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions: none

Hi @jpmlinssen, this is by design. Our PowerShell kernel is a true Jupyter kernel, and as such, needs Jupyter installed on the machine (which requires Python). This is why you're getting prompted to install Python.

authors: chlafreniere jpmlinssen

repo: microsoft/azuredatastudio


text:
Project dashboard presenting incorrect information

Azure Data Studio Version:
Version: 1.28.0-rc1 (user setup)
Commit: 1c91f7971e8d4563dca47ab113953b4ad8d59b64
Date: 2021-04-09T00:19:50.442Z
VS Code: 1.51.0
Electron: 9.4.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19042
Steps to Reproduce:

Create project from "VerifyContainedDBImportExport12892" db.
Try publishing the project. It fails but the Deployments table in dashboard shows that it was successful.

merged hence closing.

authors: SakshiS-harma udeeshagautam


text:
Results pane height and scrolling (auto adjust rows result height)

Issue Type: Feature Request
When writintg stored procedures, I usually resize results pane (so I have more space in editor).
It's not nice that after I resize results pane to smaller size, it adds a second scroll to rows section, so I'm force to scroll in 2 scrolls... It's not comfortable...
I suggest that results row should "auto adjust height", so there is not need to scroll in differents scrolls.
This first image is on normal size:

This second image is resized:

Azure Data Studio version: azuredatastudio 1.4.5 (887f4e8985023602e599cf86bdb44df48bb28569, 2019-02-12T06:20:08.633Z)
OS version: Windows_NT x64 10.0.17134

We've made several improvements to the query grid regarding spacing and scrolling.  The two scrollbar issue described here should not occur on current builds.   Please let us know if you're still impacted by this issue.

authors: kburtram luismiguelgilbert


text:
ESC doesn't revert cell edits when Editing Data on a table

Azure Data Studio Version: 1.15.0 - This is a regression from 1.14.1

Steps to Reproduce:

Edit Data on a table
Start editing a cell then hit ESC character.

Expected: Cell is reverted and focus moved out of cell.  Cell is no longer in edit mode.
Actual: Cell is not reverted and focus is not moved out of cell.  This functionality is particularly important when a cell has a validation error.  Users often hit ESC to revert the edits.  With the current experience user either has to keep editing the cell until its valid or bring up the row context menu to revert the row.  Otherwise, the user is stuck in a validation loop and can't move focus out of cell
For example, below ESC should dismiss the notification, revert the cell edit and move focus out of edited cell

It turns out there was no listener for the keyboard, thus the revert Row function was never called.

authors: kburtram smartguest


text:
LEGO: Pull request from lego/hb_04604851-bac4-4681-9f74-73de611d6e48_20210324213452033 to main

LEGO: Pull request from lego/hb_04604851-bac4-4681-9f74-73de611d6e48_20210324213452033 to main with localized lcls

Pull Request Test Coverage Report for Build 684511621

0 of 0   changed or added relevant lines in 0 files are covered.
3 unchanged lines in 1 file lost coverage.
Overall coverage remained the same at 43.272%

Files with Coverage Reduction
New Missed Lines
%

extensions/import/src/wizard/pages/fileConfigPage.ts
3
72.99%

Totals

Change from base Build 684508149:
0.0%

Covered Lines:
25462

Relevant Lines:
53684

💛  - Coveralls

authors: coveralls csigs


text:
Remove duplicate artifact upload

Fixes https://github.com/microsoft/azuredatastudio/issues/15112
The staging directory should only be used for stuff we want to publish as a build artifact. When downloading the compilation tarball we just let it put it in the default location instead (Pipeline.Workspace) so it doesn't get re-uploaded by each of the platform compilation jobs.
Test build :
https://mssqltools.visualstudio.com/CrossPlatBuildScripts/_build/results?buildId=100379&view=artifacts&pathAsName=false&type=publishedArtifacts

Pull Request Test Coverage Report for Build 745755185

0 of 0   changed or added relevant lines in 0 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage remained the same at 43.551%

Files with Coverage Reduction
New Missed Lines
%

extensions/import/src/wizard/pages/fileConfigPage.ts
1
73.46%

Totals

Change from base Build 745747828:
0%

Covered Lines:
26188

Relevant Lines:
54957

💛  - Coveralls

authors: Charles-Gagnon coveralls


text:
[Loc] small update to sql-database-projects xlf

This PR fixes #

Pull Request Test Coverage Report for Build 1849090158

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

Totals

Change from base Build 1848552646:
0.0%

Covered Lines:
14816

Relevant Lines:
29137

💛  - Coveralls

authors: coveralls smartguest


text:
Deploy Options - Schema Compare related changes due to mssql model updates

This PR fixes compile errors and tests for the schema compare extension. These changes are dependent on ADS mssql model updates (https://github.com/microsoft/azuredatastudio/pull/18050) and STS changes (https://github.com/microsoft/sqltoolsservice/pull/1357)

Abandoning this PR... as the ModelUpdates PR (https://github.com/microsoft/azuredatastudio/pull/18050) is for updating the existing code and this PR is to update those references. I have decided to maintain a single PR for existing code changes and separate PR for new functionlity. That way it will be lot easier to maintain the PR and easy to test and merge. Thanks.


text:
LEGO: Pull request from lego/hb_04604851-bac4-4681-9f74-73de611d6e48_20220519161154386 to main

LEGO: Pull request from lego/hb_04604851-bac4-4681-9f74-73de611d6e48_20220519161154386 to main with localized lcls

Pull Request Test Coverage Report for Build 2353232776

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.007%) to 42.071%

Totals

Change from base Build 2350383797:
0.007%

Covered Lines:
28010

Relevant Lines:
62253

💛  - Coveralls


text:
MSAL cache encryption + log improvements

Introduces synchronized encryption algorithm for MSAL file system cache accessed from Azure Data Studio (MSAL.js) and STS (MSAL.NET) Companion PR: https://github.com/microsoft/sqltoolsservice/pull/1945

Added prompt for Windows when IV/Key could not be saved to Credential Store (as we are prone to exhausting limits)

Pull Request Test Coverage Report for Build 4432895024

7 of 131 (5.34%)  changed or added relevant lines in 15 files are covered.
8 unchanged lines in 5 files lost coverage.
Overall coverage decreased (-0.005%) to 41.909%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

extensions/azurecore/src/account-provider/azureAccountProvider.ts
0
1
0.0%

extensions/azurecore/src/account-provider/utils/simpleWebServer.ts
1
2
50.0%

extensions/azurecore/src/account-provider/utils/fileDatabase.ts
2
4
50.0%

extensions/azurecore/src/azureResource/providers/resourceTreeDataProviderBase.ts
1
3
33.33%

extensions/azurecore/src/account-provider/azureAccountProviderService.ts
0
3
0.0%

extensions/azurecore/src/account-provider/utils/simpleTokenCache.ts
0
3
0.0%

extensions/azurecore/src/azureDataGridProvider.ts
0
3
0.0%

extensions/azurecore/src/azureResource/services/terminalService.ts
0
7
0.0%

extensions/azurecore/src/extension.ts
0
7
0.0%

extensions/azurecore/src/account-provider/utils/msalCachePlugin.ts
0
9
0.0%

Files with Coverage Reduction
New Missed Lines
%

extensions/azurecore/src/account-provider/utils/msalCachePlugin.ts
1
0%

extensions/azurecore/src/extension.ts
1
0%

extensions/notebook/src/dialog/configurePython/configurePathPage.ts
1
57.02%

extensions/sql-bindings/src/common/azureFunctionsUtils.ts
1
80.65%

extensions/notebook/src/jupyter/serverInstance.ts
4
75.5%

Totals

Change from base Build 4432122261:
-0.005%

Covered Lines:
28825

Relevant Lines:
63846

💛  - Coveralls

authors: cheenamalhotra coveralls


text:
Single click SHIR

Pull Request Test Coverage Report for Build 7978815134
Details

0 of 0   changed or added relevant lines in 0 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-0.002%) to 41.757%

Files with Coverage Reduction
New Missed Lines
%

extensions/notebook/src/dialog/configurePython/configurePathPage.ts
1
57.02%

Totals

Change from base Build 7972128479:
-0.002%

Covered Lines:
30827

Relevant Lines:
69082

💛  - Coveralls

I'm not able to access the links above, can you please add images to the descrition

@RamyaR29 can you add the Screen shots of UI that is build (also check in dark mode if everything looks good)


text:
Patch CVE-2022-28506 and CVE-2023-48161 in giflib

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

[x] The toolchain has been rebuilt successfully (or no changes were made to it)
[x] The toolchain/worker package manifests are up-to-date
[x] Any updated packages successfully build (or no packages were changed)
[x] Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
[x] Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
[x] All package sources are available
[x] cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
[x] LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
[x] All source files have up-to-date hashes in the *.signatures.json files
[x] sudo make go-tidy-all and sudo make go-test-coverage pass
[x] Documentation has been updated to match any changes to the build system
[ ] Ready to merge

Summary

What does the PR accomplish, why was it needed?
Patch CVE-2022-28506 and CVE-2023-48161 in giflib
Change Log

CVE-2022-28506 and CVE-2023-48161

Does this affect the toolchain?

NO
Associated issues

NA

Links to CVEs

https://nvd.nist.gov/vuln/detail/CVE-2022-28506
https://nvd.nist.gov/vuln/detail/CVE-2023-48161

Test Methodology

Pipeline build id: xxxx

Thanks @jslobodzian for the review.

Auto cherry-pick results:

main :white_check_mark: -> https://github.com/microsoft/azurelinux/pull/10733

Auto cherry-pick pipeline run -> https://dev.azure.com/mariner-org/mariner/_build/results?buildId=657997&view=results

authors: CBL-Mariner-Bot suresh-thelkar

repo: microsoft/azurelinux


text:
Default IStorage TypeNameHandling.None

Fixes #6013
Note: this is a breaking change. The dialog stack and prompts of existing bots should continue to function without type name handling, but bots using storage directly or overriding prompts or input dialogs will need to update how they access nested state objects. (modify code to use MapValueTo)

Can we make sure we document these breaking changes in the backward compat doc? When using TypeNameHandling.None, developers will need to use GetValue<T> and TryGetValue<T> when trying to access properties in dc.ActiveDialog.State and stepContext.Values Also, from looking at the source:

The Dialogs.PeristedState and Dialogs.PresistedStateKeys classes don't seem to be used anywhere and can probably be removed.
The Dialogs.DialogsInstance.StackIndex property doesn't seem to be used either

Looking a the serialized data in CosmosDB, there seems to be some inconsistency in the capitalization being used, most properties using camelCase (as it is common for json) but some others like DialogState, StackIndex, Version and ETag, don't. can we be consistent?

Should we consider make DialogInstance.State and WaterfallStepContext.Values strong type state object rather than making them dictionaries? As it is, devs may try to put and get values as if it were dictionaries, that will work within the same turn but not in between turns and they won't realize until runtime.
Let's chat about ETag offline too, I'd like to get more context on that property.

I haven't updated the backward compat doc yet, but certainly will when this is merged.
Removed PeristedState, PresistedStateKeys and StackIndex
DialogState name is based on the name of the type (nameof(DialogState)) so the capitalization is chosen by the compiler. ETag is actually a field generated by cosmosdb, so the capitalization is chosen by cosmosdb.
Changed DialogInstance.State and WaterfallStepContext.Values to strongly typed objects CachedBotStateDictionary
Updated ETag support so it behaves the same across blobs/cosmosdb/memory storages

repo: microsoft/botbuilder-dotnet


text:
[PORT] update adaptive inputs to set inputHint = expectingInput

close: #1776
At first, LG ActivityFactory use MessageFactory.Text() to generate message activity result from LG output, but MessageFactory.Text() would inject inputhint = expectingInput  into activity, and the prompt of input relies on this feature.
Then we found there is no reason to add inputhint into pure text activity, so we removed it.
At the same time, we should update adaptive inputs to set inputHint = expectingInput whenever we are issuing a prompt or reprompt (unrecognized/ invalid prompt).

Pull Request Test Coverage Report for Build 119815

0 of 8 (0.0%)  changed or added relevant lines in 1 file are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-0.02%) to 67.189%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

libraries/botbuilder-dialogs-adaptive/src/input/inputDialog.ts
0
8
0.0%

Files with Coverage Reduction
New Missed Lines
%

libraries/botbuilder-dialogs-adaptive/src/input/inputDialog.ts
1
7.41%

Totals

Change from base Build 119752:
-0.02%

Covered Lines:
10272

Relevant Lines:
14468

💛  - Coveralls

authors: Danieladu coveralls

repo: microsoft/botbuilder-js


text:
added new features to qna maker ludown

Fixes #
Proposed Changes

Added feature to QnA ludown package to add Id to QnA pair in LUdown file. Detailed explanation in documentation
Added new feature to QnA ludown package to add followup prompts to QnA pairs based on Id(s) described above. Detailed explanation in documentation
Downgraded ludown package to V1.3.3, since changes were made in that version of ludown

Testing

The team has done rigorous testing of the new features added to ludown package, and is currently using it in production

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: ramoncnavarro sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

authors: msftclas ramoncnavarro

repo: microsoft/botbuilder-tools


text:
Investigte how to add more language/framework support

Today, the Gradle build server only supports pure Java project, while in the real world, Kotlin/Groovy/Android project may also be built by Gradle. So, we need to figure out a contribution point that allow different Gradle plugins to contribute their own build targets.

Hi @jdneo. I'm considering working on a project to implement support for Android and Kotlin projects on the Gradle Build Server.
Do I need to create a new issue?

Hi @joemaren, thank you for your interest in the project.
Currently there is an undergoing refactoring work for multiple language support: https://github.com/microsoft/build-server-for-gradle/pull/125
And another PR for the kotlin support: https://github.com/microsoft/build-server-for-gradle/pull/120
So far there is no effort made on the Android support. Let's file a new issue for the Android support and we can discuss details there.
BTW, Based on the discussion between @Arthurm1 and me, we tend to finish the refactor first and then adding more language/framework support.

Hi @jdneo, Is there had any progress about Android support? I'm trying to develop a android project in idea and found BSP and this amazing project when I search on github. In my opinion it could be wonderful let gradle build server support Android and work in different IDE.
Do u need more people help? Although I'm still a powerless undergraduate but I'm very interested in open source projects. Maybe u can give me some suggests or way of learning in Android support? I'd be happy to make a modest contribution to the project.
:)

Hi @DazeCake, there is no undergoing work related with Android support. Any kind of contributions are welcome.
Feel free to file a new issue for further discussion.

authors: DazeCake jdneo joemaren

repo: microsoft/build-server-for-gradle


text:
Support for Python and Pip

It would be great to have support for Python/Pip as well.
I did some experiments around it and looks like it is possible to have a script similar to write-npm.sh. It could be write-pip.sh:
#!/bin/bash

ARTIFACTS_FEED=${1:-"required"}
FEED_USER=""

# If ARTIFACTS_FEED equals "required" then exit with error message
if [ "${ARTIFACTS_FEED}" = "required" ]; then
    echo "  Usage: write-pip.sh <ARTIFACTS_FEED>"
    echo "example: write-pip.sh pkgs.dev.azure.com/orgname/projectname/_packaging/feedname/pypi/simple"
    echo "IMPORTANT! Do not pass https in artifacts feed!"
    exit 1
fi

pip config set --site global.index-url https://user:\${ARTIFACTS_ACCESSTOKEN}@${ARTIFACTS_FEED}

Pip doesn't support providing auth token independent of feed url. It supports keyring, but my understanding that it is impossible to use keyring in dev container in a non-interactive manner. See https://github.com/jaraco/keyring#using-keyring-on-headless-linux-systems-in-a-docker-container
Running pip via run-pip.sh could be possible as well. In this case we will need a way to read/obtain feed url. Then we may set the environment variable PIP_INDEX_URL,

Correct me if I am wrong, but this is going to store the value of the ARTIFACTS_ACCESSTOKEN environment variable in the config. If so, that will not work and is not how this works.
The tokens that are obtained are short lived, which is why for the package managers we are supporting so far we have to replace the command like dotnet with a bash alias that runs a script. The script then gets the token, updates an environment variable and runs the tool. The tools that work are the ones support getting the value from the environment variable.
Can Python/Pip be configured to get the token from an environment variable? Where we tell it the name of the variable and it reads the value?
The write-npm.sh script is just a small helper to write out a npm config file in the format needed to reference an environment variable. This is mainly only provided because the npm config file is more than a one-liner.

ah, I see about the short living token. You are correct that it won't work in the long run.
There is an option to do it via run script:
#!/bin/bash

if [ -f "${HOME}/ado-auth-helper" ]; then
  export ARTIFACTS_ACCESSTOKEN=$(${HOME}/ado-auth-helper get-access-token)
fi

# Read index-url from pip config get
INDEX_URL=$(pip config get global.index-url)
EXPANDED_INDEX_URL=$(eval echo ${INDEX_URL})
if [ -f "${HOME}/ado-auth-helper" ]; then
    unset ARTIFACTS_ACCESSTOKEN
fi

# Find the pip executable so we do not run the bash alias again
PIP_EXE=$(which pip)

${PIP_EXE} "$@" -i "${EXPANDED_INDEX_URL}"
EXIT_CODE=$?
unset PIP_EXE

if [ -f "${HOME}/ado-auth-helper" ]; then
    unset EXPANDED_INDEX_URL
fi

exit $EXIT_CODE

this would require that Pip is configured like this: pip config set --site global.index-url https://user:${ARTIFACTS_ACCESSTOKEN}:url/pypi/simple, i.e. that it references an environment variable.

Just so I understand ... now you are storing the name of the environment variable in the configuration but since Pip does not support this you dynamically retrieve and expand the value then set it on the command line when running pip?
I still see a couple of problems:

If someone runs python -m pip XXX then I do not expect a bash alias will work. We see this problem with similar scenarios for npm
Many of the pip subcommands do not support -i so presumably we would need to interpret which subcommand is being run and only selectively add it to the command line

I do not think the first problem can be solved. I also do not think it has to block a solution. It may just be something users need to be aware of

You are correct in your understanding.

That is true.
This is also true. I got too focused on installing command so that I forgot about the rest.

There is potential solution similar to the above run script. There, we would put auth token in a keyring. Run pip command (it can be any command; if it doesn't need auth, then it will not read it from the keyring). Finally, we remove the token from keyring. The problem with this solution is that there is no easy-usable keyring backend implementation.

I do not have the Python skills for this but looking at the documentation for building a custom keyring backend it looks doable. Wondering if the code for that backend could live in this repository and during install time we configure pip to use it? If configured of course.
Presumably it would not even need to store anything and just has to respond to the getPassword or getCredential method with the results of calling the script?

I quite like the keyring backend idea. I imagine it would be similar to the implementation in https://github.com/microsoft/artifacts-keyring/blob/master/src/artifacts_keyring/plugin.py, but differing in the underlying executable that we call.
Is anyone working on this atm?

Update: Got proof of concept working locally. Keen to get this one reviewed and released. I'll reach out, let's discuss on Teams next week!

Feel free to add a PR with your PoC. If you explain what it is doing and what needs to be done at install time, I can probably take care of the glue code for the feature to install and set it up etc. It is pretty straightforward so if you want to tackle that too feel free.
It is hard to test the full final version but usually you can just create a Codespace and manually do some of the steps the install will do to verify it works. That is how I did it for the other providers.

@delilahw I published a new version that installs the helper you created. Can you give it a test? I am only testing that the install completes, not the actual usage. To try it you need this:
  "features": {
    "ghcr.io/microsoft/codespace-features/artifacts-helper:1": {
      "python": true
    }
  }

The installation only happens if it also detects pip is available. Let me know if we need to also handle looking for and using something like pip3

@delilahw I published a new version that installs the helper you created. Can you give it a test? I am only testing that the install completes, not the actual usage. To try it you need this:

@markphip Thanks!! I've just tested it with a config like this:
{
    "image": "mcr.microsoft.com/devcontainers/base:ubuntu-22.04",
    "features": {
        "ghcr.io/devcontainers/features/python:1": {
            "version": "3.11"
        },
        "ghcr.io/microsoft/codespace-features/artifacts-helper:1": {
            "python": true
        }
    }
}

It downloads the wheel successfully but fails to find pip. I think we do need to handle both python and python3 as they vary between distros. The pip docs now recommend explicitly specifying the python interpreter using python -m pip, rather than just pip, to remove any ambuiguity.
#23 3.392 Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.111.133|:443... connected.
#23 4.428 2024-05-07 23:11:33 (55.0 MB/s) - 'codespaces_artifacts_helper_keyring-0.1.0-py3-none-any.whl' saved [6613/6613]

#23 4.430 /tmp/install-python-keyring.sh: line 5: pip: command not found

#23 4.431 ERROR: Feature "Azure Artifacts Credential Helper" (ghcr.io/microsoft/codespace-features/artifacts-helper) failed to install!

authors: delilahw fralik markphip

repo: microsoft/codespace-features


text:
Define [com_interface] IID as string

Define the GUID as a string in the #[com_interface("<iid>")] attributes.
Needed something easy and simple to work on. :)
Closes #90

The CI is private by the way. I forgot to run rustfmt on the changes, which resulted in a failing CI build, but all I get is access denied when trying to access it:
https://dev.azure.com/microsoft-rust/332945ff-0d35-4cde-b1e2-30e171b5154d/_build/results?buildId=353

@Rantanen awesome - thanks! Any way we could add a compile check to make sure we get a nice error message when not using a string literal?

Added that test and rebased on top of the master branch to resolve conflict in progress.rs and to fix the path tests, which need to use string GUIDs in this branch.

I don't really know what is causing the build failure here. I've tried replicating the .azure-pipelines.yml build locally and I can't get it to fail. I'll try fixing the timestamp on the last commit, which is at least confusing GitHub (since due to rebasing things, it's timestamp is before the second last commit).

There was an error in the tests. Apparently I had mixed the old pre-string path tests and this one when verifying that the errors were correct. Instead the new test failed to compile due to missing use and now because of non-string GUID parameter.
Fixed that and now the CI is green as well. Still no idea what the original issue was though. :|

authors: Rantanen rylev

repo: microsoft/com-rs


text:
Dev drive not mounted after reboot

Dev Home version
0.601.297.0
Windows build number
10.0.22631.0
Other software
No response
Steps to reproduce the bug

Create a dev drive
Store some code on it
Reboot the machine

Expected result
The dev drive should be mounted after the reboot
Actual result
The dev drive is missing.
I am able to mount the VHD manually and it restores it to the right drive letter, but I'm unsure why this doesn't happen automatically. I have another machine where this works as expected and the mounted dev drive is available after reboots.
Included System Information
No response
Included Extensions Information
No response

+1

I'm also experiencing this issue. Oddly enough I have another VHD with VMs on it that mounts automatically after a reboot.

The Virtual Disk gets automatically removed when the computer reboots.

I have done the same thing. I think I found the reason behind this:
Because the one which is still mounted is because something is stopping it from dismounting, but the other one is not getting mounted because, nothing is stopping it from dismounting. The one which is not getting dismounted should be a in a Storage Pool or something like that.

I have the same issue, a colleague mentioned his dev drive remounts on reboot.

Same problem over here!

I have the same issue. Made a scheduled task to mount it as a workaround.

@niikoo how did you do that exactly?

This is how I set it up @JonathanBout
Task Scheduler
General
Name: Auto-Mount DevDrive VHDX at Startup
When running the task, use the following user account: [I selected an account with administrative rights]
Selected Run whether user is logged in or not , Do not store password and Run with highest privileges.
Triggers

At startup
At log on

Actions
Action: Start a program
Program/script: diskpart.exe
Arguments: /S "C:\devdrive.automount.diskpart"
Conditions
Unchecked everything.
Settings
Checked the top 5 checkboxes.
Set Do not start a new instance on the last dropdown.
Create the diskpart file
Path: "C:\devdrive.automount.diskpart"
File contents:
select vdisk file="C:\devDrive.vhdx"
attach vdisk
exit

Replace "C:\devDrive.vhdx" with the path to your DevDrive VHDX file.

@niikoo thank you, it works great!

The Virtual Disk gets automatically removed when the computer reboots.

That is not true, as I stated in my OP, I have 2 VHDs. One remains mounted after reboots, the dev drive does not.

@jimmychanga, does the one which stays still, in a storage pool.

Close this if fixed.

Close this if fixed.

I don't see a workaround as a fix, @skanda890. Hope to get a proper fix that works out of the box.

No, it is not. It is a NTFS formatted local vhd. The only difference between the two are that the DEV drive is formatted with ReFS.
Get Outlook for iOShttps://aka.ms/o0ukef

From: Nikolai Ommundsen @.>
Sent: Saturday, February 3, 2024 3:44:58 AM
To: microsoft/devhome @.>
Cc: Joe Marr @.>; Mention @.>
Subject: Re: [microsoft/devhome] Dev drive not mounted after reboot (Issue #1903)
Close this if fixed.
I don't see a workaround as a fix, @skanda890https://github.com/skanda890. Hope to get a proper fix that works out of the box.
—
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/devhome/issues/1903#issuecomment-1925219672, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AASLOXNV2X6HQK6J44TGUPDYRX2IVAVCNFSM6AAAAAA7NPUUHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRVGIYTSNRXGI.
You are receiving this because you were mentioned.Message ID: @.***>

@jimmychanga, Thanks.

Happening to me too, though intermittently. It seems random whether the dev drive is mounted on boot or not.

For everyone that is experiencing this problem, can you open a Feedback Hub issue under Developer Platform->Dev Drive and collect traces? Then post the link here.
Thanks,
Adam

I unmounted my dev drive in order to optimize the vhdx file, when i mounted it back it won't automount after a reboot.
Also, i can't create new dev drives, they just end up in RAW format and won't work unless i manually format them as NTFS (which defeats the whole point of dev drives)

Hi @griffi-gh, sorry to hear that. I wonder if the vhdx file was attached using diskmgmt.msc or other tools. If so, could you please detach the vhdx file using diskmgmt and retry attaching it using the System\Storage\Disks & Volumes Settings UX page? The behavior to auto-mount the vhdx files on reboot needs to be explicitly opted in and only the Settings UX for Disks & Volumes is updated to request the new behavior.
For the intermittent issue, thanks for reporting this. It will be more helpful to have the Feedback filed like @AdamBraden suggested as that would include the required logs. In this case, the System event log should have additional info on why the attempt to attach the vhd(x) failed.

The behavior to auto-mount the vhdx files on reboot needs to be explicitly opted in and only the Settings UX for Disks & Volumes is updated to request the new behavior.

This explains why it doesn't work for me. I mount the volume using explorer or from a shell script, mounting it through Settings does not work for me (probably due to some company managed policy).

Due to company-wide security policies dev drive creation via settings panel is not possible. For testing this feature, we used an elevated powershell with something along new-VHD ... | Mount-VHD | ... to create the dev drive. Its gone after a reboot.

The behavior to auto-mount the vhdx files on reboot needs to be explicitly opted in and only the Settings UX for Disks & Volumes is updated to request the new behavior.

Indeed, there is a new _ATTACH_VIRTUAL_DISK_FLAG called ATTACH_VIRTUAL_DISK_FLAG_AT_BOOT, added sometime around the end of 2023. You can pass this argument to AttachVirtualDisk to auto-mount VHDs. WIM and PowerShell have not been enlightened to do this.
I've written a sample C# app that will enable auto-mounting for a given VHD(X): citelao/automount-vhd. Most of the code is written by my friend @jazzdelightsme; I adapted it to CsWin32.
Note: I work for Microsoft, but I do not own these APIs.

Unfortunately, it seems this worked only once :-( Now, the script has no effect other than mounting the dev drive. Its gone after a reboot. However, I'm not sure if my company has some weird group policies that interfere somehow.

Hi @griffi-gh, sorry to hear that. I wonder if the vhdx file was attached using diskmgmt.msc or other tools. If so, could you please detach the vhdx file using diskmgmt and retry attaching it using the System\Storage\Disks & Volumes Settings UX page? The behavior to auto-mount the vhdx files on reboot needs to be explicitly opted in and only the Settings UX for Disks & Volumes is updated to request the new behavior.
For the intermittent issue, thanks for reporting this. It will be more helpful to have the Feedback filed like @AdamBraden suggested as that would include the required logs. In this case, the System event log should have additional info on why the attempt to attach the vhd(x) failed.

Differentiating VHDX files is a dangerous act that leads to these exact bugs. There is no need to treat them differently, and if they truly are different then don't use the same underlying format, make a new one. I should be able to use my VHDX file between VMs, as a dev drive etc as that is what the format is for. Having one UI do one thing with hidden flags and another do another thing is not only inconsistent but how we get security issues etc. down the road as no one checks what the other system did. Respect the API as created.
I just started using dev drives and ran into this exact issue, of course after creating my VHDX via diskman. Forcing me to use the new clunky UI for the same tech (or worse preventing me from using PowerShell) is a scary future indeed.

This has just started happening to me this week since rebuilding my machine / fresh Windows install

@matt-gribben would you mind filing a report from the Feedback Hub? You can log it under the 'Developer Platform -> Dev Drive' category and use the share option to include a link to it here. Thanks!

@adrastogi https://aka.ms/AArjf34 there you go

Your dev drive file needs to be on a permanent drive in order to be mounted on boot. If, like me, using a surface tablet, you have a SDHC card permanently in the machine, well, no good to put the dev drive file on that and want it to automount on boot.
Moved the file to the C: drive and mounted it, and it automounts on boot now.
Sigh.

@rickhoskins - putting a Dev Drive VHD on an SD card is not going to give you the perf benefits of Dev Drive compared to your SSD. Can you help me understand your desired scenario? If perf is not a major concern, you could just create a normal VHD and use a scheduled task to get it to mount - or put your content directly on the SD card. You could then use a folder exclusion to minimize Defender overhead (and do scheduled scans at appropriate times for the security threat/risk your project requires).

Is the only way to get traction on this the feedback hub? And if so why is there this Github repo if our bug reports come back with no response. The Dev Drive  concept is fairly DOA if you can't even mount things to it. I still have to manually mount my dev drive on every single reboot, which for me is often as I do not leave my computer on when I am not using it.

@rickhoskins - thanks for the information on your scenario. The isolation and portability of a dev drive vhd is interesting to explore if more devs operate this way.
@JosiahBradley - we are working with the file system team to fill in the gaps in the tools that support mounting and dismounting drives to ensure they support automount of a dev drive vhd. I cannot comment on a timeline at this time.

This is how I set it up @JonathanBout
Task Scheduler
General Name: Auto-Mount DevDrive VHDX at Startup When running the task, use the following user account: [I selected an account with administrative rights] Selected Run whether user is logged in or not , Do not store password and Run with highest privileges.
Triggers

At startup
At log on

Actions Action: Start a program Program/script: diskpart.exe Arguments: /S "C:\devdrive.automount.diskpart"
Conditions Unchecked everything.
Settings Checked the top 5 checkboxes. Set Do not start a new instance on the last dropdown.
Create the diskpart file
Path: "C:\devdrive.automount.diskpart" File contents:
select vdisk file="C:\devDrive.vhdx"
attach vdisk
exit

Replace "C:\devDrive.vhdx" with the path to your DevDrive VHDX file.

Here's my Task that doesn't need a extra file:
Task Scheduler
General Name: Auto-Mount DevDrive VHDX at Startup When running the task, use the following user account: [I selected an account with administrative rights] Selected Run whether user is logged in or not , Do not store password and Run with highest privileges.
Triggers

At startup
At log on

Actions Action: Start a program Program/script: powershell Arguments: Mount-DiskImage -ImagePath "C:\DevDrive.vhdx"
Conditions Unchecked everything.
Settings Checked the top 5 checkboxes. Set Do not start a new instance on the last dropdown.
Replace "C:\DevDrive.vhdx" with the path to your DevDrive VHDX file.

This just happened to me too, I cloned the git repo @citelao shared and it worked, however, I am interested in the feature in Dev Home to mount an existing disk instead of always creating a new one

authors: AdamBraden ChandKV JonathanBout JosiahBradley Mukul1127 adrastogi citelao griffi-gh jimmychanga matt-gribben mdsharpe niikoo nzain rageshkrishna rickhoskins seppestas skanda890 yashints

repo: microsoft/devhome


text:
.msi Installer fails when installing development files only

Describe the bug
The 0.7.0 release fails with the following error when trying to install only the Development files.
Issue is present on 0.6.0 as well.

Installer works on the Test Mode VM if Runtime components are also installed. (Correct Behaviour)
Happens both on my VM which has Test Mode enabled, and on the development machine without Test Mode.
I believe wanting to run the .msi on the development machine for just the development files is a common enough use case for the installer to work on non test-signed machines as well. Although this might not be a needed fix because at some point with the 1.0.0 release, I presume that all the installer features would work on non Test-signed machines as well.
OS information

Windows 11 Enterprise VM
Hyper-V Manager
Test-signed

Windows 11 Pro
Non Test-signed development machine.

Steps taken to reproduce bug

Run the .msi installer.
In the features selection page, set Runtime Components to Feature will be installed when required (btw no Entire Feature will be unavailable option for Runtime Components?
Set Development Components to Will be installed on the local hard drive.
Proceed with installation.

Expected behavior
Installation should succeed in providing just the Development files.
Currently it only succeeds if Runtime Components are also installed.
Actual outcome
Installation fails with the following error:

Additional details
No response

@H0mTanks This is by design.
The runtime components are mandatory, as documented here:
The following feature-components are available for customization, and must be assigned as comma-separated values to the ADDLOCAL parameter:

- eBPF_Runtime_Components (mandatory): runtime components (installed in [Installation folder]\*, [Installation folder]\drivers).
- eBPF_Runtime_Components_JIT (optional): JIT compiler service (installed in [Installation folder]\JIT).
- eBPF_Development (optional): header files, scripts and libraries for development (installed in [Installation folder]\include,[Installation folder]\lib,[Installation folder]\scripts).
- eBPF_Testing (optional): header files for development (installed in [Installation folder]\testing).

repo: microsoft/ebpf-for-windows


text:
Schema management tool should indicate initialization time to user

User story
In some schema upgrade scenarios that rely on the schema management tool (see the yellow highlighted boxes here), initialization methods in the FHIR model can take up to 1 minute to be triggered. It would be good to have an info message to let the user know.
Acceptance criteria
The user is notified when initialization is delayed

@CaitlinV39 I don't see any attached screenshots indicating "(see the yellow highlighted boxes here)". Can we list out some of the scenarios that tend to take the most time for a frame of reference? Thanks

Initial Running Schema Version
Automatic Updates
Intermediate Schema Version
Schema Tool Action
Final Schema Version
Schema Upgraded Notification Fired From:
Upgrade Script
Notes

5
Disabled
5
apply --next
6
SchemaJobWorker
6.diff.sql
SqlServerFhirModel initialization could be delayed up to 1 min

null
Disabled
N/A
apply --latest
6
SchemaJobWorker
6.sql
SqlServerFhirModel initialization could be delayed up to 1 min

@PTaladay - Sorry about that! I added details in the comments

This is an old issue. Shall we still look into it? Also can you please provide the reproduction steps for the same.

@EXPEkesheth I think this one can be closed, there was no repro

repo: microsoft/fhir-server


text:
Unable to compile/test with race detector enabled

Apologies in advance if this is the wrong place to post this issue. This appears to be the most relevant place for issues since https://github.com/microsoft/go-images does not allow them.
I'm working with the MCR docker images for golang and have encountered an apparent gap in support for compilation and testing with the -race flag enabled. It's unclear from both that repo and this one whether the missing support is an intentional omission or an oversight. This issue hampers our ability to perform automated verification of data races in our build workflows with docker.
Images tried

mcr.microsoft.com/oss/go/microsoft/golang:1.20
mcr.microsoft.com/oss/go/microsoft/golang:1.20-fips-bullseye

Failing commands

go test -race ./...
go build -race .

Minimal repro
Using the MCR build, a hello world program compiles successfully without -race, but fails in linking when passing -race:
> docker run --rm -it mcr.microsoft.com/oss/go/microsoft/golang:1.20 bash

root@622f6e61f56e:/go# mkdir /app
root@622f6e61f56e:/go# cd /app
root@622f6e61f56e:/app# go mod init test
go: creating new go.mod: module test
root@622f6e61f56e:/app# echo '
> package main
>
> import "fmt"
>
> func main() {
>     fmt.Println("Hello world")
> }
> ' > main.go
root@622f6e61f56e:/app# go build .
root@622f6e61f56e:/app# go build -race .
# test
runtime.(*mspan).setUserArenaChunkToFault: relocation target __tsan_free not defined
runtime.mallocgc: relocation target __tsan_malloc not defined
runtime.runfinq: relocation target __tsan_finalizer_goroutine not defined
runtime.(*sweepLocked).sweep: relocation target __tsan_free not defined
runtime.goexit1: relocation target __tsan_go_end not defined
runtime.gfget: relocation target __tsan_malloc not defined
runtime.(*p).init: relocation target __tsan_proc_create not defined
runtime.(*p).destroy: relocation target __tsan_go_end not defined
runtime.(*p).destroy: relocation target __tsan_proc_destroy not defined
runtime.RaceDisable: relocation target __tsan_go_ignore_sync_begin not defined
runtime.RaceEnable: relocation target __tsan_go_ignore_sync_end not defined
runtime.raceinit: relocation target __tsan_init not defined
runtime.raceinit: relocation target __tsan_map_shadow not defined
runtime.racefini: relocation target __tsan_fini not defined
runtime.racemapshadow: relocation target __tsan_map_shadow not defined
runtime.racegostart: relocation target __tsan_go_start not defined
runtime.raceacquireg: relocation target __tsan_acquire not defined
runtime.raceacquirectx: relocation target __tsan_acquire not defined
runtime.racereleaseg: relocation target __tsan_release not defined
runtime.racereleaseacquireg: relocation target __tsan_release_acquire not defined
runtime.racereleasemergeg: relocation target __tsan_release_merge not defined
/usr/local/go/pkg/tool/linux_amd64/link: too many errors
root@622f6e61f56e:/app#

However, with the official golang distribution it works:
> docker run --rm -it golang:1.20 bash

root@4896b6f6916c:/go# mkdir /app
root@4896b6f6916c:/go# cd /app
root@4896b6f6916c:/app# go mod init test
go: creating new go.mod: module test
root@4896b6f6916c:/app# echo '
> package main
>
> import "fmt"
>
> func main() {
>     fmt.Println("Hello world")
> }
> ' > main.go
root@4896b6f6916c:/app# go build .
root@4896b6f6916c:/app# go build -race .
root@4896b6f6916c:/app#

This is the right place--https://github.com/microsoft/go-images/blob/microsoft/main/SUPPORT.md mentions it, but maybe we should also say that in the readme itself, or use an issue template. Thanks for making your way here to report the issue. 😄
From what I can see, these errors can show up when cgo is not enabled, e.g. after cross-compiling (https://github.com/golang/go/issues/42382). However, this issue does repro for me on a linux-amd64 host and linux-amd64 container with CGO_ENABLED=true according to go env, so that isn't what's going on here.
It looks like go 1.20 included a change to how the race detector is built/packaged that broke our packing scripts and missed the syso files. Go 1.19 images work fine with those steps.
I'll look into this. It will likely be a quick fix to some pattern matching and we can run a new microsoft/go release (1.20.3-2) so you can use it.
(I believe there's an upstream issue for Go to provide something like go tool distro so we don't need to maintain our own distribution scripts, but I can't find it at the moment.)

-distpack is what I had in mind, and it was merged into upstream master last week:
https://go-review.googlesource.com/c/go/+/470676.
The original x/build/cmd/release command was deleted in https://github.com/golang/build/commit/97ad0ce4dd678045d4f339e43db7581c4c364546, and it looks like the code we need to emulate now lives around here: https://github.com/golang/build/blob/208db0ba5f4e4fdfdc462e9c0af3f0e0999f6d45/internal/task/buildrelease.go#L225-L285

This is now fixed in 1.20.3-2. (Fresh mcr.microsoft.com/oss/go/microsoft/golang:1.20 etc.) Thanks again for the report!

Works like a charm 💯
Thanks @dagood!

authors: dagood princjef

repo: microsoft/go


text:
Fragment COSE Sign1 support.

Fragment COSE Sign1 support. Allows for a fragment presented by the host to be checked for a good cert chain and a valid issuer DID that matches the certs and so the signature. Includes DID and COSE Sign1 packages and tooling.
Signed-off-by: Ken Gordon ken.gordon@microsoft.com

The PR title is too long for one line. Can you please format it so the title is a short description, and the PR body has a more detailed description.

Test cases are not useful when you want to know why your encrypted UVM does not start.
WPA is not at all nice and it is hard/impossible to find the entries and always impossible to grep them. I did try that ahead of all the various logging hacking I have done on this project. In the end the most effective way is to set the initial vsockexec to target an entirely different port and run a listener on that. I guess you all take the startup of the UVM for granted so don't really understand how fiddly that part is.

From: Hamza El-Saawy @.>
Sent: 02 December 2022 19:42
To: microsoft/hcsshim @.>
Cc: Ken Gordon @.>; Author @.>
Subject: Re: [microsoft/hcsshim] Fragment COSE Sign1 support. (PR #1575)
@helsaawy commented on this pull request.

In cmd/gcs/main.gohttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fhcsshim%2Fpull%2F1575%23discussion_r1038471235&data=05|01|ken.gordon%40microsoft.com|9306569e3c4b4b9c8a9808dad49d676a|72f988bf86f141af91ab2d7cd011db47|1|0|638056069777688580|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=X9ahTDuDR52D8iNB%2FEC1MjlQjwCBn%2BA5jDInR8bbS%2F4%3D&reserved=0:

@@ -178,7 +178,7 @@ func main() {
uint(kmsg.Warning),
"Log all kmsg entries with a priority less than or equal to the supplied level.")
logFile := flag.String("logfile",

          "",

          "/tmp/gcs.log",

wpa using the ContainerPlatform.wprp file in our package should do it, as will TV++ using the adjacent ContainerPlatform.tvpp file
You can also create test cases in test/functional or test/gcs and run those, since they should output to stdout by default
—
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fhcsshim%2Fpull%2F1575%23discussion_r1038471235&data=05|01|ken.gordon%40microsoft.com|9306569e3c4b4b9c8a9808dad49d676a|72f988bf86f141af91ab2d7cd011db47|1|0|638056069777688580|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=X9ahTDuDR52D8iNB%2FEC1MjlQjwCBn%2BA5jDInR8bbS%2F4%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABI7RIH3WVYAOCUGQTBCZNLWLJGLZANCNFSM6AAAAAASJBPXQQ&data=05|01|ken.gordon%40microsoft.com|9306569e3c4b4b9c8a9808dad49d676a|72f988bf86f141af91ab2d7cd011db47|1|0|638056069777688580|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=sV7e%2FFLLFy6Jl3hKAhzUVxCiZ2Mt%2Bb8r%2BJSdZZhUcAw%3D&reserved=0.
You are receiving this because you authored the thread.Message ID: @.***>

authors: KenGordon kevpar

repo: microsoft/hcsshim