Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 20c3421

Browse files
authored
Merge pull request #92 from splunk/release/2.2.9
Release/2.2.9
2 parents 8b20b49 + 494120b commit 20c3421

File tree

15 files changed

+183
-21
lines changed

15 files changed

+183
-21
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Splunk SDK for C# PCL
22

3+
## Version 2.2.9
4+
5+
### Bug Fixes
6+
7+
* Allow search jobs to be created if going into a queued state (GitHub pull request https://github.com/splunk/splunk-sdk-csharp-pcl/pull/91)
8+
* Fix to preview action enums (GitHub pull request https://github.com/splunk/splunk-sdk-csharp-pcl/pull/53)
9+
310
## Version 2.2.8
411

512
### Bug Fixes

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Splunk SDK for C#
2-
## Version 2.2.8
2+
## Version 2.2.9
33

44
> **Note:** For the most up to date documentation for the Splunk SDK for C#,
55
> see http://dev.splunk.com/csharp.
@@ -98,7 +98,7 @@ Here's what you need to get going with the Splunk SDK for C# version 2.x.
9898
If you haven't already installed Splunk Enterprise, download it at
9999
<http://www.splunk.com/download>. For more information about installing and
100100
running Splunk Enterprise and system requirements, see the
101-
[Splunk Installation Manual](http://docs.splunk.com/Documentation/Splunk/latest/Installation).
101+
[Splunk Installation Manual](http://docs.splunk.com/Documentation/Splunk/latest/Installation). The Splunk SDK for .NET has been tested with Splunk Enterprise 7.0 and 7.2.
102102

103103
#### Developer environments
104104

appveyor.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ init:
77
# Build 6.2 and 6.3
88
environment:
99
matrix:
10-
- SPLUNK_VERSION: 6.6.5
11-
SPLUNK_BUILD: b119a2a8b0ad
12-
SDK_APP_VERSION: 1.0.0
1310
- SPLUNK_VERSION: 7.0.1
1411
SPLUNK_BUILD: 2b5b15c4ee89
1512
SDK_APP_VERSION: 1.0.0
13+
- SPLUNK_VERSION: 7.2.0
14+
SPLUNK_BUILD: 8c86330ac18
15+
SDK_APP_VERSION: 1.0.0
1616

1717

1818
install:
@@ -27,7 +27,9 @@ install:
2727
- cmd: dir c:\splunk\splunk\etc\apps
2828

2929
# temp workaround to resolve tsl1.2 not supported by .net, downgrade splunk to use tsl1.0
30-
- cmd: type server_ssl.conf >> C:\splunk\splunk\etc\system\local\server.conf
30+
- cmd: type ci\server_ssl.conf >> C:\splunk\splunk\etc\system\local\server.conf
31+
# Create admin:changme user
32+
- cmd: type ci\user-seed.conf >> C:\splunk\splunk\etc\system\local\user-seed.conf
3133

3234
# Install the Splunk service and start it
3335
- cmd: cmd /C "set PATH=C:\splunk\splunk && C:\splunk\splunk\bin\splunk.exe enable boot-start"
File renamed without changes.

ci/user-seed.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# create admin user
2+
[user_info]
3+
USERNAME = admin
4+
PASSWORD = changeme

src/Splunk.Client.Helpers/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("2.2.8.0")]
36-
[assembly: AssemblyFileVersion("2.2.8.0")]
35+
[assembly: AssemblyVersion("2.2.9.0")]
36+
[assembly: AssemblyFileVersion("2.2.9.0")]

src/Splunk.Client/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@
4141

4242
//// Version information
4343

44-
[assembly: AssemblyVersion("2.2.8.0")]
45-
[assembly: AssemblyFileVersion("2.2.8.0")]
44+
[assembly: AssemblyVersion("2.2.9.0")]
45+
[assembly: AssemblyFileVersion("2.2.9.0")]

src/Splunk.Client/Splunk/Client/Context.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public Context(Scheme scheme, string host, int port, TimeSpan timeout, HttpMessa
101101
this.Host = host;
102102
this.Port = port;
103103
this.httpClient = handler == null ? new HttpClient(new HttpClientHandler { UseCookies = false }) : new HttpClient(handler, disposeHandler);
104-
this.httpClient.DefaultRequestHeaders.Add("User-Agent", "splunk-sdk-csharp/2.2.8");
104+
this.httpClient.DefaultRequestHeaders.Add("User-Agent", "splunk-sdk-csharp/2.2.9");
105105
this.CookieJar = new CookieStore();
106106

107107
if (timeout != default(TimeSpan))

src/Splunk.Client/Splunk/Client/DateTimeConverter.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,14 @@ public override DateTime Convert(object input)
5858
return x.Value;
5959
}
6060

61-
DateTime value;
61+
var dateString = input.ToString();
62+
if (dateString.Trim().Equals(""))
63+
{
64+
return DateTime.MinValue;
65+
}
6266

63-
if (DateTime.TryParse(input.ToString(), result: out value))
67+
DateTime value;
68+
if (DateTime.TryParse(dateString, result: out value))
6469
{
6570
return value;
6671
}

src/Splunk.Client/Splunk/Client/Job.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ public virtual async Task GetAsync(DispatchState dispatchState, int delay = 3000
458458
{
459459
using (var cancellationTokenSource = new CancellationTokenSource())
460460
{
461+
// Timeout if Job is never at least the requiredState
461462
cancellationTokenSource.CancelAfter(delay);
462463
var token = cancellationTokenSource.Token;
463464

@@ -470,7 +471,8 @@ public virtual async Task GetAsync(DispatchState dispatchState, int delay = 3000
470471
await response.EnsureStatusCodeAsync(HttpStatusCode.OK).ConfigureAwait(false);
471472
await this.ReconstructSnapshotAsync(response).ConfigureAwait(false);
472473

473-
if (this.DispatchState >= dispatchState)
474+
// None or Parsing are the only states to continue checking status for
475+
if (this.DispatchState >= dispatchState || this.DispatchState == DispatchState.Queued)
474476
{
475477
break;
476478
}
@@ -702,12 +704,12 @@ protected internal override async Task<bool> ReconstructSnapshotAsync(Response r
702704

703705
static readonly Argument[] DisablePreview = new Argument[]
704706
{
705-
new Argument("action", "disable_preview")
707+
new Argument("action", "disablepreview")
706708
};
707709

708710
static readonly Argument[] EnablePreview = new Argument[]
709711
{
710-
new Argument("action", "enable_preview")
712+
new Argument("action", "enablepreview")
711713
};
712714

713715
static readonly Argument[] Finalize = new Argument[]

0 commit comments

Comments
 (0)