Skip to content

Conversation

@ramya18101
Copy link
Contributor

@ramya18101 ramya18101 commented Feb 5, 2026

Add support for action name resolution in database custom_password_hash.action_id field.

🔧 Changes

This PR enables the Deploy CLI to accept action names instead of action IDs in the options.custom_password_hash.action_id field for database connections.

Example Usage:

# After (using action name - readable and maintainable)
databases:
  - name: "MyDatabase"
    strategy: "auth0"
    options:
      custom_password_hash:
        action_id: "MyPasswordHashAction"  # Human-readable name
        hash_algorithm: "bcrypt"

⚠️ Early Availability Notice:

This feature supports the custom password hash functionality which is currently in Early Availability (EA). The feature is subject to change as it matures.

📚 References

🔬 Testing

  • New tests cover both import (name→ID) and export (ID→name) scenarios

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 86.66667% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.41%. Comparing base (59fe692) to head (e79756c).

Files with missing lines Patch % Lines
src/tools/auth0/handlers/databases.ts 91.66% 2 Missing ⚠️
src/tools/utils.ts 66.66% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1288      +/-   ##
==========================================
+ Coverage   80.39%   80.41%   +0.01%     
==========================================
  Files         146      146              
  Lines        5825     5850      +25     
  Branches     1194     1200       +6     
==========================================
+ Hits         4683     4704      +21     
- Misses        650      652       +2     
- Partials      492      494       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ramya18101 ramya18101 marked this pull request as ready for review February 6, 2026 03:57
@ramya18101 ramya18101 requested a review from a team as a code owner February 6, 2026 03:57
let actions: Action[] = [];
try {
if (this.client.actions?.list) {
actions = await paginate<Action>(this.client.actions.list, {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need all actions? Or can Action GetById also be used?

return super.objString({ name: db.name, id: db.id });
}

getFormattedOptions(database, actions: Action[] = []) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
getFormattedOptions(database, actions: Action[] = []) {
getFormattedOptions(options, actions: Action[] = []) {

}

export function convertActionNameToId(name: string, actions: Asset[]): string {
const found = actions.find((a) => a.name === name);
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a check for undefined actions

}

export function convertActionIdToName(id: string, actions: Asset[]): string {
const found = actions.find((a) => a.id === id);
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a check for undefined actions

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