Skip to content

Commit 77adab9

Browse files
feat: package parsing on agent types (#1900)
1 parent a608946 commit 77adab9

File tree

9 files changed

+443
-8
lines changed

9 files changed

+443
-8
lines changed

Cargo.lock

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

THIRD_PARTY_NOTICES.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,18 @@ Distributed under the following license(s):
468468

469469
* MIT
470470

471+
## const_format <https://crates.io/crates/const_format>
472+
473+
Distributed under the following license(s):
474+
475+
* Zlib
476+
477+
## const_format_proc_macros <https://crates.io/crates/const_format_proc_macros>
478+
479+
Distributed under the following license(s):
480+
481+
* Zlib
482+
471483
## const_panic <https://crates.io/crates/const_panic>
472484

473485
Distributed under the following license(s):
@@ -623,6 +635,27 @@ Distributed under the following license(s):
623635
* MIT
624636
* Apache-2.0
625637

638+
## derive_builder <https://crates.io/crates/derive_builder>
639+
640+
Distributed under the following license(s):
641+
642+
* MIT
643+
* Apache-2.0
644+
645+
## derive_builder_core <https://crates.io/crates/derive_builder_core>
646+
647+
Distributed under the following license(s):
648+
649+
* MIT
650+
* Apache-2.0
651+
652+
## derive_builder_macro <https://crates.io/crates/derive_builder_macro>
653+
654+
Distributed under the following license(s):
655+
656+
* MIT
657+
* Apache-2.0
658+
626659
## derive_more <https://crates.io/crates/derive_more>
627660

628661
Distributed under the following license(s):
@@ -894,6 +927,12 @@ Distributed under the following license(s):
894927
* MIT
895928
* Apache-2.0
896929

930+
## getset <https://crates.io/crates/getset>
931+
932+
Distributed under the following license(s):
933+
934+
* MIT
935+
897936
## glob <https://crates.io/crates/glob>
898937

899938
Distributed under the following license(s):
@@ -1463,6 +1502,12 @@ Distributed under the following license(s):
14631502

14641503
* MIT
14651504

1505+
## oci-spec <https://crates.io/crates/oci-spec>
1506+
1507+
Distributed under the following license(s):
1508+
1509+
* Apache-2.0
1510+
14661511
## oid-registry <https://crates.io/crates/oid-registry>
14671512

14681513
Distributed under the following license(s):
@@ -1698,6 +1743,20 @@ Distributed under the following license(s):
16981743
* MIT
16991744
* Apache-2.0
17001745

1746+
## proc-macro-error-attr2 <https://crates.io/crates/proc-macro-error-attr2>
1747+
1748+
Distributed under the following license(s):
1749+
1750+
* MIT
1751+
* Apache-2.0
1752+
1753+
## proc-macro-error2 <https://crates.io/crates/proc-macro-error2>
1754+
1755+
Distributed under the following license(s):
1756+
1757+
* MIT
1758+
* Apache-2.0
1759+
17011760
## proc-macro2 <https://crates.io/crates/proc-macro2>
17021761

17031762
Distributed under the following license(s):
@@ -2120,6 +2179,18 @@ Distributed under the following license(s):
21202179

21212180
* MIT
21222181

2182+
## strum <https://crates.io/crates/strum>
2183+
2184+
Distributed under the following license(s):
2185+
2186+
* MIT
2187+
2188+
## strum_macros <https://crates.io/crates/strum_macros>
2189+
2190+
Distributed under the following license(s):
2191+
2192+
* MIT
2193+
21232194
## subtle <https://crates.io/crates/subtle>
21242195

21252196
Distributed under the following license(s):

agent-control/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ opentelemetry-appender-tracing = { version = "0.31.1", features = [
7171
"experimental_use_tracing_span_context",
7272
] }
7373
async-trait = "0.1.89"
74+
oci-spec = "0.8.3"
7475

7576
[target.'cfg(target_family = "unix")'.dependencies]
7677
nix = { workspace = true, features = ["signal", "user", "hostname"] }

agent-control/src/agent_type/definition.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,14 @@ deployment:
369369
- id: newrelic-infra
370370
path: /usr/bin/newrelic-infra
371371
args: "--config ${nr-var:config} --config2 ${nr-var:config2}"
372+
packages:
373+
infra-agent:
374+
type: tar.gz
375+
download:
376+
oci:
377+
registry: ${nr-var:registry}
378+
repository: ${nr-var:repository}
379+
version: ${nr-var:version}
372380
"#;
373381

374382
const GIVEN_NEWRELIC_INFRA_USER_CONFIG_YAML: &str = r#"

agent-control/src/agent_type/error.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,8 @@ pub enum AgentTypeError {
2525
RenderingTemplate(String),
2626
#[error("conflicting variable definition: {0}")]
2727
ConflictingVariableDefinition(String),
28+
#[error("unsupported package type: {0}")]
29+
UnsupportedPackageType(String),
30+
#[error("error parsing oci reference: {0}")]
31+
OCIReferenceParsingError(String),
2832
}

0 commit comments

Comments
 (0)