Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from DataDog:main #43

Merged
merged 3 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .gitlab/deploy_containers/deploy_containers_a7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ include:
- if [[ "$FLAVOR" == "-linux" ]]; then export IMG_SOURCES="${IMG_LINUX_SOURCES}"; elif [[ "$FLAVOR" == "-servercore" ]]; then export IMG_SOURCES="${IMG_WINDOWS_SOURCES}"; else export IMG_SOURCES="${IMG_LINUX_SOURCES},${IMG_WINDOWS_SOURCES}"; fi
- export IMG_DESTINATIONS="${AGENT_REPOSITORY}:${VERSION}${FLAVOR}${JMX}"

.deploy_containers-a7_win_only_image:
extends: .docker_publish_job_definition
stage: deploy_containers
dependencies: []
before_script:
- OS=$(echo $OS_LTSC_MAPPING | cut -d ':' -f 1)
- LTSC_VERSION=$(echo $OS_LTSC_MAPPING | cut -d ':' -f 2)
- if [[ "$VERSION" == "" ]]; then VERSION="$(inv agent.version --major-version 7 --url-safe --pipeline-id $PARENT_PIPELINE_ID)" || exit $?; fi
- IMG_BASE_SRC="${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}"
- export IMG_SOURCES="${IMG_BASE_SRC}-7${JMX}-win${OS}${FLAVOR}-amd64"
- export IMG_DESTINATIONS="${AGENT_REPOSITORY}:${VERSION}${FLAVOR}-ltsc${LTSC_VERSION}${JMX}"

.deploy_containers-a7_external:
extends: .deploy_containers-a7-base
Expand All @@ -45,6 +56,20 @@ include:
- "-servercore"
- "-linux"

.deploy_containers-a7_win_only_external:
extends: .deploy_containers-a7_win_only_image
parallel:
matrix:
- JMX:
- ""
- "-jmx"
OS_LTSC_MAPPING:
- "ltsc2022:2022"
- "1809:2019"
FLAVOR:
- ""
- "-servercore"

.deploy_containers-a7-base-ot:
extends: .docker_publish_job_definition
stage: deploy_containers
Expand All @@ -59,6 +84,11 @@ deploy_containers-a7:
rules:
!reference [.manual_on_deploy_auto_on_rc]

deploy_containers-a7-win-only:
extends: .deploy_containers-a7_win_only_external
rules:
!reference [.manual_on_deploy_auto_on_rc]

deploy_containers-a7-ot:
extends: .deploy_containers-a7-base-ot
rules:
Expand All @@ -76,6 +106,13 @@ deploy_containers-a7-rc:
variables:
VERSION: 7-rc

deploy_containers-a7-win-only-rc:
extends: .deploy_containers-a7_win_only_external
rules:
!reference [.on_rc]
variables:
VERSION: 7-rc

deploy_containers-a7-ot-rc:
extends: .deploy_containers-a7-base-ot
rules:
Expand Down Expand Up @@ -159,6 +196,25 @@ deploy_containers_latest-a7:
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-jmx"
IMG_SOURCES: "%BASE%-win1809-servercore-amd64,%BASE%-winltsc2022-servercore-amd64"
IMG_DESTINATIONS: ${AGENT_REPOSITORY}:7-servercore-jmx,${AGENT_REPOSITORY}:latest-servercore-jmx
# Windows only images
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7"
IMG_SOURCES: "%BASE%-win1809-amd64"
IMG_DESTINATIONS: ${AGENT_REPOSITORY}:7,${AGENT_REPOSITORY}:latest-ltsc2019
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7"
IMG_SOURCES: "%BASE%-winltsc2022-amd64"
IMG_DESTINATIONS: ${AGENT_REPOSITORY}:7,${AGENT_REPOSITORY}:latest-ltsc2022
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7"
IMG_SOURCES: "%BASE%-win1809-servercore-amd64"
IMG_DESTINATIONS: ${AGENT_REPOSITORY}:7-servercore-ltsc2019,${AGENT_REPOSITORY}:latest-servercore-ltsc2019
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7"
IMG_SOURCES: "BASE%-winltsc2022-servercore-amd64"
IMG_DESTINATIONS: ${AGENT_REPOSITORY}:7-servercore-ltsc2022,${AGENT_REPOSITORY}:latest-servercore-ltsc2022
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-jmx"
IMG_SOURCES: "%BASE%-winltsc2022-servercore-amd64"
IMG_DESTINATIONS: ${AGENT_REPOSITORY}:7-servercore-ltsc2022-jmx,${AGENT_REPOSITORY}:latest-servercore-ltsc2022-jmx
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-jmx"
IMG_SOURCES: "%BASE%-winltsc1809-servercore-amd64"
IMG_DESTINATIONS: ${AGENT_REPOSITORY}:7-servercore-ltsc2019-jmx,${AGENT_REPOSITORY}:latest-servercore-ltsc2019-jmx

