Skip to content

Commit 9a78ed9

Browse files
authored
allow passing feature flags along with artifact uploads (#77)
1 parent f59dfb9 commit 9a78ed9

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

src/bitdrift_public/protobuf/client/v1/api.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import "bitdrift_public/protobuf/filter/v1/filter.proto";
1515
import "bitdrift_public/protobuf/workflow/v1/workflow.proto";
1616
import "bitdrift_public/protobuf/bdtail/v1/bdtail_config.proto";
1717
import "bitdrift_public/protobuf/config/v1/config.proto";
18+
import "bitdrift_public/protobuf/client/v1/feature_flag.proto";
1819
import "bitdrift_public/protobuf/logging/v1/payload.proto";
1920
import "validate/validate.proto";
2021

@@ -302,6 +303,9 @@ message UploadArtifactRequest {
302303

303304
// The session ID associated with the artifact.
304305
string session_id = 7 [(validate.rules).string = {min_len: 1}];
306+
307+
// The set of feature flags that were active at the time of artifact emission.
308+
repeated FeatureFlag feature_flags = 8;
305309
}
306310

307311
message UploadArtifactResponse {

src/bitdrift_public/protobuf/client/v1/artifact.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ syntax = "proto3";
99

1010
import "google/protobuf/timestamp.proto";
1111
import "bitdrift_public/protobuf/logging/v1/payload.proto";
12+
import "bitdrift_public/protobuf/client/v1/feature_flag.proto";
1213

1314
package bitdrift_public.protobuf.client.v1;
1415

@@ -31,6 +32,8 @@ message ArtifactUploadIndex {
3132
map<string, bitdrift_public.protobuf.logging.v1.Data> state_metadata = 5;
3233

3334
string session_id = 6;
35+
36+
repeated FeatureFlag feature_flags = 7;
3437
}
3538

3639
// List of files, in order of time, that are pending upload.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// api - bitdrift's client/server API definitions
2+
// Copyright Bitdrift, Inc. All rights reserved.
3+
//
4+
// Use of this source code and APIs are governed by a source available license that can be found in
5+
// the LICENSE file or at:
6+
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt
7+
8+
syntax = "proto3";
9+
10+
import "google/protobuf/timestamp.proto";
11+
import "validate/validate.proto";
12+
13+
package bitdrift_public.protobuf.client.v1;
14+
message FeatureFlag {
15+
// The name of the feature flag.
16+
string name = 1 [(validate.rules).string = {min_len: 1}];
17+
18+
// The variant of the feature flag, if any.
19+
optional string variant = 2;
20+
21+
// The last time the feature flag was updated.
22+
google.protobuf.Timestamp last_updated = 3 [(validate.rules).message = {required: true}];
23+
}

0 commit comments

Comments
 (0)