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

ci(non-gitlab): [agent6] Misc updates #31130

Merged
merged 4 commits into from
Nov 18, 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
5 changes: 0 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,3 @@ workflows:
- unit_tests
- integration_tests
- docker_tests
- build_iot_agent:
requires:
- unit_tests
- integration_tests
- docker_tests
64 changes: 0 additions & 64 deletions .github/workflows/windows-linters.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE-3rdparty.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2049,7 +2049,7 @@ core,golang.org/x/text/unicode/bidi,BSD-3-Clause,Copyright (c) 2009 The Go Autho
core,golang.org/x/text/unicode/norm,BSD-3-Clause,Copyright (c) 2009 The Go Authors. All rights reserved
core,golang.org/x/text/width,BSD-3-Clause,Copyright (c) 2009 The Go Authors. All rights reserved
core,golang.org/x/time/rate,BSD-3-Clause,Copyright (c) 2009 The Go Authors. All rights reserved
core,golang/go,BSD-3-Clause,Copyright (c) 2009 The Go Authors. All rights reserved.
core,golang/go,BSD-Source-Code,Copyright (c) 2009 The Go Authors. All rights reserved.
core,gomodules.xyz/jsonpatch/v2,Apache-2.0,Copyright (c) 2015 The Authors
core,gonum.org/v1/gonum/blas,BSD-3-Clause,Alexander Egurnov <alexander.egurnov@gmail.com> | Andrei Blinnikov <goofinator@mail.ru> | Andrew Brampton <brampton@gmail.com> | Bailey Lissington <lissington4@gmail.com> | Bill Gray <wgray@gogray.com> | Bill Noon <noon.bill@gmail.com> | Brendan Tracey <tracey.brendan@gmail.com> | Brent Pedersen <bpederse@gmail.com> | Bulat Khasanov <afti@yandex.ru> | Chad Kunde <kunde21@gmail.com> | Chan Kwan Yin <sofe2038@gmail.com> | Chih-Wei Chang <bert.cwchang@gmail.com> | Chong-Yeol Nah <nahchongyeol@gmail.com> | Chris Tessum <ctessum@gmail.com> | Christophe Meessen <christophe.meessen@gmail.com> | Christopher Waldon <christopher.waldon.dev@gmail.com> | Clayton Northey <clayton.northey@gmail.com> | Copyright ©2013 The Gonum Authors. All rights reserved | Dan Kortschak <dan.kortschak@adelaide.edu.au> <dan@kortschak.io> | Dan Lorenc <lorenc.d@gmail.com> | Daniel Fireman <danielfireman@gmail.com> | Dario Heinisch <dario.heinisch@gmail.com> | David Kleiven <davidkleiven446@gmail.com> | David Samborski <bloggingarrow@gmail.com> | Davor Kapsa <davor.kapsa@gmail.com> | DeepMind Technologies | Delaney Gillilan <delaneygillilan@gmail.com> | Dezmond Goff <goff.dezmond@gmail.com> | Dong-hee Na <donghee.na92@gmail.com> | Dustin Spicuzza <dustin@virtualroadside.com> | Egon Elbre <egonelbre@gmail.com> | Ekaterina Efimova <katerina.efimova@gmail.com> | Ethan Burns <burns.ethan@gmail.com> | Evert Lammerts <evert.lammerts@gmail.com> | Evgeny Savinov <notime.sea@gmail.com> | Fabian Wickborn <fabian@wickborn.net> | Facundo Gaich <facugaich@gmail.com> | Fazlul Shahriar <fshahriar@gmail.com> | Francesc Campoy <campoy@golang.org> | Google Inc | Gustaf Johansson <gustaf@pinon.se> | Hossein Zolfi <hossein.zolfi@gmail.com> | Iakov Davydov <iakov.davydov@unil.ch> | Igor Mikushkin <igor.mikushkin@gmail.com> | Iskander Sharipov <quasilyte@gmail.com> | Jalem Raj Rohit <jrajrohit33@gmail.com> | James Bell <james@stellentus.com> | James Bowman <james.edward.bowman@gmail.com> | James Holmes <32bitkid@gmail.com> | Janne Snabb <snabb@epipe.com> | Jeremy Atkinson <jchatkinson@gmail.com> | Jes Cok <xigua67damn@gmail.com> | Jinesi Yelizati <i63888888@163.com> | Jon Richards <noj.richards@gmail.com> | Jonas Kahler <jonas@derkahler.de> | Jonas Schulze <jonas.schulze@ovgu.de> | Jonathan J Lawlor <jonathan.lawlor@gmail.com> | Jonathan Reiter <jonreiter@gmail.com> | Jonathan Schroeder <jd.schroeder@gmail.com> | Joost van Amersfoort <git@joo.st> | Joseph Watson <jtwatson@linux-consulting.us> | Josh Wilson <josh.craig.wilson@gmail.com> | Julien Roland <juroland@gmail.com> | Kai Trukenmüller <ktye78@gmail.com> | Kent English <kent.english@gmail.com> | Kevin C. Zimmerman <kevinczimmerman@gmail.com> | Kirill Motkov <motkov.kirill@gmail.com> | Konstantin Shaposhnikov <k.shaposhnikov@gmail.com> | Leonid Kneller <recondite.matter@gmail.com> | Lyron Winderbaum <lyron.winderbaum@student.adelaide.edu.au> <armadilloa16@gmail.com> <lyron.winderbaum@uwa.edu.au> | Marco Leogrande <dark.knight.ita@gmail.com> | Mark Canning <argusdusty@gmail.com> | Mark Skilbeck <markskilbeck@gmail.com> | Martin Diz <github@martindiz.com.ar> | Matthew Connelly <matthew.b.connelly@gmail.com> | Matthieu Di Mercurio <matthieu.dimercurio@gmail.com> | Max Halford <maxhalford25@gmail.com> | Maxim Sergeev <gudvinr@gmail.com> | Microsoft Corporation | MinJae Kwon <k239507@gmail.com> | Nathan Edwards <etaoinshrdluwho@gmail.com> | Nick Potts <nick@the-potts.com> | Nils Wogatzky <odog@netcologne.de> | Olivier Wulveryck <olivier.wulveryck@gmail.com> | Or Rikon <rikonor@gmail.com> | Patricio Whittingslow <graded.sp@gmail.com> | Patrick DeVivo <patrick@tickgit.com> | Pontus Melke <pontusmelke@gmail.com> | Renee French | Rishi Desai <desai.rishi1@gmail.com> | Robin Eklind <r.eklind.87@gmail.com> | Roger Welin <roger.welin@icloud.com> | Roman Werpachowski <roman.werpachowski@gmail.com> | Rondall Jones <rejones7@gmail.com> | Sam Zaydel <szaydel@gmail.com> | Samuel Kelemen <Samuel@Kelemen.us> | Saran Ahluwalia <ahlusar.ahluwalia@gmail.com> | Scott Holden <scott@sshconnection.com> | Scott Kiesel <kiesel.scott@gmail.com> | Sebastien Binet <seb.binet@gmail.com> | Shawn Smith <shawnpsmith@gmail.com> | Sintela Ltd | Spencer Lyon <spencerlyon2@gmail.com> | Steve McCoy <mccoyst@gmail.com> | Taesu Pyo <pyotaesu@gmail.com> | Takeshi Yoneda <cz.rk.t0415y.g@gmail.com> | Tamir Hyman <hyman.tamir@gmail.com> | The University of Adelaide | The University of Minnesota | The University of Washington | Thomas Berg <tomfuture@gmail.com> | Tobin Harding <me@tobin.cc> | Valentin Deleplace <deleplace2015@gmail.com> | Vincent Thiery <vjmthiery@gmail.com> | Vladimír Chalupecký <vladimir.chalupecky@gmail.com> | Will Tekulve <tekulve.will@gmail.com> | Yasuhiro Matsumoto <mattn.jp@gmail.com> | Yevgeniy Vahlis <evahlis@gmail.com> | Yucheng Zhu <zyctc000@gmail.com> | Yunomi <ynmtywn@gmail.com> | Zoe Juozapaitis | antichris <chris@u-d13.com> | source{d} <hello@sourced.tech>
core,gonum.org/v1/gonum/blas/blas64,BSD-3-Clause,Alexander Egurnov <alexander.egurnov@gmail.com> | Andrei Blinnikov <goofinator@mail.ru> | Andrew Brampton <brampton@gmail.com> | Bailey Lissington <lissington4@gmail.com> | Bill Gray <wgray@gogray.com> | Bill Noon <noon.bill@gmail.com> | Brendan Tracey <tracey.brendan@gmail.com> | Brent Pedersen <bpederse@gmail.com> | Bulat Khasanov <afti@yandex.ru> | Chad Kunde <kunde21@gmail.com> | Chan Kwan Yin <sofe2038@gmail.com> | Chih-Wei Chang <bert.cwchang@gmail.com> | Chong-Yeol Nah <nahchongyeol@gmail.com> | Chris Tessum <ctessum@gmail.com> | Christophe Meessen <christophe.meessen@gmail.com> | Christopher Waldon <christopher.waldon.dev@gmail.com> | Clayton Northey <clayton.northey@gmail.com> | Copyright ©2013 The Gonum Authors. All rights reserved | Dan Kortschak <dan.kortschak@adelaide.edu.au> <dan@kortschak.io> | Dan Lorenc <lorenc.d@gmail.com> | Daniel Fireman <danielfireman@gmail.com> | Dario Heinisch <dario.heinisch@gmail.com> | David Kleiven <davidkleiven446@gmail.com> | David Samborski <bloggingarrow@gmail.com> | Davor Kapsa <davor.kapsa@gmail.com> | DeepMind Technologies | Delaney Gillilan <delaneygillilan@gmail.com> | Dezmond Goff <goff.dezmond@gmail.com> | Dong-hee Na <donghee.na92@gmail.com> | Dustin Spicuzza <dustin@virtualroadside.com> | Egon Elbre <egonelbre@gmail.com> | Ekaterina Efimova <katerina.efimova@gmail.com> | Ethan Burns <burns.ethan@gmail.com> | Evert Lammerts <evert.lammerts@gmail.com> | Evgeny Savinov <notime.sea@gmail.com> | Fabian Wickborn <fabian@wickborn.net> | Facundo Gaich <facugaich@gmail.com> | Fazlul Shahriar <fshahriar@gmail.com> | Francesc Campoy <campoy@golang.org> | Google Inc | Gustaf Johansson <gustaf@pinon.se> | Hossein Zolfi <hossein.zolfi@gmail.com> | Iakov Davydov <iakov.davydov@unil.ch> | Igor Mikushkin <igor.mikushkin@gmail.com> | Iskander Sharipov <quasilyte@gmail.com> | Jalem Raj Rohit <jrajrohit33@gmail.com> | James Bell <james@stellentus.com> | James Bowman <james.edward.bowman@gmail.com> | James Holmes <32bitkid@gmail.com> | Janne Snabb <snabb@epipe.com> | Jeremy Atkinson <jchatkinson@gmail.com> | Jes Cok <xigua67damn@gmail.com> | Jinesi Yelizati <i63888888@163.com> | Jon Richards <noj.richards@gmail.com> | Jonas Kahler <jonas@derkahler.de> | Jonas Schulze <jonas.schulze@ovgu.de> | Jonathan J Lawlor <jonathan.lawlor@gmail.com> | Jonathan Reiter <jonreiter@gmail.com> | Jonathan Schroeder <jd.schroeder@gmail.com> | Joost van Amersfoort <git@joo.st> | Joseph Watson <jtwatson@linux-consulting.us> | Josh Wilson <josh.craig.wilson@gmail.com> | Julien Roland <juroland@gmail.com> | Kai Trukenmüller <ktye78@gmail.com> | Kent English <kent.english@gmail.com> | Kevin C. Zimmerman <kevinczimmerman@gmail.com> | Kirill Motkov <motkov.kirill@gmail.com> | Konstantin Shaposhnikov <k.shaposhnikov@gmail.com> | Leonid Kneller <recondite.matter@gmail.com> | Lyron Winderbaum <lyron.winderbaum@student.adelaide.edu.au> <armadilloa16@gmail.com> <lyron.winderbaum@uwa.edu.au> | Marco Leogrande <dark.knight.ita@gmail.com> | Mark Canning <argusdusty@gmail.com> | Mark Skilbeck <markskilbeck@gmail.com> | Martin Diz <github@martindiz.com.ar> | Matthew Connelly <matthew.b.connelly@gmail.com> | Matthieu Di Mercurio <matthieu.dimercurio@gmail.com> | Max Halford <maxhalford25@gmail.com> | Maxim Sergeev <gudvinr@gmail.com> | Microsoft Corporation | MinJae Kwon <k239507@gmail.com> | Nathan Edwards <etaoinshrdluwho@gmail.com> | Nick Potts <nick@the-potts.com> | Nils Wogatzky <odog@netcologne.de> | Olivier Wulveryck <olivier.wulveryck@gmail.com> | Or Rikon <rikonor@gmail.com> | Patricio Whittingslow <graded.sp@gmail.com> | Patrick DeVivo <patrick@tickgit.com> | Pontus Melke <pontusmelke@gmail.com> | Renee French | Rishi Desai <desai.rishi1@gmail.com> | Robin Eklind <r.eklind.87@gmail.com> | Roger Welin <roger.welin@icloud.com> | Roman Werpachowski <roman.werpachowski@gmail.com> | Rondall Jones <rejones7@gmail.com> | Sam Zaydel <szaydel@gmail.com> | Samuel Kelemen <Samuel@Kelemen.us> | Saran Ahluwalia <ahlusar.ahluwalia@gmail.com> | Scott Holden <scott@sshconnection.com> | Scott Kiesel <kiesel.scott@gmail.com> | Sebastien Binet <seb.binet@gmail.com> | Shawn Smith <shawnpsmith@gmail.com> | Sintela Ltd | Spencer Lyon <spencerlyon2@gmail.com> | Steve McCoy <mccoyst@gmail.com> | Taesu Pyo <pyotaesu@gmail.com> | Takeshi Yoneda <cz.rk.t0415y.g@gmail.com> | Tamir Hyman <hyman.tamir@gmail.com> | The University of Adelaide | The University of Minnesota | The University of Washington | Thomas Berg <tomfuture@gmail.com> | Tobin Harding <me@tobin.cc> | Valentin Deleplace <deleplace2015@gmail.com> | Vincent Thiery <vjmthiery@gmail.com> | Vladimír Chalupecký <vladimir.chalupecky@gmail.com> | Will Tekulve <tekulve.will@gmail.com> | Yasuhiro Matsumoto <mattn.jp@gmail.com> | Yevgeniy Vahlis <evahlis@gmail.com> | Yucheng Zhu <zyctc000@gmail.com> | Yunomi <ynmtywn@gmail.com> | Zoe Juozapaitis | antichris <chris@u-d13.com> | source{d} <hello@sourced.tech>
Expand Down
14 changes: 13 additions & 1 deletion tasks/docker_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,19 @@ def dockerize_test(ctx, binary, skip_cleanup=False):

with open(f"{temp_folder}/Dockerfile", 'w') as stream:
stream.write(
"""FROM docker/compose:debian-1.29.2
"""FROM public.ecr.aws/docker/library/ubuntu:20.04
# Install Docker
COPY --from=public.ecr.aws/docker/library/docker:26.1-cli /usr/local/bin/docker /usr/bin/docker

# Install Docker Compose
ARG COMPOSE_VERSION=2.26.1
ARG COMPOSE_SHA256=2f61856d1b8c9de29ffdaedaa1c6d0a5fc5c79da45068f1f4310feed8d3a3f61
RUN apt-get update && apt-get install -y ca-certificates curl
RUN curl -SL "https://github.com/docker/compose/releases/download/v${COMPOSE_VERSION}/docker-compose-linux-x86_64" -o /usr/bin/compose
RUN echo "${COMPOSE_SHA256} /usr/bin/compose" | sha256sum --check
RUN chmod +x /usr/bin/compose

# Final settings
ENV DOCKER_DD_AGENT=yes
WORKDIR /
CMD /test.bin
Expand Down
2 changes: 1 addition & 1 deletion test/integration/corechecks/docker/basemetrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func init() {

func TestContainerMetricsTagging(t *testing.T) {
expectedTags := []string{
"container_name:basemetrics_redis_1", // Container name
"container_name:basemetrics-redis-1", // Container name
"docker_image:datadog/docker-library:redis_3_2_11-alpine",
"image_name:datadog/docker-library",
"short_image:docker-library",
Expand Down
6 changes: 3 additions & 3 deletions test/integration/corechecks/docker/events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ func TestEvents(t *testing.T) {
"image_name:datadog/docker-library",
"short_image:docker-library",
"image_tag:busybox_1_28_0",
"container_name:events_recordingevent0_1",
"container_name:events_recordingevent1_1",
"container_name:events-recordingevent0-1",
"container_name:events-recordingevent1-1",
}...),
AggregationKey: "docker:datadog/docker-library:busybox_1_28_0",
SourceTypeName: "docker",
Expand All @@ -60,7 +60,7 @@ func TestEvents(t *testing.T) {
"image_name:datadog/docker-library",
"short_image:docker-library",
"image_tag:redis_3_2_11-alpine",
"container_name:events_recordingevent2_1",
"container_name:events-recordingevent2-1",
}...),
AggregationKey: "docker:datadog/docker-library:redis_3_2_11-alpine",
SourceTypeName: "docker",
Expand Down
6 changes: 3 additions & 3 deletions test/integration/corechecks/docker/exitcode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestContainerExit(t *testing.T) {
"highcardenvtag:exithighenv",
"lowcardenvtag:exitlowenv",
}
sender.AssertServiceCheck(t, "docker.exit", servicecheck.ServiceCheckOK, "", append(expectedTags, "container_name:exitcode_exit0_1"), "Container exitcode_exit0_1 exited with 0")
sender.AssertServiceCheck(t, "docker.exit", servicecheck.ServiceCheckCritical, "", append(expectedTags, "container_name:exitcode_exit1_1"), "Container exitcode_exit1_1 exited with 1")
sender.AssertServiceCheck(t, "docker.exit", servicecheck.ServiceCheckCritical, "", append(expectedTags, "container_name:exitcode_exit54_1"), "Container exitcode_exit54_1 exited with 54")
sender.AssertServiceCheck(t, "docker.exit", servicecheck.ServiceCheckOK, "", append(expectedTags, "container_name:exitcode-exit0-1"), "Container exitcode-exit0-1 exited with 0")
sender.AssertServiceCheck(t, "docker.exit", servicecheck.ServiceCheckCritical, "", append(expectedTags, "container_name:exitcode-exit1-1"), "Container exitcode-exit1-1 exited with 1")
sender.AssertServiceCheck(t, "docker.exit", servicecheck.ServiceCheckCritical, "", append(expectedTags, "container_name:exitcode-exit54-1"), "Container exitcode-exit54-1 exited with 54")
}
16 changes: 11 additions & 5 deletions test/integration/utils/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (c *ComposeConf) Start() ([]byte, error) {
"--project-name", c.ProjectName,
"--file", c.FilePath,
}
pullCmd := exec.Command("docker-compose", append(args, "pull", "--parallel")...)
pullCmd := exec.Command("compose", append(args, "pull", "--parallel")...)
pullCmd.Env = customEnv
output, err := pullCmd.CombinedOutput()
if err != nil {
Expand All @@ -70,7 +70,7 @@ func (c *ComposeConf) Start() ([]byte, error) {
*/
log.Infof("retrying pull...")
// We need to rebuild a new command because the file-descriptors of stdout/err are already set
retryPull := exec.Command("docker-compose", append(args, "pull", "--parallel")...)
retryPull := exec.Command("compose", append(args, "pull", "--parallel")...)
retryPull.Env = customEnv
output, err = retryPull.CombinedOutput()
if err != nil {
Expand All @@ -82,7 +82,7 @@ func (c *ComposeConf) Start() ([]byte, error) {
if c.RemoveRebuildImages {
args = append(args, "--build")
}
runCmd := exec.Command("docker-compose", args...)
runCmd := exec.Command("compose", args...)
runCmd.Env = customEnv

return runCmd.CombinedOutput()
Expand All @@ -98,17 +98,23 @@ func (c *ComposeConf) Stop() ([]byte, error) {
if c.RemoveRebuildImages {
args = append(args, "--rmi", "all")
}
runCmd := exec.Command("docker-compose", args...)
runCmd := exec.Command("compose", args...)
return runCmd.CombinedOutput()
}

// ListContainers lists the running container IDs
func (c *ComposeConf) ListContainers() ([]string, error) {
customEnv := os.Environ()
for k, v := range c.Variables {
customEnv = append(customEnv, fmt.Sprintf("%s=%s", k, v))
}

runCmd := exec.Command(
"docker-compose",
"compose",
"--project-name", c.ProjectName,
"--file", c.FilePath,
"ps", "-q")
runCmd.Env = customEnv

out, err := runCmd.Output()
if err != nil {
Expand Down
Loading