deploy_containers_latest-a7_internal:
extends: .docker_publish_job_definition
Expand Down
81 changes: 81 additions & 0 deletions .gitlab/dev_container_deploy/docker_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dev_branch-a7-windows:
IMG_REGISTRIES: dev
parallel:
matrix:
# Multi-arch
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7"
IMG_SOURCES: "%BASE%-win1809-amd64,%BASE%-winltsc2022-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-win
Expand All @@ -32,6 +33,32 @@ dev_branch-a7-windows:
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-jmx"
IMG_SOURCES: "%BASE%-win1809-servercore-amd64,%BASE%-winltsc2022-servercore-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-jmx-win-servercore
# ltsc2019
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7"
IMG_SOURCES: "%BASE%-win1809-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-win-ltsc2019
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-jmx"
IMG_SOURCES: "%BASE%-win1809-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-jmx-win-ltsc2019
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7"
IMG_SOURCES: "%BASE%-win1809-servercore-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-win-servercore-ltsc2019
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-jmx"
IMG_SOURCES: "%BASE%-win1809-servercore-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-jmx-win-servercore-ltsc2019
# ltsc2022
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7"
IMG_SOURCES: "%BASE%-winltsc2022-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-win-ltsc2022
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-jmx"
IMG_SOURCES: "%BASE%-winltsc2022-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-jmx-win-ltsc2022
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7"
IMG_SOURCES: "%BASE%-winltsc2022-servercore-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-win-servercore-ltsc2022
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-jmx"
IMG_SOURCES: "%BASE%-winltsc2022-servercore-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-jmx-win-servercore-ltsc2022

dev_master-a7-windows:
extends: .docker_publish_job_definition
Expand All @@ -51,6 +78,7 @@ dev_master-a7-windows:
IMG_REGISTRIES: dev
parallel:
matrix:
# Multi-arch
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7"
IMG_SOURCES: "%BASE%-win1809-amd64,%BASE%-winltsc2022-amd64"
IMG_DESTINATIONS: agent-dev:master-py3-win
Expand All @@ -63,6 +91,32 @@ dev_master-a7-windows:
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-jmx"
IMG_SOURCES: "%BASE%-win1809-servercore-amd64,%BASE%-winltsc2022-servercore-amd64"
IMG_DESTINATIONS: agent-dev:master-py3-jmx-win-servercore
# ltsc2019
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7"
IMG_SOURCES: "%BASE%-win1809-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-win-ltsc2019
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-jmx"
IMG_SOURCES: "%BASE%-win1809-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-jmx-win-ltsc2019
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7"
IMG_SOURCES: "%BASE%-win1809-servercore-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-win-servercore-ltsc2019
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-jmx"
IMG_SOURCES: "%BASE%-win1809-servercore-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-jmx-win-servercore-ltsc2019
# ltsc2022
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7"
IMG_SOURCES: "%BASE%-winltsc2022-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-win-ltsc2022
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-jmx"
IMG_SOURCES: "%BASE%-winltsc2022-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-jmx-win-ltsc2022
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7"
IMG_SOURCES: "%BASE%-winltsc2022-servercore-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-win-servercore-ltsc2022
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-jmx"
IMG_SOURCES: "%BASE%-winltsc2022-servercore-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-jmx-win-servercore-ltsc2022

dev_nightly-a7-windows:
extends: .docker_publish_job_definition
Expand All @@ -82,6 +136,7 @@ dev_nightly-a7-windows:
IMG_REGISTRIES: dev
parallel:
matrix:
# Multi-arch
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7"
IMG_SOURCES: "%BASE%-win1809-amd64,%BASE%-winltsc2022-amd64"
IMG_DESTINATIONS: agent-dev:nightly-${CI_COMMIT_SHORT_SHA}-py3-win
Expand All @@ -94,3 +149,29 @@ dev_nightly-a7-windows:
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-jmx"
IMG_SOURCES: "%BASE%-win1809-servercore-amd64,%BASE%-winltsc2022-servercore-amd64"
IMG_DESTINATIONS: agent-dev:nightly-${CI_COMMIT_SHORT_SHA}-py3-jmx-win-servercore
# ltsc2019
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7"
IMG_SOURCES: "%BASE%-win1809-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-win-ltsc2019
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-jmx"
IMG_SOURCES: "%BASE%-win1809-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-jmx-win-ltsc2019
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7"
IMG_SOURCES: "%BASE%-win1809-servercore-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-win-servercore-ltsc2019
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-jmx"
IMG_SOURCES: "%BASE%-win1809-servercore-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-jmx-win-servercore-ltsc2019
# ltsc2022
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7"
IMG_SOURCES: "%BASE%-winltsc2022-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-win-ltsc2022
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-jmx"
IMG_SOURCES: "%BASE%-winltsc2022-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-jmx-win-ltsc2022
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7"
IMG_SOURCES: "%BASE%-winltsc2022-servercore-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-win-servercore-ltsc2022
- IMG_VARIABLES: "BASE=${SRC_AGENT}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-jmx"
IMG_SOURCES: "%BASE%-winltsc2022-servercore-amd64"
IMG_DESTINATIONS: agent-dev:${CI_COMMIT_REF_SLUG}-py3-jmx-win-servercore-ltsc2022
4 changes: 2 additions & 2 deletions .gitlab/packaging/rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ agent_suse-x64-a7:
extends: [.package_suse_rpm_common, .package_rpm_agent_7, .package_rpm_x86]
needs: ["datadog-agent-7-x64"]
variables:
DD_PRODUCT: agent
DD_PROJECT: agent

agent_suse-arm64-a7:
extends: [.package_suse_rpm_common, .package_rpm_agent_7, .package_rpm_arm64]
needs: ["datadog-agent-7-arm64"]
variables:
DD_PRODUCT: agent
DD_PROJECT: agent

installer_rpm-amd64:
extends: [.package_rpm_common, .package_rpm_agent_7, .package_rpm_x86]
Expand Down
18 changes: 17 additions & 1 deletion pkg/fleet/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@
package env

import (
"context"
"fmt"
"os"
"slices"
"strings"
"time"

"github.com/DataDog/datadog-agent/pkg/config/model"
"github.com/DataDog/datadog-agent/pkg/config/utils"
"github.com/DataDog/datadog-agent/pkg/util/hostname"
)

const (
Expand All @@ -38,6 +41,7 @@ const (
envAgentUserNameCompat = "DDAGENTUSER_NAME"
envTags = "DD_TAGS"
envExtraTags = "DD_EXTRA_TAGS"
envHostname = "DD_HOSTNAME"
)

var defaultEnv = Env{
Expand Down Expand Up @@ -98,7 +102,8 @@ type Env struct {
CDNEnabled bool
CDNLocalDirPath string

Tags []string
Tags []string
Hostname string
}

// FromEnv returns an Env struct with values from the environment.
Expand Down Expand Up @@ -139,11 +144,18 @@ func FromEnv() *Env {
strings.FieldsFunc(os.Getenv(envTags), splitFunc),
strings.FieldsFunc(os.Getenv(envExtraTags), splitFunc)...,
),
Hostname: os.Getenv(envHostname),
}
}

// FromConfig returns an Env struct with values from the configuration.
func FromConfig(config model.Reader) *Env {
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()
hostname, err := hostname.Get(ctx)
if err != nil {
hostname = "unknown"
}
return &Env{
APIKey: utils.SanitizeAPIKey(config.GetString("api_key")),
Site: config.GetString("site"),
Expand All @@ -154,6 +166,7 @@ func FromConfig(config model.Reader) *Env {
RegistryUsername: config.GetString("installer.registry.username"),
RegistryPassword: config.GetString("installer.registry.password"),
Tags: utils.GetConfiguredTags(config, false),
Hostname: hostname,
}
}

Expand Down Expand Up @@ -199,6 +212,9 @@ func (e *Env) ToEnv() []string {
if len(e.Tags) > 0 {
env = append(env, envTags+"="+strings.Join(e.Tags, ","))
}
if len(e.Hostname) > 0 {
env = append(env, envHostname+"="+e.Hostname)
}
env = append(env, overridesByNameToEnv(envRegistryURL, e.RegistryOverrideByImage)...)
env = append(env, overridesByNameToEnv(envRegistryAuth, e.RegistryAuthOverrideByImage)...)
env = append(env, overridesByNameToEnv(envRegistryUsername, e.RegistryUsernameByImage)...)
Expand Down
12 changes: 9 additions & 3 deletions pkg/fleet/env/env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ func TestFromEnv(t *testing.T) {
InstallScript: InstallScriptEnv{
APMInstrumentationEnabled: APMInstrumentationNotSet,
},
Tags: []string{},
Tags: []string{},
Hostname: "",
},
},
{
Expand Down Expand Up @@ -68,6 +69,7 @@ func TestFromEnv(t *testing.T) {
envAgentUserName: "customuser",
envTags: "k1:v1,k2:v2",
envExtraTags: "k3:v3,k4:v4",
envHostname: "hostname",
},
expected: &Env{
APIKey: "123456",
Expand Down Expand Up @@ -111,7 +113,8 @@ func TestFromEnv(t *testing.T) {
InstallScript: InstallScriptEnv{
APMInstrumentationEnabled: APMInstrumentationEnabledAll,
},
Tags: []string{"k1:v1", "k2:v2", "k3:v3", "k4:v4"},
Tags: []string{"k1:v1", "k2:v2", "k3:v3", "k4:v4"},
Hostname: "hostname",
},
},
{
Expand Down Expand Up @@ -167,6 +170,7 @@ func TestFromEnv(t *testing.T) {
DefaultPackagesInstallOverride: map[string]bool{},
DefaultPackagesVersionOverride: map[string]string{},
Tags: []string{},
Hostname: "",
},
},
}
Expand Down Expand Up @@ -234,7 +238,8 @@ func TestToEnv(t *testing.T) {
"dotnet": "latest",
"ruby": "1.2",
},
Tags: []string{"k1:v1", "k2:v2"},
Tags: []string{"k1:v1", "k2:v2"},
Hostname: "hostname",
},
expected: []string{
"DD_API_KEY=123456",
Expand All @@ -259,6 +264,7 @@ func TestToEnv(t *testing.T) {
"DD_INSTALLER_DEFAULT_PKG_VERSION_PACKAGE=1.2.3",
"DD_INSTALLER_DEFAULT_PKG_VERSION_ANOTHER_PACKAGE=4.5.6",
"DD_TAGS=k1:v1,k2:v2",
"DD_HOSTNAME=hostname",
},
},
}
Expand Down
4 changes: 3 additions & 1 deletion pkg/fleet/internal/cdn/cdn_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type cdnHTTP struct {
client *remoteconfig.HTTPClient
currentRootsVersion uint64
hostTagsGetter hostTagsGetter
env *env.Env
}

func newCDNHTTP(env *env.Env, configDBPath string) (CDN, error) {
Expand All @@ -39,6 +40,7 @@ func newCDNHTTP(env *env.Env, configDBPath string) (CDN, error) {
client: client,
currentRootsVersion: 1,
hostTagsGetter: newHostTagsGetter(env),
env: env,
}, nil
}

Expand Down Expand Up @@ -134,6 +136,6 @@ func (c *cdnHTTP) get(ctx context.Context) ([][]byte, error) {

return getOrderedScopedLayers(
files,
getScopeExprVars(ctx, c.hostTagsGetter),
getScopeExprVars(c.env, c.hostTagsGetter),
)
}
Loading
Loading