[Feature] Improve resource sync self handling #1289

Open
opened 2026-03-22 17:17:39 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @satwell on GitHub (Jul 22, 2025).

I've gotten Komodo stuck in a state where resource syncs cannot execute and fail with a "ResourceSync busy" error. To resolve, I've tried deleting the Komodo Core container, and I've also tried deleting and recreating the Sync in the UI. Neither fixes the issue. The Sync is stuck in state "pending" and every sync or execute attempt fails.

Here's how I got stuck in this state:

  1. I had a resource sync to manage resources in git:
[[resource_sync]]
name = "komodo-test-config"
[resource_sync.config]
git_provider = "gitea.example.com"
repo = "komodo/komodo-test-config"
git_account = "komodo"
resource_path = ["main.toml"]
managed = true
include_variables = true
  1. I wanted to restructure the config and move resources into a resources/ directory in the repo. In git, I changed resource_path = ["resources/"] and moved main.toml to resources/main.toml. I pushed to my gitea server, which triggered the "execute sync" webhook. (This was a dumb mistake on my part--obviously I can't move the file before applying the change to resource_path.)

Now every resource sync execution fails with a ""ResourceSync busy" error.

This is similar to the resource sync getting stuck that I reported in #672, but in that case restarting Komodo Core cleared it. In this case, I can't find an obvious way to clear the stuck ResourceSync. But in both cases, there's a failure loading resources from the sync, and it seems like the error handling does not properly terminate the task that's running.

Originally created by @satwell on GitHub (Jul 22, 2025). I've gotten Komodo stuck in a state where resource syncs cannot execute and fail with a "ResourceSync busy" error. To resolve, I've tried deleting the Komodo Core container, and I've also tried deleting and recreating the Sync in the UI. Neither fixes the issue. The Sync is stuck in state "pending" and every sync or execute attempt fails. Here's how I got stuck in this state: 1. I had a resource sync to manage resources in git: ```toml [[resource_sync]] name = "komodo-test-config" [resource_sync.config] git_provider = "gitea.example.com" repo = "komodo/komodo-test-config" git_account = "komodo" resource_path = ["main.toml"] managed = true include_variables = true ``` 2. I wanted to restructure the config and move resources into a `resources/` directory in the repo. In git, I changed `resource_path = ["resources/"]` and moved `main.toml` to `resources/main.toml`. I pushed to my gitea server, which triggered the "execute sync" webhook. (This was a dumb mistake on my part--obviously I can't move the file before applying the change to `resource_path`.) Now every resource sync execution fails with a ""ResourceSync busy" error. This is similar to the resource sync getting stuck that I reported in #672, but in that case restarting Komodo Core cleared it. In this case, I can't find an obvious way to clear the stuck ResourceSync. But in both cases, there's a failure loading resources from the sync, and it seems like the error handling does not properly terminate the task that's running.
GiteaMirror added the enhancement label 2026-03-22 17:17:39 -05:00
Author
Owner

@mbecker20 commented on GitHub (Jul 22, 2025):

Resource sync has quirk that it cannot execute a sync in which it is defined, if there are changes to itself. You can resolve it either by removing the sync declaration from toml, or updating by hand with toml exactly matching the config in Komodo (navigate to sync and grab Toml using top right button)

@mbecker20 commented on GitHub (Jul 22, 2025): Resource sync has quirk that it cannot execute a sync in which it is defined, if there are changes to itself. You can resolve it either by removing the sync declaration from toml, or updating by hand with toml exactly matching the config in Komodo (navigate to sync and grab Toml using top right button)
Author
Owner

@satwell commented on GitHub (Jul 23, 2025):

Oh, that makes sense. I updated the sync config so that they match in the UI and in git, and now the sync works correctly again. Thank you!

Would it be possible for Komodo to provide a more descriptive error than "ResourceSync busy" for this case? Maybe something like, "ResourceSync cannot update itself." Maybe even tell the user that they need to manually update the resource themselves.

Given this limitation, it would be nice to have a way to exclude syncing the resource_sync itself as part of the sync. Maybe an include_self option that would include or exclude that specific sync? Or this could be a use case for exclude tags as requested in #669.

@satwell commented on GitHub (Jul 23, 2025): Oh, that makes sense. I updated the sync config so that they match in the UI and in git, and now the sync works correctly again. Thank you! Would it be possible for Komodo to provide a more descriptive error than "ResourceSync busy" for this case? Maybe something like, "ResourceSync cannot update itself." Maybe even tell the user that they need to manually update the resource themselves. Given this limitation, it would be nice to have a way to exclude syncing the `resource_sync` itself as part of the sync. Maybe an `include_self` option that would include or exclude that specific sync? Or this could be a use case for exclude tags as requested in #669.
Author
Owner

@mbecker20 commented on GitHub (Jul 24, 2025):

I think combo of improving the error log in this case, and eventual #669 implementation should solve this issue.

@mbecker20 commented on GitHub (Jul 24, 2025): I think combo of improving the error log in this case, and eventual #669 implementation should solve this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/komodo#1289