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

Resolve the expansion bug #5267

Merged
merged 3 commits into from
Aug 20, 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
2 changes: 2 additions & 0 deletions .github/workflows/win-package-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ jobs:
if ($LASTEXITCODE -ne 0) {
throw "choco install failed!"
}
stop-service splunk-otel-collector
rm "$env:PROGRAMDATA\Splunk\OpenTelemetry Collector\*_config.yaml"
Start-Sleep 30
write-host "Upgrading $choco_file_name ..."
choco upgrade splunk-otel-collector -s=".\dist" -y
Expand Down
12 changes: 3 additions & 9 deletions internal/buildscripts/packaging/tests/package_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,23 +197,20 @@ def test_collector_package_upgrade(distro, arch):
# install an older version of the collector package
run_container_cmd(container, install_cmd, env={"VERIFY_ACCESS_TOKEN": "false"}, timeout="10m")

time.sleep(5)
time.sleep(10)

# verify collector service status
assert wait_for(lambda: service_is_running(container, service_owner=SERVICE_OWNER))

# change the config
run_container_cmd(container, f"sh -c 'echo \"# This line should be preserved\" >> {AGENT_CONFIG_PATH}'")

copy_file_into_container(container, pkg_path, f"/test/{pkg_base}")

# upgrade package
if distro in DEB_DISTROS:
run_container_cmd(container, f"dpkg -i --force-confold /test/{pkg_base}")
run_container_cmd(container, f"dpkg -i --force-confnew /test/{pkg_base}")
elif distro in RPM_DISTROS:
run_container_cmd(container, f"rpm -U /test/{pkg_base}")

time.sleep(5)
time.sleep(10)

run_container_cmd(container, f"test -d {BUNDLE_DIR}")
run_container_cmd(container, f"test -d {BUNDLE_DIR}/run/collectd")
Expand All @@ -224,8 +221,5 @@ def test_collector_package_upgrade(distro, arch):
# verify collector service status
assert wait_for(lambda: service_is_running(container, service_owner=SERVICE_OWNER))

# verify changed config was preserved after upgrade
run_container_cmd(container, f"grep '# This line should be preserved' {AGENT_CONFIG_PATH}")

finally:
run_container_cmd(container, f"journalctl -u {SERVICE_NAME} --no-pager")
74 changes: 0 additions & 74 deletions internal/configconverter/k8s_tagger.go

This file was deleted.

51 changes: 0 additions & 51 deletions internal/configconverter/k8s_tagger_test.go

This file was deleted.

91 changes: 0 additions & 91 deletions internal/configconverter/loglevel_to_verbosity.go

This file was deleted.

38 changes: 0 additions & 38 deletions internal/configconverter/loglevel_to_verbosity_test.go

This file was deleted.

57 changes: 0 additions & 57 deletions internal/configconverter/move_hec_tls.go

This file was deleted.

Loading
Loading