Skip to content

feat: expose 'nr-path:agent_dir' when expanding values - #2783

Merged
sigilioso merged 3 commits into
mainfrom
feat/expose-filesystem-path
Aug 10, 2026
Merged

feat: expose 'nr-path:agent_dir' when expanding values#2783
sigilioso merged 3 commits into
mainfrom
feat/expose-filesystem-path

Conversation

@sigilioso

@sigilioso sigilioso commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

This exposes the new variable ${nr-path:agent_dir} when expanding user values. This allows referencing additional configuration files from a particular configuration in agent types.

Example from the unit test:

agent-type:

name: first
namespace: newrelic
version: 0.1.0
platform: host
operating_system: linux
variables:
  config:
    description: ""
    type: string
    required: true
  extra_configs:
    description: ""
    type: string_map
    required: true
deployment:
  filesystem:
    extra_configs:
      kind: dir_content_from_map
      source: ${nr-var:extra_configs}
    config.toml:
      kind: file
      text: ${nr-var:config}
  executables:
    - id: first
      path: /opt/first
      args:
        - --config
        - ${nr-sub:filesystem_agent_dir}/config.toml

values:

config: |
  extra = ${nr-path:agent_dir}/extra_configs/extra.txt

extra_configs:
  extra.txt: |
    SOME CONTENT
#,

@sigilioso
sigilioso requested a review from a team as a code owner August 6, 2026 13:05
@sigilioso
sigilioso force-pushed the feat/expose-filesystem-path branch from e062f72 to d6af80e Compare August 6, 2026 13:10
@sigilioso
sigilioso force-pushed the feat/expose-filesystem-path branch from d6af80e to e4da4af Compare August 6, 2026 13:19
@sigilioso
sigilioso force-pushed the feat/expose-filesystem-path branch from e4da4af to abea207 Compare August 6, 2026 15:11
@sigilioso
sigilioso force-pushed the feat/expose-filesystem-path branch from c25b421 to ef54ff2 Compare August 7, 2026 06:36
@sigilioso
sigilioso force-pushed the feat/expose-filesystem-path branch 2 times, most recently from 4fd8958 to d69448c Compare August 7, 2026 07:54
gsanchezgavier
gsanchezgavier previously approved these changes Aug 7, 2026

@gsanchezgavier gsanchezgavier left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! i'm not sure how is the current docs about this , but it would be worth to check and document it


let (variable_tree, runtime_config) = (agent_type.variables, agent_type.runtime_config);

// Expand user values

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we could improve this comment with why we are expanding secrets and this var.

Base automatically changed from chore/unify-assembler-renderer to main August 7, 2026 09:17
@sigilioso
sigilioso force-pushed the feat/expose-filesystem-path branch from d69448c to f0ec9be Compare August 7, 2026 09:17
@sigilioso
sigilioso force-pushed the feat/expose-filesystem-path branch from 9b3cfd2 to 86df629 Compare August 10, 2026 06:16
@sigilioso
sigilioso merged commit ba6c863 into main Aug 10, 2026
34 checks passed
@sigilioso
sigilioso deleted the feat/expose-filesystem-path branch August 10, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants