Skip to content

Use ValueError when no ArangoDB collection operation is specified - #70539

Merged
potiuk merged 1 commit into
apache:mainfrom
mitre88:narrow-arangodb-operator-exception
Jul 31, 2026
Merged

Use ValueError when no ArangoDB collection operation is specified#70539
potiuk merged 1 commit into
apache:mainfrom
mitre88:narrow-arangodb-operator-exception

Conversation

@mitre88

@mitre88 mitre88 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Part of the ongoing clean-up of broad AirflowException usages (enforced by the check-no-new-airflow-exceptions ratchet), following the pattern of #66279.

ArangoDBCollectionOperator.execute raised AirflowException when none of the insert/update/replace/delete operations was specified — a plain input-validation error, now a ValueError. The known_airflow_exceptions.txt entry for the file drops from 1 to 0. The raise had no test coverage, so the PR adds one asserting the new type and that no hook operation is invoked.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Fable 5)

Generated-by: Claude Code (Fable 5) following the guidelines

Calling ArangoDBCollectionOperator without any operation is an
input-validation error, so it should not raise the broad
AirflowException the community is actively reducing. Follows the
clean-up pattern of apache#66279.
@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Jul 28, 2026

@potiuk potiuk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks — best of your three exception PRs in this batch.

ValueError is right: "at least one operation must be specified" is a caller-argument problem, not an Airflow-runtime condition. Import cleaned up, ratchet entry removed outright rather than decremented.

What sets this one apart is that it adds a test that didn't exist. #70540 and #70537 updated assertions on paths already covered; here test_no_operation_fails is new coverage for a branch that had none — with match= pinning the message and insert_documents.assert_not_called() proving the operator bails before touching the hook rather than merely raising somewhere. That last assertion is the one people skip.


Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting

@potiuk
potiuk merged commit 8c08850 into apache:main Jul 31, 2026
79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants