Skip to content

Comments

logs for create task#94

Closed
dexhorthy wants to merge 1 commit intomainfrom
acp-logs
Closed

logs for create task#94
dexhorthy wants to merge 1 commit intomainfrom
acp-logs

Conversation

@dexhorthy
Copy link
Contributor

@dexhorthy dexhorthy commented May 12, 2025

Important

Added detailed logging to createTask in server.go for better error handling and task tracking, and updated image tag in kustomization.yaml.

  • Logging Enhancements in server.go:
    • Added error logging for request body binding failure in createTask().
    • Added info logging for received task creation requests, including agentName, namespace, hasUserMessage, and contextWindowSize.
    • Added error logging for missing agentName field.
    • Added info logging for generated task name.
    • Enhanced error logging for task creation failures, distinguishing between status errors and unexpected errors.
    • Added info logging for successful task creation, including name, namespace, and agent.
  • Configuration Update in kustomization.yaml:
    • Updated newTag for controller image to 202505121438.

This description was created by Ellipsis for db62cf8. You can customize this summary. It will automatically update as commits are pushed.

@dexhorthy dexhorthy requested a review from allisoneer May 12, 2025 22:05
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed everything up to db62cf8 in 1 minute and 53 seconds. Click for details.
  • Reviewed 64 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 6 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. acp/config/localdev/kustomization.yaml:29
  • Draft comment:
    Updated controller image tag to 202505121438. Verify that all dependent configurations and deployments reference the updated tag.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. acp/internal/server/server.go:161
  • Draft comment:
    Added logging for JSON binding errors to improve observability.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. acp/internal/server/server.go:166
  • Draft comment:
    Structured logging of incoming task request details is helpful; ensure that logging does not expose sensitive user input.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
4. acp/internal/server/server.go:203
  • Draft comment:
    Logging the generated task name is useful for debugging; consider verifying that the 8-character UUID substring provides sufficient uniqueness.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
5. acp/internal/server/server.go:223
  • Draft comment:
    Enhanced error logging for API status errors provides good context; ensure that detailed error information (like status code and message) is safe to expose in production logs.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
6. acp/internal/server/server.go:234
  • Draft comment:
    Good to see clear success logging for task creation which aids in auditing.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_cF4PdUhjdkJNEM2s

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

"contextWindowSize", len(req.ContextWindow))

if req.AgentName == "" {
logger.Error(nil, "Missing required field: agentName")
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider providing a non-nil error (e.g. errors.New(...)) to logger.Error for the missing agentName case to maintain consistent error context.

Suggested change
logger.Error(nil, "Missing required field: agentName")
logger.Error(errors.New("agentName is required"), "Missing required field: agentName")

@dexhorthy dexhorthy closed this May 13, 2025
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.

1 participant