Skip to content

Skip mark_process_dead when the multiprocess path is unset - #1205

Open
Hashim1999164 wants to merge 1 commit into
prometheus:masterfrom
Hashim1999164:fix/mark-process-dead-unset-path
Open

Skip mark_process_dead when the multiprocess path is unset#1205
Hashim1999164 wants to merge 1 commit into
prometheus:masterfrom
Hashim1999164:fix/mark-process-dead-unset-path

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Aug 26, 2026

Copy link
Copy Markdown

Fixes : #1061

mark_process_dead looked up PROMETHEUS_MULTIPROC_DIR and then passed None into os.path.join, which raises TypeError. Callers such as django_q invoke it even when multiprocess mode is off. Return immediately when no path is set.

Test plan:

  • python3 -m unittest tests.test_multiprocess.TestMultiProcessDeprecation.test_mark_process_dead_noop_when_path_unset
  • python3 -m unittest tests.test_multiprocess.TestMultiProcessDeprecation.test_mark_process_dead_respects_lowercase

@csmarchbanks

django_q and similar callers invoke this even when PROMETHEUS_MULTIPROC_DIR is missing. Return instead of passing None into os.path.join.

Signed-off-by: Hashim1999164 <64767361+Hashim1999164@users.noreply.github.com>
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.

Error: TypeError: expected str, bytes or os.PathLike object, not NoneType

1 participant