Skip to content

Commit

Permalink
Merge branch 'deephaven:main' into docs-ci-condition-on-latest-link
Browse files Browse the repository at this point in the history
  • Loading branch information
stanbrub authored Jan 29, 2025
2 parents 57b0f95 + f79fe67 commit f82668b
Show file tree
Hide file tree
Showing 15 changed files with 157 additions and 47 deletions.
2 changes: 2 additions & 0 deletions csharp/ExcelAddIn/util/Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
namespace Deephaven.ExcelAddIn.Util;

internal static class Utility {
public const string VersionString = "Version 0.8.0";

public static T Exchange<T>(ref T item, T newValue) {
var result = item;
item = newValue;
Expand Down
15 changes: 12 additions & 3 deletions csharp/ExcelAddIn/views/ConnectionManagerDialog.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion csharp/ExcelAddIn/views/ConnectionManagerDialog.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Deephaven.ExcelAddIn.Viewmodels;
using Deephaven.ExcelAddIn.Util;
using Deephaven.ExcelAddIn.Viewmodels;

namespace Deephaven.ExcelAddIn.Views;

Expand All @@ -18,6 +19,7 @@ public ConnectionManagerDialog() {

_bindingSource.DataSource = typeof(ConnectionManagerDialogRow);
dataGridView1.DataSource = _bindingSource;
versionLabel.Text = Utility.VersionString;
}

public void AddRow(ConnectionManagerDialogRow row) {
Expand Down
7 changes: 2 additions & 5 deletions csharp/ExcelAddIn/views/ConnectionManagerDialog.resx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Microsoft ResX Schema
Version 2.0
Expand Down Expand Up @@ -48,7 +48,7 @@
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
Expand Down Expand Up @@ -117,7 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="colorDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
52 changes: 32 additions & 20 deletions csharp/ExcelAddIn/views/CredentialsDialog.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion csharp/ExcelAddIn/views/CredentialsDialog.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Deephaven.ExcelAddIn.ViewModels;
using Deephaven.ExcelAddIn.Util;
using Deephaven.ExcelAddIn.ViewModels;

namespace ExcelAddIn.views {
public partial class CredentialsDialog : Form {
Expand Down Expand Up @@ -47,6 +48,9 @@ public CredentialsDialog(CredentialsDialogViewModel vm) {
// Bind the IsDefault property
makeDefaultCheckBox.DataBindings.Add(nameof(makeDefaultCheckBox.Checked),
vm, nameof(vm.IsDefault));

// Set the version label
versionLabel.Text = Utility.VersionString;
}

public void SetTestResultsBox(string testResultsState) {
Expand Down
4 changes: 2 additions & 2 deletions csharp/ExcelAddIn/views/CredentialsDialog.resx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Microsoft ResX Schema
Version 2.0
Expand Down Expand Up @@ -48,7 +48,7 @@
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
Expand Down
8 changes: 4 additions & 4 deletions csharp/ExcelAddInInstaller/ExcelAddInInstaller.aip
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
<ROW Property="BannerBitmap" Value="banner.jpg" MultiBuildValue="DefaultBuild:Banner.jpg" Type="1" MsiKey="BannerBitmap"/>
<ROW Property="DialogBitmap" Value="dialog.jpg" MultiBuildValue="DefaultBuild:Dialog.jpg" Type="1" MsiKey="DialogBitmap"/>
<ROW Property="Manufacturer" Value="Deephaven Data Labs LLC"/>
<ROW Property="ProductCode" Value="1033:{5C1E1B63-CC23-4F4D-8564-A843AA5D7413} " Type="16"/>
<ROW Property="ProductCode" Value="1033:{7CA02F46-8607-4C9B-8372-AAAACD94DAC4} " Type="16"/>
<ROW Property="ProductLanguage" Value="1033"/>
<ROW Property="ProductName" Value="Deephaven Excel Add-In"/>
<ROW Property="ProductVersion" Value="1.0.0" Options="32"/>
<ROW Property="ProductVersion" Value="0.8.0" Options="32"/>
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/>
<ROW Property="UpgradeCode" Value="{98EB9359-8BA3-44BA-A411-AED290E6EBD9}"/>
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
Expand Down Expand Up @@ -67,7 +67,7 @@
<ROW Component="zstd.dll" ComponentId="{4DE80229-9EDC-40D0-9B91-4E6BCECAC0C9}" Directory_="APPDIR" Attributes="256" KeyPath="zstd.dll"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
<ROW Feature="A0BFC224E0E9125ADE0B2DBF343" Title=".NET Desktop Runtime 8.0.8 x64" Description=".NET Desktop Runtime 8.0.8 x64" Display="3" Level="1" Attributes="0"/>
<ROW Feature="A0BFC224E0E9125ADE0B2DBF343" Title=".NET Desktop Runtime 8.0.12 x64" Description=".NET Desktop Runtime 8.0.12 x64" Display="3" Level="1" Attributes="0"/>
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0"/>
<ATTRIBUTE name="CurrentFeature" value="MainFeature"/>
</COMPONENT>
Expand Down Expand Up @@ -351,7 +351,7 @@
<ROW UpgradeCode="[|UpgradeCode]" VersionMin="[|ProductVersion]" Attributes="2" ActionProperty="AI_NEWERPRODUCTFOUND"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.PreReqComponent">
<ROW PrereqKey="A0BFC224E0E9125ADE0B2DBF343" DisplayName=".NET Desktop Runtime 8.0.8 x64" VersionMin="8.0" SetupFileUrl="Prerequisites\.NET 8.0\windowsdesktop-runtime-8.0.8-win-x64.exe" Location="0" ExactSize="0" WinNTVersions="Windows 9x/ME/NT/2000/XP/Vista/Windows 7/Windows 8 x86/Windows 8.1 x86/Windows 10 x86" WinNT64Versions="Windows 7 RTM x64, Windows 8 x64, Windows Server 2012 x64, Windows 10 version 1507 x64, Windows 10 version 1511 x64" Operator="1" NoUiComLine="/q /norestart" Options="fx" TargetName=".NET 8.0\windowsdesktop-runtime-8.0.8-win-x64.exe" Feature="A0BFC224E0E9125ADE0B2DBF343"/>
<ROW PrereqKey="A0BFC224E0E9125ADE0B2DBF343" DisplayName=".NET Desktop Runtime 8.0.12 x64" VersionMin="8.0" SetupFileUrl="Prerequisites\.NET 8.0\windowsdesktop-runtime-8.0.12-win-x64.exe" Location="0" ExactSize="0" WinNTVersions="Windows 9x/ME/NT/2000/XP/Vista/Windows 7/Windows 8 x86/Windows 8.1 x86/Windows 10 x86" WinNT64Versions="Windows 7 RTM x64, Windows 8 x64, Windows Server 2012 x64, Windows 10 version 1507 x64, Windows 10 version 1511 x64" Operator="1" NoUiComLine="/q /norestart" Options="fx" TargetName=".NET 8.0\windowsdesktop-runtime-8.0.12-win-x64.exe" Feature="A0BFC224E0E9125ADE0B2DBF343"/>
<ATTRIBUTE name="PrereqsOrder" value="A0BFC224E0E9125ADE0B2DBF343"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.PreReqSearchComponent">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.exe
9 changes: 9 additions & 0 deletions csharp/ExcelAddInInstaller/Prerequisites/.NET 8.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
This file is a placeholder that creates this directory in source control.

This directory is the location of the prerequisites for the Deephaven Excel
AddIn. Currently it holds the .exe file for the .NET 8.0 Windows Desktop
Runtime installer. You are meant to download this installer from Microsoft
and place it in this directory.

Instructions for doing so are in Confluence in the article entitled
"Creating a Windows MSI Installer for the Deephaven Excel Add-In (2nd gen)"
5 changes: 5 additions & 0 deletions csharp/ExcelAddInInstaller/VERSIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Deephaven Excel Addin Versions

0.8.0:
Built against Community Core at hash 5f62c5bc36d1cad63e3c9ddf33bedc83cb6bf377
Built against Enterprise Core+ at release grizzly/1.20240517.349
5 changes: 3 additions & 2 deletions csharp/ExcelAddInInstaller/dhinstall/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.dll
*.exe
bin/
include/
lib/
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ private void flushTerminalNotifications() {
runNotification(notificationForThisThread);
}

// We can not proceed until all of the terminal notifications have executed.
// We can not proceed until all the terminal notifications have executed.
notificationProcessor.doAllWork();
}

Expand Down Expand Up @@ -836,6 +836,10 @@ private void computeStatsAndLogCycle(final long cycleTimeNanos) {
}
}

void reportLockWaitNanos(final long lockWaitNanos) {
currentCycleLockWaitTotalNanos += lockWaitNanos;
}

/**
* Is the provided cycle time on budget?
*
Expand Down Expand Up @@ -907,7 +911,7 @@ void refreshAllTables() {
private void doRefresh(@NotNull final Runnable refreshFunction) {
final long lockStartTimeNanos = System.nanoTime();
exclusiveLock().doLocked(() -> {
currentCycleLockWaitTotalNanos += System.nanoTime() - lockStartTimeNanos;
reportLockWaitNanos(System.nanoTime() - lockStartTimeNanos);
if (!running) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,22 @@ public int parallelismFactor() {
*/
@Override
public void requestRefresh() {
maybeStart();
// do the work to refresh everything, on this thread
isUpdateThread.set(true);
try (final SafeCloseable ignored = ExecutionContext.newBuilder().setUpdateGraph(this).build().open()) {
refreshAllTables();
} finally {
isUpdateThread.remove();
if (isUpdateThread.get()) {
throw new IllegalStateException("Cannot request a refresh from an update thread");
}
maybeStart();
// Do the work to refresh everything, driven by this thread. Note that we acquire the lock "early" in order to
// avoid any inconsistencies w.r.t. assumptions about clock, lock, and update-thread state.
final long lockStartTimeNanos = System.nanoTime();
exclusiveLock().doLocked(() -> {
reportLockWaitNanos(System.nanoTime() - lockStartTimeNanos);
isUpdateThread.set(true);
try (final SafeCloseable ignored = ExecutionContext.newBuilder().setUpdateGraph(this).build().open()) {
refreshAllTables();
} finally {
isUpdateThread.remove();
}
});
final long nowNanos = System.nanoTime();
synchronized (this) {
maybeFlushUpdatePerformance(nowNanos, nowNanos);
Expand Down
Loading

0 comments on commit f82668b

Please sign in to comment.