Skip to content

Exit with exit code 0 when there is no change to make - #7519

Open
nccatoni wants to merge 1 commit into
mainfrom
nccatoni/ew-remove-exit1-when-empty
Open

Exit with exit code 0 when there is no change to make#7519
nccatoni wants to merge 1 commit into
mainfrom
nccatoni/ew-remove-exit1-when-empty

Conversation

@nccatoni

Copy link
Copy Markdown
Collaborator

Exit code 1 was emitted when there was no activation found because the caller used to be responsible for creating the branches, but that's not the case anymore

Motivation

Changes

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

Exit code 1 was emitted when there was no activation found because the
caller used to be responsible for creating the branches, but that's not
the case anymore
@nccatoni
nccatoni force-pushed the nccatoni/ew-remove-exit1-when-empty branch from 4656928 to ff01066 Compare August 14, 2026 12:44
@github-actions

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

utils/ci/github/nightly.py                                              @DataDog/system-tests-core
utils/scripts/activate_easy_wins/__main__.py                            @DataDog/system-tests-core

@nccatoni
nccatoni marked this pull request as ready for review August 14, 2026 12:44
@nccatoni
nccatoni requested a review from a team as a code owner August 14, 2026 12:44

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ff0106692e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# Exit with status 1 if no updates were made
if not has_updates:
sys.exit(1)
print("No update were made")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Update no-change fixtures to use the zero exit code

When the test_the_test suite runs, this contract change breaks the existing nightly tests: test_no_change_activation_is_success and test_failures_are_repeated_at_the_tail still simulate a no-update invocation with returncode=1. Since activate_library() now treats every nonzero status as an activation failure, the former returns 1 instead of its asserted 0 and the latter records an unexpected Ruby failure. Update those canned results and comments to use status 0 with this behavior change.

Useful? React with 👍 / 👎.

@datadog-datadog-prod-us1

Copy link
Copy Markdown

Pipelines

⚠️ Warnings

🚦 3 Pipeline jobs failed

Testing the test | Test the test   View in Datadog   GitHub Actions

🔧 Fix in code. This looks caused by changes in this PR. 3 failed tests. Error: SystemExit not raised in test_split_code_owner_activation_skips_commit_when_manifest_write_has_no_diff.

Testing the test | lint / lint   View in Datadog   GitHub Actions

🔧 Fix in code. This looks caused by changes in this PR. Unused import 'sys' in utils/scripts/activate_easy_wins/__main__.py at line 3.

Testing the test | all-jobs-are-green   View in Datadog   GitHub Actions

See error Multiple CI checks failed during execution.
📋 Copy prompt for your agent
CI on my pull request is failing. Help me find and fix the root cause of each failing job below — they were flagged as caused by changes in this PR, so focus on the diff. For each job, explain the failure and propose a fix.

Branch: nccatoni/ew-remove-exit1-when-empty

Testing the test | Test the test
Commit: ff0106692e9fa274a87f07c11d712e853f98d5ce
Error (code / test):
3 failed tests. Error: SystemExit not raised in test_split_code_owner_activation_skips_commit_when_manifest_write_has_no_diff.
CI job: https://github.com/DataDog/system-tests/actions/runs/31801584451/job/94770649181

Testing the test | lint / lint
Commit: ff0106692e9fa274a87f07c11d712e853f98d5ce
Error (code / quality):
Unused import 'sys' in utils/scripts/activate_easy_wins/__main__.py at line 3.
CI job: https://github.com/DataDog/system-tests/actions/runs/31801584451/job/94770649471

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ff01066 | Docs | Datadog PR Page | Give us feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant