Skip to content

feat: Add support for create/update/delete/get/list tasks and cleanup policies - #500

Open
xino12 wants to merge 15 commits into
datadrivers:mainfrom
xino12:main
Open

feat: Add support for create/update/delete/get/list tasks and cleanup policies#500
xino12 wants to merge 15 commits into
datadrivers:mainfrom
xino12:main

Conversation

@xino12

@xino12 xino12 commented Feb 21, 2025

Copy link
Copy Markdown

After merge of datadrivers/go-nexus-client#173 and some other changes related to cleanup policies

Add task and cleanup policy support.

@jtnord

jtnord commented Feb 25, 2025

Copy link
Copy Markdown

fixes: #200

@xino12
xino12 marked this pull request as ready for review February 26, 2025 10:38
Comment thread go.mod Outdated
@xino12
xino12 force-pushed the main branch 2 times, most recently from d037e11 to e57ba3e Compare March 11, 2025 16:12
@draxxris

Copy link
Copy Markdown

Running the example against Nexus 3.78.2-04, I am getting HTTP 405

resource "nexus_task" "example" {
  name                   = "example-task"
  type                   = "repository.cleanup"
  enabled                = true
  alert_email            = "alert@example.com"
  notification_condition = "FAILURE"
  frequency {
    schedule       = "daily"
    start_date     = 1633046400000
    time_zone_offset = "UTC+0"
    recurring_days = [1, 2, 3]
    cron_expression = "0 0 * * *"
  }
  properties = {}
}
2025-07-22 15:27:24,992+0000 ERROR [qtp78227576-15852]  admin com.sonatype.analytics.internal.filter.AnalyticsMeteringFilter - Error metering request RESTEASY003650: No resource method found for POST, return 405 with Allow header
2025-07-22 15:27:24,992+0000 WARN  [qtp78227576-15852]  admin org.sonatype.nexus.siesta.internal.WebappExceptionMapper - (ID 2cb78971-3c75-4cf9-9fa1-5c4ee5aae2e1) Response: [405] (no entity/body); mapped from: javax.ws.rs.NotAllowedException: RESTEASY003650: No resource method found for POST, return 405 with Allow header

@jtnord

jtnord commented Oct 23, 2025

Copy link
Copy Markdown

@polski-g there is no repository.cleanup task type. where did you find this task type? you can get all the tasks types from /v1/tasks/templates/

@vivekdhami

Copy link
Copy Markdown

This seems to be still waiting for a review. Would be great if these changes can be merged or commented on if something is missing.

@xino12 xino12 changed the title feat: Add support for create/update/delete/get/list tasks feat: Add support for create/update/delete/get/list tasks and cleanup policies Feb 25, 2026
@xino12

xino12 commented Feb 25, 2026

Copy link
Copy Markdown
Author

@anmoel could you review these changes please? Thank you

@anmoel

anmoel commented Mar 19, 2026

Copy link
Copy Markdown
Member

@xino12 please fix the tests for tasks (see pipeline)

@jtnord jtnord left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Skip tests when not running against nexus pro.

The Tasks management endpoints are mostly Nexus Pro only so need to be skipped when not running against a nexus pro instance.

Comment thread internal/services/task/resource_task_test.go
xino12 and others added 2 commits June 17, 2026 09:28
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.

5 participants