Skip to content

Add test showing endpoint returns HTTP 401 when request lacks auth info - #1707

Merged
eecavanna merged 1 commit into
mainfrom
1313b-runtime-raises-exception-http-500-when-request-lacks-auth-info
Nov 28, 2026
Merged

eecavanna merged 1 commit into
mainfrom
1313b-runtime-raises-exception-http-500-when-request-lacks-auth-info

Conversation

@eecavanna

@eecavanna eecavanna commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

On this branch, I added a test that demonstrates that a specific bug is no longer present.

Details

The bug was fixed in a previous commit (not on this branch).

Related issue(s)

Resolves #1313

Related subsystem(s)

  • Runtime API (except the Minter)
  • Minter
  • Dagster
  • Project documentation (in the docs directory)
  • Translators (metadata ingest pipelines)
  • MongoDB migrations
  • Other

Testing

  • I tested these changes (explain below)
  • I did not test these changes

I tested these changes by confirming the newly-introduced test passes.

Documentation

  • I have not checked for relevant documentation yet (e.g. in the docs directory)
  • I have updated all relevant documentation so it will remain accurate
  • Other (explain below)

Maintainability

  • Every Python function I defined includes a docstring (test functions are exempt from this)
  • Every Python function parameter I introduced includes a type hint (e.g. study_id: str)
  • All "to do" or "fix me" Python comments I added begin with either # TODO or # FIXME
  • I used black to format all the Python files I created/modified
  • The PR title is in the imperative mood (e.g. "Do X") and not the declarative mood (e.g. "Does X" or "Did X")

Summary by CodeRabbit

  • Tests
    • Added API test coverage confirming that a valid job creation request without authentication receives an HTTP 401 response and does not add a job to the collection. This documents the expected behavior for unauthenticated requests to the job creation endpoint.

@eecavanna eecavanna linked an issue Nov 28, 2026 that may be closed by this pull request
@eecavanna eecavanna self-assigned this Nov 28, 2026
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: Unauthenticated job request test

Layer / File(s) Summary
Unauthenticated job creation check
tests/test_api/test_endpoints.py
The test submits a valid payload without authentication. It expects HTTP 401 and checks that no job was added.

Suggested reviewers: sujaypatil96

Change: Other

Merge Risk: Minimal · up to f4f54

This change only adds test coverage for rejecting unauthenticated job creation and does not alter runtime behavior. No merge-blocking risk was identified.

Security architecture risk: Minimal · up to f4f54

The PR adds a test that expects unauthenticated job creation to return HTTP 401 and leave the job count unchanged. It does not change production behavior.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b6b9cb30-ebe1-4560-8ec0-6943473c9e1a
Commits

Reviewing files that changed from the base of the PR and between 726f157 and f4f5405.

Files selected for processing: 1

  • tests/test_api/test_endpoints.py

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@eecavanna
eecavanna merged commit cb3f128 into main Nov 28, 2026
3 checks passed
@eecavanna
eecavanna deleted the 1313b-runtime-raises-exception-http-500-when-request-lacks-auth-info branch November 28, 2026 23:48
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.

Runtime raises exception (HTTP 500) when request lacks auth info

1 participant