Skip to content

Use a bare raise so the original exception gets propagated. - #111

Merged
mistercrunch merged 1 commit into
apache:masterfrom
jbalogh:patch-1
Jul 10, 2015
Merged

Use a bare raise so the original exception gets propagated.#111
mistercrunch merged 1 commit into
apache:masterfrom
jbalogh:patch-1

Conversation

@jbalogh

@jbalogh jbalogh commented Jul 8, 2015

Copy link
Copy Markdown
Contributor

With this change I get full stack traces in the logs. Without it the exception appears to originate from the line with raise e.

@mistercrunch

Copy link
Copy Markdown
Member

I thought e would contain the original exception, this goes into unexplored territories for me. How is it different?

@jbalogh

jbalogh commented Jul 10, 2015

Copy link
Copy Markdown
Contributor Author

Sorry for the delay, our cluster was having a bad day.

Here's a traceback with raise e:

$ ./bin/airflow run dag task.Crash 2015-07-09 --local
Activating the virtualenv.
Logging into: ./logs/dag/task.Crash/2015-07-09T00:00:00
Traceback (most recent call last):
  File "bin/airflow", line 156, in <module>
    args.func(args)
  File "vendor/src/airflow/airflow/bin/cli.py", line 126, in run
    job_id=args.job_id,
  File "vendor/src/airflow/airflow/models.py", line 755, in run
    raise e
ZeroDivisionError: integer division or modulo by zero

And here's a traceback with raise:

$ ./bin/airflow run dag task.Crash 2015-07-09 --local
Activating the virtualenv.
Logging into: ./logs/dag/task.Crash/2015-07-09T00:00:00
Traceback (most recent call last):
  File "bin/airflow", line 156, in <module>
    args.func(args)
  File "vendor/src/airflow/airflow/bin/cli.py", line 126, in run
    job_id=args.job_id,
  File "vendor/src/airflow/airflow/models.py", line 752, in run
    task_copy.execute(context=self.get_template_context())
  File "vendor/src/airflow/airflow/operators/python_operator.py", line 48, in execute
    return_value = self.python_callable(*self.op_args, **self.op_kwargs)
  File "./tasks/task.py", line 186, in execute
    self.run(context)
  File "./tasks/task.py", line 309, in run
    1 / 0
ZeroDivisionError: integer division or modulo by zero

This only affects what's shown in the airflow run context. The log file shows the proper traceback both times.

@artwr

artwr commented Jul 10, 2015

Copy link
Copy Markdown
Contributor

@mistercrunch

Copy link
Copy Markdown
Member

Ok, nice.

mistercrunch added a commit that referenced this pull request Jul 10, 2015
Use a bare raise so the original exception gets propagated.
@mistercrunch
mistercrunch merged commit bc9debe into apache:master Jul 10, 2015
saguziel pushed a commit to saguziel/incubator-airflow that referenced this pull request Oct 31, 2017
saguziel added a commit to saguziel/incubator-airflow that referenced this pull request Oct 31, 2017
saguziel pushed a commit to saguziel/incubator-airflow that referenced this pull request Oct 31, 2017
mobuchowski pushed a commit to mobuchowski/airflow that referenced this pull request Jan 4, 2022
…he#111)

Bump python circleci

    Remove empty dataset on failure, clean up bq extractor

    Remove output schema for failing tasks, add tests, refactor airflow to share logic

    Fix rebase err

    Fix bug where big query operator creates duplicate job versions

    Moves the big query operator to emit run and job information after the run has completed. Also emits actual task started date as defined by the task instance.

    Fix bug where all runs fail if DAG fails

    Reports task state information for each run instead of dag state.

    Also: reworks the handle_callback logic to remove superfluous call to report_task for operators with extract_on_complete (BigQuery).
    Signed-off-by: henneberger <git@danielhenneberger.com>

Signed-off-by: henneberger <git@danielhenneberger.com>
shahar1 added a commit to shahar1/airflow that referenced this pull request Jul 27, 2026
The old pattern consumed the separator character, so back-to-back
references like "apache#111 apache#222" lost the second one — a test case now pins
the fixed behaviour. The byte-identical dead copy of ISSUE_MATCH_IN_BODY
in dev/assign_cherry_picked_prs_with_milestone.py is removed so grep
leads only to the live definition.

Generated-by: Claude Code (Fable 5)
shahar1 added a commit that referenced this pull request Jul 27, 2026
#70396)

* Detect linked issues at the end of PR bodies in provider testing issue

The provider testing issue generator missed linked issues when the
reference was the last thing in the PR body (a common shape: "Fixes
character after the number, which does not exist at end of string, so
the reference was silently dropped and the release manager had to add
the issue to the testing issue by hand (e.g. #53843 for the google
22.3.0rc1 issue). A negative lookahead matches the same references
without needing a trailing character.

* Address review: pin adjacent-reference behaviour, drop dead regex copy

The old pattern consumed the separator character, so back-to-back
references like "#111 #222" lost the second one — a test case now pins
the fixed behaviour. The byte-identical dead copy of ISSUE_MATCH_IN_BODY
in dev/assign_cherry_picked_prs_with_milestone.py is removed so grep
leads only to the live definition.

Generated-by: Claude Code (Fable 5)
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.

3 participants