Skip to content

Commit 5015e1f

Browse files
committed
wip
1 parent 7bb0c1f commit 5015e1f

File tree

4 files changed

+23
-15
lines changed

4 files changed

+23
-15
lines changed

.github/actions/clippy-annotation-reporter/src/commenter.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ async fn find_existing_comment(
8989
break;
9090
}
9191
Err(e) => {
92-
// TODO: EK - Handle error more gracefully
9392
error!("Warning: Failed to fetch next page of comments: {}", e);
9493
break;
9594
}

.github/actions/clippy-annotation-reporter/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ impl Config {
157157
// Use provided values from args if available, otherwise use context
158158
// TODO: EK - FIX THIS CLONE
159159
let repository = args.clone().repo.unwrap_or(github_ctx.repository);
160-
160+
warn!("using args: {:?}", args);
161161
let pr_number = match args.pr {
162162
Some(pr) => pr,
163163
None => {

.github/actions/clippy-annotation-reporter/src/main.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Copyright 2024-Present Datadog, Inc. https://www.datadoghq.com/
22
// SPDX-License-Identifier: Apache-2.0
33

4-
use std::env;
54
use anyhow::{Context as _, Result};
65
use log::info;
76
use octocrab::Octocrab;
7+
use std::env;
88

99
mod analyzer;
1010
mod commenter;
@@ -22,14 +22,13 @@ async fn main() -> Result<()> {
2222
if env::var("RUST_LOG").is_err() {
2323
env::set_var("RUST_LOG", &log_level);
2424
}
25-
25+
2626
env_logger::init();
2727

2828
info!("Clippy Annotation Reporter starting...");
2929

3030
let config = ConfigBuilder::new().build()?;
3131

32-
// TODO: EK - Should we use context here?
3332
let octocrab = Octocrab::builder()
3433
.personal_token(config.token.clone())
3534
.build()

datadog-trace-protobuf/src/remoteconfig.rs

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@
33

44
use serde::{Deserialize, Serialize};
55
// This file is @generated by prost-build.
6-
#[derive(Deserialize, Serialize, Clone, PartialEq, ::prost::Message)]
6+
#[derive(Deserialize, Serialize)]
7+
#[derive(Clone, PartialEq, ::prost::Message)]
78
pub struct File {
89
#[prost(string, tag = "1")]
910
pub path: ::prost::alloc::string::String,
1011
#[prost(bytes = "vec", tag = "2")]
1112
#[serde(with = "serde_bytes")]
1213
pub raw: ::prost::alloc::vec::Vec<u8>,
1314
}
14-
#[derive(Deserialize, Serialize, Clone, PartialEq, ::prost::Message)]
15+
#[derive(Deserialize, Serialize)]
16+
#[derive(Clone, PartialEq, ::prost::Message)]
1517
pub struct Client {
1618
#[prost(message, optional, tag = "1")]
1719
pub state: ::core::option::Option<ClientState>,
@@ -33,7 +35,8 @@ pub struct Client {
3335
#[prost(bytes = "vec", tag = "11")]
3436
pub capabilities: ::prost::alloc::vec::Vec<u8>,
3537
}
36-
#[derive(Deserialize, Serialize, Clone, PartialEq, ::prost::Message)]
38+
#[derive(Deserialize, Serialize)]
39+
#[derive(Clone, PartialEq, ::prost::Message)]
3740
pub struct ClientTracer {
3841
#[prost(string, tag = "1")]
3942
pub runtime_id: ::prost::alloc::string::String,
@@ -52,7 +55,8 @@ pub struct ClientTracer {
5255
#[prost(string, repeated, tag = "7")]
5356
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
5457
}
55-
#[derive(Deserialize, Serialize, Clone, PartialEq, ::prost::Message)]
58+
#[derive(Deserialize, Serialize)]
59+
#[derive(Clone, PartialEq, ::prost::Message)]
5660
pub struct ClientAgent {
5761
#[prost(string, tag = "1")]
5862
pub name: ::prost::alloc::string::String,
@@ -65,7 +69,8 @@ pub struct ClientAgent {
6569
#[prost(string, repeated, tag = "5")]
6670
pub cws_workloads: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
6771
}
68-
#[derive(Deserialize, Serialize, Clone, PartialEq, ::prost::Message)]
72+
#[derive(Deserialize, Serialize)]
73+
#[derive(Clone, PartialEq, ::prost::Message)]
6974
pub struct ConfigState {
7075
#[prost(string, tag = "1")]
7176
pub id: ::prost::alloc::string::String,
@@ -78,7 +83,8 @@ pub struct ConfigState {
7883
#[prost(string, tag = "5")]
7984
pub apply_error: ::prost::alloc::string::String,
8085
}
81-
#[derive(Deserialize, Serialize, Clone, PartialEq, ::prost::Message)]
86+
#[derive(Deserialize, Serialize)]
87+
#[derive(Clone, PartialEq, ::prost::Message)]
8288
pub struct ClientState {
8389
#[prost(uint64, tag = "1")]
8490
pub root_version: u64,
@@ -93,14 +99,16 @@ pub struct ClientState {
9399
#[prost(bytes = "vec", tag = "6")]
94100
pub backend_client_state: ::prost::alloc::vec::Vec<u8>,
95101
}
96-
#[derive(Deserialize, Serialize, Clone, PartialEq, ::prost::Message)]
102+
#[derive(Deserialize, Serialize)]
103+
#[derive(Clone, PartialEq, ::prost::Message)]
97104
pub struct TargetFileHash {
98105
#[prost(string, tag = "1")]
99106
pub algorithm: ::prost::alloc::string::String,
100107
#[prost(string, tag = "3")]
101108
pub hash: ::prost::alloc::string::String,
102109
}
103-
#[derive(Deserialize, Serialize, Clone, PartialEq, ::prost::Message)]
110+
#[derive(Deserialize, Serialize)]
111+
#[derive(Clone, PartialEq, ::prost::Message)]
104112
pub struct TargetFileMeta {
105113
#[prost(string, tag = "1")]
106114
pub path: ::prost::alloc::string::String,
@@ -109,14 +117,16 @@ pub struct TargetFileMeta {
109117
#[prost(message, repeated, tag = "3")]
110118
pub hashes: ::prost::alloc::vec::Vec<TargetFileHash>,
111119
}
112-
#[derive(Deserialize, Serialize, Clone, PartialEq, ::prost::Message)]
120+
#[derive(Deserialize, Serialize)]
121+
#[derive(Clone, PartialEq, ::prost::Message)]
113122
pub struct ClientGetConfigsRequest {
114123
#[prost(message, optional, tag = "1")]
115124
pub client: ::core::option::Option<Client>,
116125
#[prost(message, repeated, tag = "2")]
117126
pub cached_target_files: ::prost::alloc::vec::Vec<TargetFileMeta>,
118127
}
119-
#[derive(Deserialize, Serialize, Clone, PartialEq, ::prost::Message)]
128+
#[derive(Deserialize, Serialize)]
129+
#[derive(Clone, PartialEq, ::prost::Message)]
120130
pub struct ClientGetConfigsResponse {
121131
#[prost(bytes = "vec", repeated, tag = "1")]
122132
#[serde(with = "crate::serde")]

0 commit comments

Comments
 (0)