Skip to content

Commit c06c37e

Browse files
lint
1 parent 062f2b3 commit c06c37e

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

backend/graph-proxy/src/graphql/workflow_templates.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,16 @@ enum WorkflowTemplateParsingError {
3838
MalformParameterSchema(#[from] serde_json::Error),
3939
}
4040

41+
/// Information about where the template is stored
4142
#[derive(Debug, Serialize, Deserialize, Default, Clone, SimpleObject, Eq, PartialEq)]
4243
struct GitHubPath {
44+
/// The path to the template within the repository
4345
path: String,
4446
#[serde(rename = "repoURL")]
47+
/// The URL of the GitHub repository
4548
repo_url: String,
4649
#[serde(rename = "targetRevision")]
50+
/// The current tracked branch of the repository
4751
target_revision: String,
4852
}
4953

@@ -116,6 +120,7 @@ impl WorkflowTemplate {
116120
Ok(UiSchema::new(&self.metadata.annotations)?.map(Json))
117121
}
118122

123+
/// Information about the location of the template
119124
async fn template_url(&self) -> Result<GitHubPath, WorkflowTemplateParsingError> {
120125
let instance = match self.metadata.labels.get("argocd.argoproj.io/instance") {
121126
Some(val) => val,
@@ -130,15 +135,15 @@ impl WorkflowTemplate {
130135
&ApiResource::from_gvk_with_plural(&gvk, "applications"),
131136
);
132137

133-
let obj = api.get(&instance).await.unwrap();
138+
let obj = api.get(instance).await.unwrap();
134139
let group_annotations = obj.metadata.annotations.clone().unwrap_or_default();
135140
let last_config =
136141
match group_annotations.get("kubectl.kubernetes.io/last-applied-configuration") {
137142
Some(s) => s,
138143
None => "",
139144
};
140145

141-
let last_config_val: Value = serde_json::from_str(&last_config)?;
146+
let last_config_val: Value = serde_json::from_str(last_config)?;
142147
let source: GitHubPath = match last_config_val.get("spec") {
143148
Some(val) => match val.get("source") {
144149
Some(src) => serde_json::from_value(src.clone()).unwrap(),

charts/graph-proxy/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ image:
22
registry: ghcr.io
33
repository: diamondlightsource/workflows-graph-proxy
44
tag: "jamesdoingstuff"
5-
digest: "sha256:402c265cd724b7598136cb5f06b4db6adf8a26b1488478e35048072ca165f539"
5+
digest: "sha256:df9f09447a9580eea4a79919a0417507b7e938ad595cb7d2d0e0b39e263d3164"
66
pullPolicy: IfNotPresent
77
pullSecrets: []
88

0 commit comments

Comments
 (0)