Skip to content

feat: remove functionality to skip auth checks when AUTO_LOGIN is enabled, fix frontend tests, fix backend Lint and tests#9674

Closed
jordanrfrazier wants to merge 121 commits into
release-1.6.0from
auto-login-removals
Closed

feat: remove functionality to skip auth checks when AUTO_LOGIN is enabled, fix frontend tests, fix backend Lint and tests#9674
jordanrfrazier wants to merge 121 commits into
release-1.6.0from
auto-login-removals

Conversation

@jordanrfrazier
Copy link
Copy Markdown
Collaborator

@jordanrfrazier jordanrfrazier commented Sep 3, 2025

This pull request makes several important changes to authentication logic, configuration, and test infrastructure, focusing on simplifying the auto-login mechanism, improving security, and cleaning up related code. The changes remove deprecated flags, clarify the use of the AUTO_LOGIN setting, update related tests, and improve task management during application shutdown.

Authentication and Auto-Login Simplification:

  • Removed the deprecated skip_auth_auto_login flag and associated logic, making AUTO_LOGIN the sole switch for auto-login behavior. All fallback authentication now depends on AUTO_LOGIN, and related warning messages have been updated for clarity. [1] [2] [3] [4] [5] [6] [7] [8]
  • Changed the default value of AUTO_LOGIN to False for improved security in production environments.
  • Enhanced the AuthSettings class with a clear_superuser_credentials flag and logic to securely clear superuser credentials from memory. The validator logic for superuser credentials was updated accordingly. [1] [2]

Testing and Test Infrastructure:

  • Updated tests to reflect the new AUTO_LOGIN behavior, including skipping tests that require auto-login and adjusting expected error messages. [1] [2] [3] [4]
  • Improved the use_noop_session fixture to ensure all database operations use a NoopSession, even if services are already initialized, by patching relevant service settings.
  • Relaxed the performance threshold for component loading tests to reduce flakiness in CI environments.

Application Lifecycle and Task Management:

  • Improved shutdown logic to properly cancel and await both sync_flows_from_fs_task and the new mcp_init_task, logging any exceptions that occur during cleanup. [1] [2] [3]

Code Quality and Type Annotations:

  • Added explicit type annotations to variables in the exclude_branch_conditionally method for better clarity and type safety.

Build and Dependency Management:

  • Updated the Makefile to install blockbuster and asgi_lifespan before running unit tests, ensuring all dependencies are present.

@jordanrfrazier jordanrfrazier changed the base branch from main to release-1.6.0 September 3, 2025 14:10
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 3, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch auto-login-removals

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Sep 3, 2025
@mendonk mendonk mentioned this pull request Sep 5, 2025
Copy link
Copy Markdown
Contributor

@ogabrielluiz ogabrielluiz left a comment

Choose a reason for hiding this comment

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

LGTM but should probably wait to merge

@github-actions github-actions Bot added lgtm This PR has been approved by a maintainer enhancement New feature or request and removed enhancement New feature or request labels Sep 8, 2025
@jordanrfrazier jordanrfrazier enabled auto-merge (squash) September 8, 2025 16:21
@mendonk
Copy link
Copy Markdown
Collaborator

mendonk commented Sep 8, 2025

#9731

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Sep 8, 2025
@codeflash-ai
Copy link
Copy Markdown
Contributor

codeflash-ai Bot commented Sep 11, 2025

⚡️ Codeflash found optimizations for this PR

📄 41% (0.41x) speedup for AuthSettings.validate_superuser in langflow/services/settings/auth.py

⏱️ Runtime : 4.80 milliseconds 3.41 milliseconds (best of 14 runs)

I created a new dependent PR with the suggested changes. Please review:

If you approve, it will be merged into this PR (branch auto-login-removals).

@codeflash-ai
Copy link
Copy Markdown
Contributor

codeflash-ai Bot commented Sep 11, 2025

⚡️ Codeflash found optimizations for this PR

📄 2,736% (27.36x) speedup for ProcessManager.handle_sigterm in langflow/__main__.py

⏱️ Runtime : 2.25 milliseconds 79.4 microseconds (best of 101 runs)

I created a new dependent PR with the suggested changes. Please review:

If you approve, it will be merged into this PR (branch auto-login-removals).

@codeflash-ai
Copy link
Copy Markdown
Contributor

codeflash-ai Bot commented Sep 11, 2025

⚡️ Codeflash found optimizations for this PR

📄 2,283% (22.83x) speedup for ProcessManager.handle_sigint in langflow/__main__.py

⏱️ Runtime : 1.32 milliseconds 55.2 microseconds (best of 83 runs)

I created a new dependent PR with the suggested changes. Please review:

If you approve, it will be merged into this PR (branch auto-login-removals).

@codeflash-ai
Copy link
Copy Markdown
Contributor

codeflash-ai Bot commented Sep 11, 2025

⚡️ Codeflash found optimizations for this PR

📄 47% (0.47x) speedup for ProgressIndicator._animate_step in langflow/cli/progress.py

⏱️ Runtime : 5.48 microseconds 3.73 microseconds (best of 14 runs)

I created a new dependent PR with the suggested changes. Please review:

If you approve, it will be merged into this PR (branch auto-login-removals).

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants