Skip to content

Fix hardcoded challenge ID in ACME certificate workflow #3894

@coderabbitai

Description

@coderabbitai

Description

In the ACME certificate workflow, there's a TODO comment indicating that the challenge ID is hardcoded as 0 instead of using the actual challenge ID.

Location

  • File: go/apps/ctrl/services/acme/certificate_workflow.go
  • Function: CertificateChallenge.Run()
  • Step: "set-expires-at"

Issue

The UpdateAcmeChallengeExpiresAt call is using ID: 0 with a TODO comment "I need the challenge id". This hardcoded value will likely cause the update to fail since there's probably no ACME challenge record with ID 0.

Expected Fix

Retrieve and use the actual challenge ID from the ACME challenge record that was claimed earlier in the workflow.

Context

This issue was identified during the migration from domain challenges to ACME challenges as part of the schema refactor.

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions