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

Properly use dda in all places #35036

Merged
merged 1 commit into from
Mar 12, 2025
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
4 changes: 2 additions & 2 deletions .gitlab/deploy_containers/deploy_containers_a7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ include:
stage: deploy_containers
dependencies: []
before_script:
- if [[ "$VERSION" == "" ]]; then VERSION="$(inv agent.version --url-safe --pipeline-id $PARENT_PIPELINE_ID)-fips" || exit $?; fi
- if [[ "$VERSION" == "" ]]; then VERSION="$(dda inv agent.version --url-safe --pipeline-id $PARENT_PIPELINE_ID)-fips" || exit $?; fi
- export IMG_SOURCES="${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-fips${JMX}-amd64,${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}-7-fips${JMX}-arm64"
- export IMG_DESTINATIONS="${AGENT_REPOSITORY}:${VERSION}${JMX}"

Expand All @@ -93,7 +93,7 @@ include:
stage: deploy_containers
dependencies: []
before_script:
- if [[ "$VERSION" == "" ]]; then VERSION="$(inv agent.version --url-safe --pipeline-id $PARENT_PIPELINE_ID)" || exit $?; fi
- if [[ "$VERSION" == "" ]]; then VERSION="$(dda inv agent.version --url-safe --pipeline-id $PARENT_PIPELINE_ID)" || exit $?; fi
- export IMG_BASE_SRC="${SRC_AGENT}:v${PARENT_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}"
- export IMG_LINUX_SOURCES="${IMG_BASE_SRC}-7-full-amd64,${IMG_BASE_SRC}-7-full-arm64"
- export IMG_WINDOWS_SOURCES="${IMG_BASE_SRC}-7-jmx-win1809-amd64,${IMG_BASE_SRC}-7-jmx-winltsc2022-amd64"
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/deploy_dca/deploy_dca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ deploy_containers-dca_internal-latest:
- job: "docker_build_cluster_agent_fips_arm64"
artifacts: false
before_script:
- if [[ "$VERSION" == "" ]]; then VERSION="$(inv agent.version --url-safe)" || exit $?; fi
- if [[ "$VERSION" == "" ]]; then VERSION="$(dda inv agent.version --url-safe)" || exit $?; fi
- if [[ "$CLUSTER_AGENT_REPOSITORY" == "" ]]; then export CLUSTER_AGENT_REPOSITORY="cluster-agent"; fi
- export IMG_BASE_SRC="${SRC_DCA}:v${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}"
- export IMG_SOURCES="${IMG_BASE_SRC}-fips-amd64,${IMG_BASE_SRC}-fips-arm64"
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/functional_test/static_quality_gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ static_quality_gates:
- export DD_API_KEY="$DATADOG_API_KEY"
- !reference [ .setup_agent_github_app ]
- SLACK_DATADOG_AGENT_BOT_TOKEN=$($CI_PROJECT_DIR/tools/ci/fetch_secret.sh $SLACK_AGENT token) || exit $?; export SLACK_DATADOG_AGENT_BOT_TOKEN
- inv quality-gates.parse-and-trigger-gates
- dda inv quality-gates.parse-and-trigger-gates
4 changes: 2 additions & 2 deletions .gitlab/internal_image_deploy/internal_image_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ docker_trigger_cluster_agent_internal-fips:
TMPL_SRC_REPO="${TMPL_SRC_REPO}-nightly"
fi
- if [ "$BUCKET_BRANCH" = "dev" ]; then RELEASE_TAG="dev-${RELEASE_TAG}-${CI_COMMIT_SHORT_SHA}"; fi
- "inv pipeline.trigger-child-pipeline --project-name DataDog/images --git-ref master --timeout 3600
- "dda inv pipeline.trigger-child-pipeline --project-name DataDog/images --git-ref master --timeout 3600
--variable IMAGE_VERSION
--variable IMAGE_NAME
--variable RELEASE_TAG
Expand Down Expand Up @@ -262,7 +262,7 @@ docker_trigger_internal-full:
TMPL_SRC_REPO="${TMPL_SRC_REPO}-nightly"
fi
- if [ "$BUCKET_BRANCH" = "dev" ]; then RELEASE_TAG="dev-${RELEASE_TAG}-${CI_COMMIT_SHORT_SHA}"; fi
- "inv pipeline.trigger-child-pipeline --project-name DataDog/images --git-ref master --timeout 3600
- "dda inv pipeline.trigger-child-pipeline --project-name DataDog/images --git-ref master --timeout 3600
--variable IMAGE_VERSION
--variable IMAGE_NAME
--variable RELEASE_TAG
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/package_build/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ dogstatsd-arm64:
- !reference [.cache_omnibus_ruby_deps, setup]
# remove artifacts from previous pipelines that may come from the cache
- rm -rf $OMNIBUS_PACKAGE_DIR/*
- inv -e omnibus.build --release-version $RELEASE_VERSION --base-dir $OMNIBUS_BASE_DIR ${USE_S3_CACHING} --skip-deps --go-mod-cache="$GOPATH/pkg/mod" --target-project otel-agent
- dda inv -e omnibus.build --release-version $RELEASE_VERSION --base-dir $OMNIBUS_BASE_DIR ${USE_S3_CACHING} --skip-deps --go-mod-cache="$GOPATH/pkg/mod" --target-project otel-agent
- ls -la $OMNIBUS_PACKAGE_DIR
- !reference [.upload_sbom_artifacts]
variables:
Expand Down
2 changes: 1 addition & 1 deletion pkg/gpu/testutil/event-viewer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ curl --unix-socket $DD_SYSPROBE_SOCKET http://unix/gpu/debug/collect-events?coun
Build and use the event viewer:
```bash
inv system-probe.build-gpu-event-viewer
dda inv system-probe.build-gpu-event-viewer
pkg/gpu/testutil/event-viewer/event-viewer path-to-events-file
```
4 changes: 2 additions & 2 deletions pkg/proto/datadog/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## gRPC: Protobuf and Gateway code generation

1. Ensure that you have the all the tools installed in your `$PATH` by running `inv -e install-tools`.
2. To generate the code for the `.proto` files run `inv -e protobuf.generate`.
1. Ensure that you have the all the tools installed in your `$PATH` by running `dda inv -e install-tools`.
2. To generate the code for the `.proto` files run `dda inv -e protobuf.generate`.
4 changes: 2 additions & 2 deletions tasks/buildimages.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def update_test_infra_definitions(ctx: Context, commit_sha: str, go_mod_only: bo
ctx.run("go mod tidy")

if not go_mod_only:
prefix_comment = """# File generated by inv buildimages.update-test-infra-definitions
prefix_comment = """# File generated by dda inv buildimages.update-test-infra-definitions
# Please do not edit this file manually
# To update the test-infra-definitions version, run `inv buildimages.update-test-infra-definitions --commit-sha <commit_sha>` [--is-dev-image]
# To update the test-infra-definitions version, run `dda inv buildimages.update-test-infra-definitions --commit-sha <commit_sha>` [--is-dev-image]
"""
update_test_infra_def(
file_path=".gitlab/common/test_infra_version.yml",
Expand Down
4 changes: 2 additions & 2 deletions tasks/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ def add_all_replace(ctx: Context):
and no replace rule is missing.
It's meant to be used as the following:
- running `inv modules.add-all-replace` to add all possible replace rules to all go.mod
- `inv tidy` to update all the go.mod
- running `dda inv modules.add-all-replace` to add all possible replace rules to all go.mod
- `dda inv tidy` to update all the go.mod
This solves the problem of `go mod tidy` failing if some replace rules are missing but needing `go mod tidy` to run
successfully to know which replace rules are needed. This is a major pain point when creating/moving go.mod.
Expand Down
4 changes: 2 additions & 2 deletions tasks/protobuf.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,14 @@ def check_tools(ctx):
"""
tools = [tool.split("/")[-1] for tool in TOOL_LIST_PROTO]
if not check_tools_installed(tools):
raise Exit("Please install the required tools with `inv install-tools` before running this task.", code=1)
raise Exit("Please install the required tools with `dda inv install-tools` before running this task.", code=1)
try:
current_version = ctx.run("protoc --version", hide=True).stdout.strip().removeprefix("libprotoc ")
with open(".protoc-version") as f:
expected_version = f.read().strip()
if current_version != expected_version:
raise Exit(
f"Expected protoc version {expected_version}, found {current_version}. Please run `inv install-protoc` before running this task.",
f"Expected protoc version {expected_version}, found {current_version}. Please run `dda inv install-protoc` before running this task.",
code=1,
)
except UnexpectedExit as e:
Expand Down
2 changes: 1 addition & 1 deletion tasks/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ def run_rc_pipeline(ctx, gitlab_tag, k8s_deployments=False):
@task
def alert_ci_on_call(ctx, release_branch):
gitlab_tag = get_qualification_rc_tag(ctx, release_branch)
message = f":loudspeaker: Agent 6 Update:\nThere is an ongoing Agent 6 release and since there are no new changes there will be no RC bump this week.\n\nPlease rerun the previous build pipeline:\ninv release.run-rc-pipeline --gitlab-tag {gitlab_tag}"
message = f":loudspeaker: Agent 6 Update:\nThere is an ongoing Agent 6 release and since there are no new changes there will be no RC bump this week.\n\nPlease rerun the previous build pipeline:\ndda inv release.run-rc-pipeline --gitlab-tag {gitlab_tag}"
post_message(ctx, "agent-ci-on-call", message)


Expand Down
3 changes: 2 additions & 1 deletion tasks/unit_tests/libs/common/check_tools_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def test_tools_not_installed(self):
with self.assertRaises(Exit) as e:
check_tools(c)
self.assertEqual(
e.exception.message, "Please install the required tools with `inv install-tools` before running this task."
e.exception.message,
"Please install the required tools with `dda inv install-tools` before running this task.",
)

@patch('tasks.protobuf.check_tools_installed', new=MagicMock(return_value=True))
Expand Down
2 changes: 1 addition & 1 deletion tasks/winbuildscripts/Invoke-UnitTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Invoke-BuildScript `
}

# Run python-script unit tests
& inv -e invoke-unit-tests --directory=".\omnibus\python-scripts\"
& dda inv -e invoke-unit-tests --directory=".\omnibus\python-scripts\"
$err = $LASTEXITCODE
Write-Host Python-script test result is $err
if($err -ne 0){
Expand Down