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

Commit d063ea3

Browse files
authored
Merge branch 'main' into user/noharper/add-public-events
2 parents 2282308 + abcfa4f commit d063ea3

File tree

110 files changed

+2447
-536
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+2447
-536
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ lcov.info
1818

1919
/src/ApiService/ApiService/Properties/PublishProfiles/*
2020
/src/ApiService/ApiService/Properties/ServiceDependencies/*
21+
22+
.vs

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,22 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## 6.0.0
7+
## 6.1.0
8+
### Added
9+
* Service: Added support for feature flags which allows us to deploy new code in parts and turn it on when it's ready. [#2620](https://github.com/microsoft/onefuzz/pull/2620)
10+
* Service: Added a validation endpoint for the notification template. [#2655](https://github.com/microsoft/onefuzz/pull/2655)
11+
### Changed
12+
* Service: Update LLVM from v10 to v12 now that we are supporting Ubuntu 20.04 as our default image. [#2617](https://github.com/microsoft/onefuzz/pull/2617)
13+
* Agent: Remove unused coverage recorder from `input-tester`. [#2681](https://github.com/microsoft/onefuzz/pull/2681)
14+
* Agent: Rename `coverage` to `coverage-legacy`. [#2685](https://github.com/microsoft/onefuzz/pull/2685)
15+
### Fixed
16+
* CLI: Return an error when uppercase application names are specified when using deploy.py. [#2665](https://github.com/microsoft/onefuzz/pull/2665)
17+
* Agent: Fix local fuzzing mode. [#2669](https://github.com/microsoft/onefuzz/pull/2669)
18+
* Service: Post the JobCreated event when a job is created. [#2677](https://github.com/microsoft/onefuzz/pull/2677)
19+
* Service: The repro `Create` command will now fail if insert fails. Also add additional tests. [#2678](https://github.com/microsoft/onefuzz/pull/2678)
20+
* Service: Added support for `Contains Words` in WIQL [#2686](https://github.com/microsoft/onefuzz/pull/2686)
821

22+
## 6.0.0
923
## BREAKING CHANGES
1024

1125
### Manual Deployment Step

CURRENT_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.0.0
1+
6.1.0

contrib/deploy-onefuzz-via-azure-devops/Pipfile.lock

Lines changed: 57 additions & 74 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ApiService/ApiService/Functions/AgentRegistration.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ private async Async.Task<AgentRegistrationResponse> CreateRegistrationResponse(S
7373
var baseAddress = _context.Creds.GetInstanceUrl();
7474
var eventsUrl = new Uri(baseAddress, "/api/agents/events");
7575
var commandsUrl = new Uri(baseAddress, "/api/agents/commands");
76-
7776
var workQueue = await _context.Queue.GetQueueSas(
7877
_context.PoolOperations.GetPoolQueue(pool.PoolId),
7978
StorageType.Corpus,

src/ApiService/ApiService/Functions/Info.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.IO;
22
using System.Reflection;
3+
using System.Runtime.InteropServices;
34
using System.Threading;
45
using Microsoft.Azure.Functions.Worker;
56
using Microsoft.Azure.Functions.Worker.Http;
@@ -33,11 +34,16 @@ public Info(IEndpointAuthorization auth, IOnefuzzContext context) {
3334
var buildId = ReadResource(asm, "ApiService.onefuzzlib.build.id");
3435
var versionString = context.ServiceConfiguration.OneFuzzVersion;
3536

37+
var dotnetVersionString = $"{RuntimeInformation.FrameworkDescription} ({RuntimeInformation.RuntimeIdentifier})";
38+
3639
return new InfoResponse(
3740
ResourceGroup: resourceGroup,
3841
Subscription: subscription,
3942
Region: region,
40-
Versions: new Dictionary<string, InfoVersion> { { "onefuzz", new(gitVersion, buildId, versionString) } },
43+
Versions: new Dictionary<string, InfoVersion> {
44+
{ "onefuzz", new(gitVersion, buildId, versionString) },
45+
{ "dotnet", new("", "", dotnetVersionString) },
46+
},
4147
InstanceId: await _context.Containers.GetInstanceId(),
4248
InsightsAppid: config.ApplicationInsightsAppId,
4349
InsightsInstrumentationKey: config.ApplicationInsightsInstrumentationKey);

src/ApiService/ApiService/Functions/Pool.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ private async Task<HttpResponseData> Post(HttpRequestData req) {
6767
Errors: new string[] { "pool with that name already exists" }),
6868
"PoolCreate");
6969
}
70-
var newPool = await _context.PoolOperations.Create(name: create.Name, os: create.Os, architecture: create.Arch, managed: create.Managed, clientId: create.ClientId);
70+
var newPool = await _context.PoolOperations.Create(name: create.Name, os: create.Os, architecture: create.Arch, managed: create.Managed, objectId: create.ObjectId);
7171
return await RequestHandling.Ok(req, await Populate(PoolToPoolResponse(newPool), true));
7272
}
7373

@@ -106,7 +106,7 @@ private static PoolGetResult PoolToPoolResponse(Service.Pool p)
106106
PoolId: p.PoolId,
107107
Os: p.Os,
108108
State: p.State,
109-
ClientId: p.ClientId,
109+
ObjectId: p.ObjectId,
110110
Managed: p.Managed,
111111
Arch: p.Arch,
112112
Nodes: p.Nodes,

src/ApiService/ApiService/Functions/ValidateScriban.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ public Async.Task<HttpResponseData> Run([HttpTrigger(AuthorizationLevel.Anonymou
100100
null,
101101
null,
102102
null,
103+
null,
104+
null,
105+
null,
103106
null
104107
);
105108

src/ApiService/ApiService/GroupMembershipChecker.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public async ValueTask<bool> IsMember(IEnumerable<Guid> groupIds, Guid memberId)
1515
}
1616
}
1717

18-
class AzureADGroupMembership : GroupMembershipChecker {
18+
sealed class AzureADGroupMembership : GroupMembershipChecker {
1919
private readonly GraphServiceClient _graphClient;
2020
public AzureADGroupMembership(GraphServiceClient graphClient) => _graphClient = graphClient;
2121
protected override async IAsyncEnumerable<Guid> GetGroups(Guid memberId) {
@@ -30,7 +30,7 @@ protected override async IAsyncEnumerable<Guid> GetGroups(Guid memberId) {
3030
}
3131
}
3232

33-
class StaticGroupMembership : GroupMembershipChecker {
33+
sealed class StaticGroupMembership : GroupMembershipChecker {
3434
private readonly IReadOnlyDictionary<Guid, IReadOnlyList<Guid>> _memberships;
3535
public StaticGroupMembership(IDictionary<Guid, Guid[]> memberships) {
3636
_memberships = memberships.ToDictionary(kvp => kvp.Key, kvp => (IReadOnlyList<Guid>)kvp.Value.ToList());

src/ApiService/ApiService/Log.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public interface ILog {
6161
void Flush();
6262
}
6363

64-
class AppInsights : ILog {
64+
sealed class AppInsights : ILog {
6565
private readonly TelemetryClient _telemetryClient;
6666

6767
public AppInsights(TelemetryClient client) {
@@ -128,7 +128,7 @@ public void Flush() {
128128
}
129129

130130
//TODO: Should we write errors and Exception to std err ?
131-
class Console : ILog {
131+
sealed class Console : ILog {
132132

133133
private static string DictToString<T>(IReadOnlyDictionary<string, T>? d) {
134134
if (d is null) {
@@ -187,6 +187,7 @@ public interface ILogTracer {
187187
void ForceFlush();
188188
void Info(LogStringHandler message);
189189
void Warning(LogStringHandler message);
190+
void Warning(Error error);
190191
void Verbose(LogStringHandler message);
191192

192193
ILogTracer WithTag(string k, string v);
@@ -342,6 +343,10 @@ public void ForceFlush() {
342343
public void Error(Error error) {
343344
Error($"{error:Tag:Error}");
344345
}
346+
347+
public void Warning(Error error) {
348+
Warning($"{error:Tag:Error}");
349+
}
345350
}
346351

347352
public interface ILogTracerFactory {

0 commit comments

Comments
 (0)