diff --git a/Taskfile.yaml b/Taskfile.yaml index 08bdca1cb..32af1721b 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -202,7 +202,7 @@ tasks: - sh ./generate.sh generate-sqlc: cmds: - - go run github.com/sqlc-dev/sqlc/cmd/sqlc@v1.29.0 generate --file pkg/repository/v1/sqlcv1/sqlc.yaml + - go run github.com/sqlc-dev/sqlc/cmd/sqlc@v1.29.0 generate --file pkg/repository/sqlcv1/sqlc.yaml lint: cmds: - task: lint-go diff --git a/api/v1/server/authn/middleware.go b/api/v1/server/authn/middleware.go index b0c68d2ad..003507132 100644 --- a/api/v1/server/authn/middleware.go +++ b/api/v1/server/authn/middleware.go @@ -14,7 +14,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/middleware/redirect" "github.com/hatchet-dev/hatchet/pkg/config/server" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type AuthN struct { diff --git a/api/v1/server/authn/session_helpers.go b/api/v1/server/authn/session_helpers.go index 1fdf96ae5..404fcd360 100644 --- a/api/v1/server/authn/session_helpers.go +++ b/api/v1/server/authn/session_helpers.go @@ -9,7 +9,7 @@ import ( "github.com/hatchet-dev/hatchet/pkg/config/server" "github.com/hatchet-dev/hatchet/pkg/random" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type SessionHelpers struct { diff --git a/api/v1/server/authz/middleware.go b/api/v1/server/authz/middleware.go index 52dd9b62f..d6d225c7a 100644 --- a/api/v1/server/authz/middleware.go +++ b/api/v1/server/authz/middleware.go @@ -11,7 +11,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/middleware" "github.com/hatchet-dev/hatchet/pkg/config/server" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type AuthZ struct { diff --git a/api/v1/server/handlers/api-tokens/create.go b/api/v1/server/handlers/api-tokens/create.go index a8e1ef5ab..54c262ef3 100644 --- a/api/v1/server/handlers/api-tokens/create.go +++ b/api/v1/server/handlers/api-tokens/create.go @@ -9,7 +9,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/constants" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (a *APITokenService) ApiTokenCreate(ctx echo.Context, request gen.ApiTokenCreateRequestObject) (gen.ApiTokenCreateResponseObject, error) { diff --git a/api/v1/server/handlers/api-tokens/list.go b/api/v1/server/handlers/api-tokens/list.go index 7dda9b515..21fcc038d 100644 --- a/api/v1/server/handlers/api-tokens/list.go +++ b/api/v1/server/handlers/api-tokens/list.go @@ -6,7 +6,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (a *APITokenService) ApiTokenList(ctx echo.Context, request gen.ApiTokenListRequestObject) (gen.ApiTokenListResponseObject, error) { diff --git a/api/v1/server/handlers/api-tokens/revoke.go b/api/v1/server/handlers/api-tokens/revoke.go index 32b1fbbdd..07c29aa8b 100644 --- a/api/v1/server/handlers/api-tokens/revoke.go +++ b/api/v1/server/handlers/api-tokens/revoke.go @@ -7,7 +7,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/constants" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (a *APITokenService) ApiTokenUpdateRevoke(ctx echo.Context, request gen.ApiTokenUpdateRevokeRequestObject) (gen.ApiTokenUpdateRevokeResponseObject, error) { diff --git a/api/v1/server/handlers/events/get.go b/api/v1/server/handlers/events/get.go index fb41ace26..557fa7a0f 100644 --- a/api/v1/server/handlers/events/get.go +++ b/api/v1/server/handlers/events/get.go @@ -5,7 +5,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *EventService) EventGet(ctx echo.Context, request gen.EventGetRequestObject) (gen.EventGetResponseObject, error) { diff --git a/api/v1/server/handlers/events/get_data.go b/api/v1/server/handlers/events/get_data.go index c6fe7b772..1c372510e 100644 --- a/api/v1/server/handlers/events/get_data.go +++ b/api/v1/server/handlers/events/get_data.go @@ -4,7 +4,7 @@ import ( "github.com/labstack/echo/v4" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *EventService) EventDataGet(ctx echo.Context, request gen.EventDataGetRequestObject) (gen.EventDataGetResponseObject, error) { diff --git a/api/v1/server/handlers/ingestors/sns_create.go b/api/v1/server/handlers/ingestors/sns_create.go index 55c332880..4261ef935 100644 --- a/api/v1/server/handlers/ingestors/sns_create.go +++ b/api/v1/server/handlers/ingestors/sns_create.go @@ -6,9 +6,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (i *IngestorsService) SnsCreate(ctx echo.Context, req gen.SnsCreateRequestObject) (gen.SnsCreateResponseObject, error) { diff --git a/api/v1/server/handlers/ingestors/sns_delete.go b/api/v1/server/handlers/ingestors/sns_delete.go index 390fc8f70..ae53a333b 100644 --- a/api/v1/server/handlers/ingestors/sns_delete.go +++ b/api/v1/server/handlers/ingestors/sns_delete.go @@ -6,7 +6,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (i *IngestorsService) SnsDelete(ctx echo.Context, req gen.SnsDeleteRequestObject) (gen.SnsDeleteResponseObject, error) { diff --git a/api/v1/server/handlers/ingestors/sns_list.go b/api/v1/server/handlers/ingestors/sns_list.go index daa8ca446..f9e1f7ec6 100644 --- a/api/v1/server/handlers/ingestors/sns_list.go +++ b/api/v1/server/handlers/ingestors/sns_list.go @@ -6,7 +6,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (i *IngestorsService) SnsList(ctx echo.Context, req gen.SnsListRequestObject) (gen.SnsListResponseObject, error) { diff --git a/api/v1/server/handlers/rate-limits/list.go b/api/v1/server/handlers/rate-limits/list.go index 21ae98271..e9b17ec6a 100644 --- a/api/v1/server/handlers/rate-limits/list.go +++ b/api/v1/server/handlers/rate-limits/list.go @@ -10,9 +10,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *RateLimitService) RateLimitList(ctx echo.Context, request gen.RateLimitListRequestObject) (gen.RateLimitListResponseObject, error) { diff --git a/api/v1/server/handlers/slack-app/oauth_callback.go b/api/v1/server/handlers/slack-app/oauth_callback.go index 267f4c053..24bb23e88 100644 --- a/api/v1/server/handlers/slack-app/oauth_callback.go +++ b/api/v1/server/handlers/slack-app/oauth_callback.go @@ -9,7 +9,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/authn" "github.com/hatchet-dev/hatchet/api/v1/server/middleware/redirect" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" ) // Note: we want all errors to redirect, otherwise the user will be greeted with raw JSON in the middle of the login flow. diff --git a/api/v1/server/handlers/slack-app/oauth_start.go b/api/v1/server/handlers/slack-app/oauth_start.go index 793c9845a..c094607c1 100644 --- a/api/v1/server/handlers/slack-app/oauth_start.go +++ b/api/v1/server/handlers/slack-app/oauth_start.go @@ -8,7 +8,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/middleware/redirect" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) // Note: we want all errors to redirect, otherwise the user will be greeted with raw JSON in the middle of the login flow. diff --git a/api/v1/server/handlers/slack-app/slack_delete.go b/api/v1/server/handlers/slack-app/slack_delete.go index fbd26e15f..6f30e560b 100644 --- a/api/v1/server/handlers/slack-app/slack_delete.go +++ b/api/v1/server/handlers/slack-app/slack_delete.go @@ -6,7 +6,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (i *SlackAppService) SlackWebhookDelete(ctx echo.Context, req gen.SlackWebhookDeleteRequestObject) (gen.SlackWebhookDeleteResponseObject, error) { diff --git a/api/v1/server/handlers/slack-app/slack_list.go b/api/v1/server/handlers/slack-app/slack_list.go index 1aac9b97f..fcc2df47b 100644 --- a/api/v1/server/handlers/slack-app/slack_list.go +++ b/api/v1/server/handlers/slack-app/slack_list.go @@ -6,7 +6,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (s *SlackAppService) SlackWebhookList(ctx echo.Context, req gen.SlackWebhookListRequestObject) (gen.SlackWebhookListResponseObject, error) { diff --git a/api/v1/server/handlers/tenants/create.go b/api/v1/server/handlers/tenants/create.go index 15e973c37..4d990cabe 100644 --- a/api/v1/server/handlers/tenants/create.go +++ b/api/v1/server/handlers/tenants/create.go @@ -10,9 +10,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantService) TenantCreate(ctx echo.Context, request gen.TenantCreateRequestObject) (gen.TenantCreateResponseObject, error) { diff --git a/api/v1/server/handlers/tenants/create_email_group.go b/api/v1/server/handlers/tenants/create_email_group.go index 48b1e5244..6c6359a9b 100644 --- a/api/v1/server/handlers/tenants/create_email_group.go +++ b/api/v1/server/handlers/tenants/create_email_group.go @@ -5,9 +5,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantService) AlertEmailGroupCreate(ctx echo.Context, request gen.AlertEmailGroupCreateRequestObject) (gen.AlertEmailGroupCreateResponseObject, error) { diff --git a/api/v1/server/handlers/tenants/create_invite.go b/api/v1/server/handlers/tenants/create_invite.go index 6824d0ad9..3dd424c0c 100644 --- a/api/v1/server/handlers/tenants/create_invite.go +++ b/api/v1/server/handlers/tenants/create_invite.go @@ -10,9 +10,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" "github.com/hatchet-dev/hatchet/pkg/integrations/email" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantService) TenantInviteCreate(ctx echo.Context, request gen.TenantInviteCreateRequestObject) (gen.TenantInviteCreateResponseObject, error) { diff --git a/api/v1/server/handlers/tenants/delete_email_group.go b/api/v1/server/handlers/tenants/delete_email_group.go index 8aa897f18..bd54d2ab6 100644 --- a/api/v1/server/handlers/tenants/delete_email_group.go +++ b/api/v1/server/handlers/tenants/delete_email_group.go @@ -5,7 +5,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantService) AlertEmailGroupDelete(ctx echo.Context, request gen.AlertEmailGroupDeleteRequestObject) (gen.AlertEmailGroupDeleteResponseObject, error) { diff --git a/api/v1/server/handlers/tenants/delete_invite.go b/api/v1/server/handlers/tenants/delete_invite.go index e7d54c51c..0227cc945 100644 --- a/api/v1/server/handlers/tenants/delete_invite.go +++ b/api/v1/server/handlers/tenants/delete_invite.go @@ -6,7 +6,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantService) TenantInviteDelete(ctx echo.Context, request gen.TenantInviteDeleteRequestObject) (gen.TenantInviteDeleteResponseObject, error) { diff --git a/api/v1/server/handlers/tenants/delete_member.go b/api/v1/server/handlers/tenants/delete_member.go index 8808f078e..8a63493ad 100644 --- a/api/v1/server/handlers/tenants/delete_member.go +++ b/api/v1/server/handlers/tenants/delete_member.go @@ -7,7 +7,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/constants" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantService) TenantMemberDelete(ctx echo.Context, request gen.TenantMemberDeleteRequestObject) (gen.TenantMemberDeleteResponseObject, error) { diff --git a/api/v1/server/handlers/tenants/get.go b/api/v1/server/handlers/tenants/get.go index b8557db13..9c6a0683e 100644 --- a/api/v1/server/handlers/tenants/get.go +++ b/api/v1/server/handlers/tenants/get.go @@ -5,7 +5,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantService) TenantGet(ctx echo.Context, request gen.TenantGetRequestObject) (gen.TenantGetResponseObject, error) { diff --git a/api/v1/server/handlers/tenants/get_alerting_settings.go b/api/v1/server/handlers/tenants/get_alerting_settings.go index 9836c8d68..a789aadfd 100644 --- a/api/v1/server/handlers/tenants/get_alerting_settings.go +++ b/api/v1/server/handlers/tenants/get_alerting_settings.go @@ -6,7 +6,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantService) TenantAlertingSettingsGet(ctx echo.Context, request gen.TenantAlertingSettingsGetRequestObject) (gen.TenantAlertingSettingsGetResponseObject, error) { diff --git a/api/v1/server/handlers/tenants/get_prometheus_metrics.go b/api/v1/server/handlers/tenants/get_prometheus_metrics.go index cf9758854..8bc74eb23 100644 --- a/api/v1/server/handlers/tenants/get_prometheus_metrics.go +++ b/api/v1/server/handlers/tenants/get_prometheus_metrics.go @@ -10,7 +10,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantService) TenantGetPrometheusMetrics(ctx echo.Context, request gen.TenantGetPrometheusMetricsRequestObject) (gen.TenantGetPrometheusMetricsResponseObject, error) { diff --git a/api/v1/server/handlers/tenants/get_resource_policy.go b/api/v1/server/handlers/tenants/get_resource_policy.go index da30cdc33..8409aceed 100644 --- a/api/v1/server/handlers/tenants/get_resource_policy.go +++ b/api/v1/server/handlers/tenants/get_resource_policy.go @@ -8,7 +8,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantService) TenantResourcePolicyGet(ctx echo.Context, request gen.TenantResourcePolicyGetRequestObject) (gen.TenantResourcePolicyGetResponseObject, error) { diff --git a/api/v1/server/handlers/tenants/get_step_run_queue_metrics.go b/api/v1/server/handlers/tenants/get_step_run_queue_metrics.go index f1786bd54..4ea3e5b75 100644 --- a/api/v1/server/handlers/tenants/get_step_run_queue_metrics.go +++ b/api/v1/server/handlers/tenants/get_step_run_queue_metrics.go @@ -5,7 +5,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantService) TenantGetStepRunQueueMetrics(ctx echo.Context, request gen.TenantGetStepRunQueueMetricsRequestObject) (gen.TenantGetStepRunQueueMetricsResponseObject, error) { diff --git a/api/v1/server/handlers/tenants/get_task_stats.go b/api/v1/server/handlers/tenants/get_task_stats.go index b4b8adde3..0639e75e7 100644 --- a/api/v1/server/handlers/tenants/get_task_stats.go +++ b/api/v1/server/handlers/tenants/get_task_stats.go @@ -5,7 +5,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantService) TenantGetTaskStats(ctx echo.Context, request gen.TenantGetTaskStatsRequestObject) (gen.TenantGetTaskStatsResponseObject, error) { diff --git a/api/v1/server/handlers/tenants/list_email_groups.go b/api/v1/server/handlers/tenants/list_email_groups.go index af2b441a3..bb7f0add5 100644 --- a/api/v1/server/handlers/tenants/list_email_groups.go +++ b/api/v1/server/handlers/tenants/list_email_groups.go @@ -6,7 +6,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantService) AlertEmailGroupList(ctx echo.Context, request gen.AlertEmailGroupListRequestObject) (gen.AlertEmailGroupListResponseObject, error) { diff --git a/api/v1/server/handlers/tenants/list_invites.go b/api/v1/server/handlers/tenants/list_invites.go index 0deda2287..34d4d3f6d 100644 --- a/api/v1/server/handlers/tenants/list_invites.go +++ b/api/v1/server/handlers/tenants/list_invites.go @@ -5,9 +5,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantService) TenantInviteList(ctx echo.Context, request gen.TenantInviteListRequestObject) (gen.TenantInviteListResponseObject, error) { diff --git a/api/v1/server/handlers/tenants/list_members.go b/api/v1/server/handlers/tenants/list_members.go index 56e7540c5..3f94a630b 100644 --- a/api/v1/server/handlers/tenants/list_members.go +++ b/api/v1/server/handlers/tenants/list_members.go @@ -6,7 +6,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantService) TenantMemberList(ctx echo.Context, request gen.TenantMemberListRequestObject) (gen.TenantMemberListResponseObject, error) { diff --git a/api/v1/server/handlers/tenants/update.go b/api/v1/server/handlers/tenants/update.go index ccae8bd2a..ab1169ab5 100644 --- a/api/v1/server/handlers/tenants/update.go +++ b/api/v1/server/handlers/tenants/update.go @@ -5,9 +5,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantService) TenantUpdate(ctx echo.Context, request gen.TenantUpdateRequestObject) (gen.TenantUpdateResponseObject, error) { diff --git a/api/v1/server/handlers/tenants/update_email_group.go b/api/v1/server/handlers/tenants/update_email_group.go index 673a9b29d..c10a65659 100644 --- a/api/v1/server/handlers/tenants/update_email_group.go +++ b/api/v1/server/handlers/tenants/update_email_group.go @@ -5,9 +5,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantService) AlertEmailGroupUpdate(ctx echo.Context, request gen.AlertEmailGroupUpdateRequestObject) (gen.AlertEmailGroupUpdateResponseObject, error) { diff --git a/api/v1/server/handlers/tenants/update_invite.go b/api/v1/server/handlers/tenants/update_invite.go index d00ae88e7..3293ca9be 100644 --- a/api/v1/server/handlers/tenants/update_invite.go +++ b/api/v1/server/handlers/tenants/update_invite.go @@ -6,9 +6,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantService) TenantInviteUpdate(ctx echo.Context, request gen.TenantInviteUpdateRequestObject) (gen.TenantInviteUpdateResponseObject, error) { diff --git a/api/v1/server/handlers/tenants/update_member.go b/api/v1/server/handlers/tenants/update_member.go index e5aa90a09..0a4962660 100644 --- a/api/v1/server/handlers/tenants/update_member.go +++ b/api/v1/server/handlers/tenants/update_member.go @@ -6,9 +6,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantService) TenantMemberUpdate(ctx echo.Context, request gen.TenantMemberUpdateRequestObject) (gen.TenantMemberUpdateResponseObject, error) { diff --git a/api/v1/server/handlers/users/accept_invite.go b/api/v1/server/handlers/users/accept_invite.go index 70a4065d8..9aaa3b616 100644 --- a/api/v1/server/handlers/users/accept_invite.go +++ b/api/v1/server/handlers/users/accept_invite.go @@ -10,9 +10,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/constants" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (u *UserService) TenantInviteAccept(ctx echo.Context, request gen.TenantInviteAcceptRequestObject) (gen.TenantInviteAcceptResponseObject, error) { diff --git a/api/v1/server/handlers/users/create.go b/api/v1/server/handlers/users/create.go index f2c937277..d0d5fd211 100644 --- a/api/v1/server/handlers/users/create.go +++ b/api/v1/server/handlers/users/create.go @@ -9,8 +9,8 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" "github.com/hatchet-dev/hatchet/api/v1/server/authn" ) diff --git a/api/v1/server/handlers/users/get_current.go b/api/v1/server/handlers/users/get_current.go index d7a323d50..5e43a4f9e 100644 --- a/api/v1/server/handlers/users/get_current.go +++ b/api/v1/server/handlers/users/get_current.go @@ -12,7 +12,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (u *UserService) UserGetCurrent(ctx echo.Context, request gen.UserGetCurrentRequestObject) (gen.UserGetCurrentResponseObject, error) { diff --git a/api/v1/server/handlers/users/github_oauth_callback.go b/api/v1/server/handlers/users/github_oauth_callback.go index e483ea0ae..1615751da 100644 --- a/api/v1/server/handlers/users/github_oauth_callback.go +++ b/api/v1/server/handlers/users/github_oauth_callback.go @@ -14,9 +14,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/middleware/redirect" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/config/server" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) // Note: we want all errors to redirect, otherwise the user will be greeted with raw JSON in the middle of the login flow. diff --git a/api/v1/server/handlers/users/google_oauth_callback.go b/api/v1/server/handlers/users/google_oauth_callback.go index ede9ac547..b121d87bc 100644 --- a/api/v1/server/handlers/users/google_oauth_callback.go +++ b/api/v1/server/handlers/users/google_oauth_callback.go @@ -16,9 +16,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/middleware/redirect" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/config/server" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) // Note: we want all errors to redirect, otherwise the user will be greeted with raw JSON in the middle of the login flow. diff --git a/api/v1/server/handlers/users/list_memberships.go b/api/v1/server/handlers/users/list_memberships.go index 150086dc7..70a59da23 100644 --- a/api/v1/server/handlers/users/list_memberships.go +++ b/api/v1/server/handlers/users/list_memberships.go @@ -6,7 +6,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *UserService) TenantMembershipsList(ctx echo.Context, request gen.TenantMembershipsListRequestObject) (gen.TenantMembershipsListResponseObject, error) { diff --git a/api/v1/server/handlers/users/list_tenant_invites.go b/api/v1/server/handlers/users/list_tenant_invites.go index 26985331e..291811a92 100644 --- a/api/v1/server/handlers/users/list_tenant_invites.go +++ b/api/v1/server/handlers/users/list_tenant_invites.go @@ -5,7 +5,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *UserService) UserListTenantInvites(ctx echo.Context, request gen.UserListTenantInvitesRequestObject) (gen.UserListTenantInvitesResponseObject, error) { diff --git a/api/v1/server/handlers/users/reject_invite.go b/api/v1/server/handlers/users/reject_invite.go index 49cd78da8..f0e043d2f 100644 --- a/api/v1/server/handlers/users/reject_invite.go +++ b/api/v1/server/handlers/users/reject_invite.go @@ -8,9 +8,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (u *UserService) TenantInviteReject(ctx echo.Context, request gen.TenantInviteRejectRequestObject) (gen.TenantInviteRejectResponseObject, error) { diff --git a/api/v1/server/handlers/users/update_login.go b/api/v1/server/handlers/users/update_login.go index 4c48761cb..9ff2614c3 100644 --- a/api/v1/server/handlers/users/update_login.go +++ b/api/v1/server/handlers/users/update_login.go @@ -10,8 +10,8 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" ) func (u *UserService) UserUpdateLogin(ctx echo.Context, request gen.UserUpdateLoginRequestObject) (gen.UserUpdateLoginResponseObject, error) { diff --git a/api/v1/server/handlers/users/update_logout.go b/api/v1/server/handlers/users/update_logout.go index 69144d2ab..53b48bc1b 100644 --- a/api/v1/server/handlers/users/update_logout.go +++ b/api/v1/server/handlers/users/update_logout.go @@ -6,7 +6,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/authn" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (u *UserService) UserUpdateLogout(ctx echo.Context, request gen.UserUpdateLogoutRequestObject) (gen.UserUpdateLogoutResponseObject, error) { diff --git a/api/v1/server/handlers/users/update_password.go b/api/v1/server/handlers/users/update_password.go index 90a95fbc1..97f3bf04f 100644 --- a/api/v1/server/handlers/users/update_password.go +++ b/api/v1/server/handlers/users/update_password.go @@ -6,9 +6,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (u *UserService) UserUpdatePassword(ctx echo.Context, request gen.UserUpdatePasswordRequestObject) (gen.UserUpdatePasswordResponseObject, error) { diff --git a/api/v1/server/handlers/v1/events/get.go b/api/v1/server/handlers/v1/events/get.go index 97413fa87..9a8ff8720 100644 --- a/api/v1/server/handlers/v1/events/get.go +++ b/api/v1/server/handlers/v1/events/get.go @@ -5,7 +5,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" ) func (t *V1EventsService) V1EventGet(ctx echo.Context, request gen.V1EventGetRequestObject) (gen.V1EventGetResponseObject, error) { diff --git a/api/v1/server/handlers/v1/events/list.go b/api/v1/server/handlers/v1/events/list.go index 788178802..6c0946a2f 100644 --- a/api/v1/server/handlers/v1/events/list.go +++ b/api/v1/server/handlers/v1/events/list.go @@ -12,7 +12,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *V1EventsService) V1EventList(ctx echo.Context, request gen.V1EventListRequestObject) (gen.V1EventListResponseObject, error) { diff --git a/api/v1/server/handlers/v1/events/list_keys.go b/api/v1/server/handlers/v1/events/list_keys.go index 890036845..964bc447a 100644 --- a/api/v1/server/handlers/v1/events/list_keys.go +++ b/api/v1/server/handlers/v1/events/list_keys.go @@ -5,7 +5,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *V1EventsService) V1EventKeyList(ctx echo.Context, request gen.V1EventKeyListRequestObject) (gen.V1EventKeyListResponseObject, error) { diff --git a/api/v1/server/handlers/v1/filters/create.go b/api/v1/server/handlers/v1/filters/create.go index 83f9b79dd..47dc18cbf 100644 --- a/api/v1/server/handlers/v1/filters/create.go +++ b/api/v1/server/handlers/v1/filters/create.go @@ -7,9 +7,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/labstack/echo/v4" ) diff --git a/api/v1/server/handlers/v1/filters/delete.go b/api/v1/server/handlers/v1/filters/delete.go index 7b35f93f9..4db634c94 100644 --- a/api/v1/server/handlers/v1/filters/delete.go +++ b/api/v1/server/handlers/v1/filters/delete.go @@ -4,7 +4,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/labstack/echo/v4" ) diff --git a/api/v1/server/handlers/v1/filters/get.go b/api/v1/server/handlers/v1/filters/get.go index acb3e0925..7dc9a2b69 100644 --- a/api/v1/server/handlers/v1/filters/get.go +++ b/api/v1/server/handlers/v1/filters/get.go @@ -3,7 +3,7 @@ package filtersv1 import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/labstack/echo/v4" ) diff --git a/api/v1/server/handlers/v1/filters/list.go b/api/v1/server/handlers/v1/filters/list.go index e818b0ee8..7a2d8655f 100644 --- a/api/v1/server/handlers/v1/filters/list.go +++ b/api/v1/server/handlers/v1/filters/list.go @@ -4,9 +4,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/jackc/pgx/v5/pgtype" "github.com/labstack/echo/v4" ) diff --git a/api/v1/server/handlers/v1/filters/update.go b/api/v1/server/handlers/v1/filters/update.go index f120bbd23..8224fa2ce 100644 --- a/api/v1/server/handlers/v1/filters/update.go +++ b/api/v1/server/handlers/v1/filters/update.go @@ -7,8 +7,8 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/labstack/echo/v4" ) diff --git a/api/v1/server/handlers/v1/proxy/proxy.go b/api/v1/server/handlers/v1/proxy/proxy.go index f814bd2f2..da3f8aa0d 100644 --- a/api/v1/server/handlers/v1/proxy/proxy.go +++ b/api/v1/server/handlers/v1/proxy/proxy.go @@ -7,7 +7,7 @@ import ( client "github.com/hatchet-dev/hatchet/pkg/client/v1" "github.com/hatchet-dev/hatchet/pkg/config/server" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type Proxy[in, out any] struct { diff --git a/api/v1/server/handlers/v1/tasks/cancel.go b/api/v1/server/handlers/v1/tasks/cancel.go index 12be71e95..9ad98c0ad 100644 --- a/api/v1/server/handlers/v1/tasks/cancel.go +++ b/api/v1/server/handlers/v1/tasks/cancel.go @@ -7,7 +7,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" transformers "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" contracts "github.com/hatchet-dev/hatchet/internal/services/shared/proto/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TasksService) V1TaskCancel(ctx echo.Context, request gen.V1TaskCancelRequestObject) (gen.V1TaskCancelResponseObject, error) { diff --git a/api/v1/server/handlers/v1/tasks/get.go b/api/v1/server/handlers/v1/tasks/get.go index 17c14a394..b9556acf4 100644 --- a/api/v1/server/handlers/v1/tasks/get.go +++ b/api/v1/server/handlers/v1/tasks/get.go @@ -4,7 +4,7 @@ import ( "github.com/labstack/echo/v4" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" transformers "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" ) diff --git a/api/v1/server/handlers/v1/tasks/get_metrics.go b/api/v1/server/handlers/v1/tasks/get_metrics.go index a16cf7278..a90651320 100644 --- a/api/v1/server/handlers/v1/tasks/get_metrics.go +++ b/api/v1/server/handlers/v1/tasks/get_metrics.go @@ -7,9 +7,9 @@ import ( "github.com/jackc/pgx/v5/pgtype" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/labstack/echo/v4" diff --git a/api/v1/server/handlers/v1/tasks/get_point_metrics.go b/api/v1/server/handlers/v1/tasks/get_point_metrics.go index 71ab235af..55fc708b4 100644 --- a/api/v1/server/handlers/v1/tasks/get_point_metrics.go +++ b/api/v1/server/handlers/v1/tasks/get_point_metrics.go @@ -10,7 +10,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TasksService) V1TaskGetPointMetrics(ctx echo.Context, request gen.V1TaskGetPointMetricsRequestObject) (gen.V1TaskGetPointMetricsResponseObject, error) { diff --git a/api/v1/server/handlers/v1/tasks/list_events.go b/api/v1/server/handlers/v1/tasks/list_events.go index a25cdd671..cecd5b2b7 100644 --- a/api/v1/server/handlers/v1/tasks/list_events.go +++ b/api/v1/server/handlers/v1/tasks/list_events.go @@ -5,7 +5,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" transformers "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" ) diff --git a/api/v1/server/handlers/v1/tasks/list_logs.go b/api/v1/server/handlers/v1/tasks/list_logs.go index 7238e5b32..6be21ce85 100644 --- a/api/v1/server/handlers/v1/tasks/list_logs.go +++ b/api/v1/server/handlers/v1/tasks/list_logs.go @@ -6,9 +6,9 @@ import ( "github.com/labstack/echo/v4" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" transformers "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" diff --git a/api/v1/server/handlers/v1/tasks/replay.go b/api/v1/server/handlers/v1/tasks/replay.go index ead2ec664..7dbb482b4 100644 --- a/api/v1/server/handlers/v1/tasks/replay.go +++ b/api/v1/server/handlers/v1/tasks/replay.go @@ -7,7 +7,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" contracts "github.com/hatchet-dev/hatchet/internal/services/shared/proto/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TasksService) V1TaskReplay(ctx echo.Context, request gen.V1TaskReplayRequestObject) (gen.V1TaskReplayResponseObject, error) { diff --git a/api/v1/server/handlers/v1/webhooks/create.go b/api/v1/server/handlers/v1/webhooks/create.go index fee20fe03..daf665ad4 100644 --- a/api/v1/server/handlers/v1/webhooks/create.go +++ b/api/v1/server/handlers/v1/webhooks/create.go @@ -8,9 +8,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (w *V1WebhooksService) V1WebhookCreate(ctx echo.Context, request gen.V1WebhookCreateRequestObject) (gen.V1WebhookCreateResponseObject, error) { diff --git a/api/v1/server/handlers/v1/webhooks/delete.go b/api/v1/server/handlers/v1/webhooks/delete.go index 48b3f4325..5ec67d33c 100644 --- a/api/v1/server/handlers/v1/webhooks/delete.go +++ b/api/v1/server/handlers/v1/webhooks/delete.go @@ -6,7 +6,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (w *V1WebhooksService) V1WebhookDelete(ctx echo.Context, request gen.V1WebhookDeleteRequestObject) (gen.V1WebhookDeleteResponseObject, error) { diff --git a/api/v1/server/handlers/v1/webhooks/get.go b/api/v1/server/handlers/v1/webhooks/get.go index ed6ae4c56..e9f6264e8 100644 --- a/api/v1/server/handlers/v1/webhooks/get.go +++ b/api/v1/server/handlers/v1/webhooks/get.go @@ -5,7 +5,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (w *V1WebhooksService) V1WebhookGet(ctx echo.Context, request gen.V1WebhookGetRequestObject) (gen.V1WebhookGetResponseObject, error) { diff --git a/api/v1/server/handlers/v1/webhooks/list.go b/api/v1/server/handlers/v1/webhooks/list.go index 1d7c4ce02..1892cf829 100644 --- a/api/v1/server/handlers/v1/webhooks/list.go +++ b/api/v1/server/handlers/v1/webhooks/list.go @@ -6,8 +6,8 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (w *V1WebhooksService) V1WebhookList(ctx echo.Context, request gen.V1WebhookListRequestObject) (gen.V1WebhookListResponseObject, error) { diff --git a/api/v1/server/handlers/v1/webhooks/receive.go b/api/v1/server/handlers/v1/webhooks/receive.go index dffb15995..b16311a2c 100644 --- a/api/v1/server/handlers/v1/webhooks/receive.go +++ b/api/v1/server/handlers/v1/webhooks/receive.go @@ -23,7 +23,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/internal/cel" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (w *V1WebhooksService) V1WebhookReceive(ctx echo.Context, request gen.V1WebhookReceiveRequestObject) (gen.V1WebhookReceiveResponseObject, error) { diff --git a/api/v1/server/handlers/v1/webhooks/update.go b/api/v1/server/handlers/v1/webhooks/update.go index ef7ea3b53..c65e145d4 100644 --- a/api/v1/server/handlers/v1/webhooks/update.go +++ b/api/v1/server/handlers/v1/webhooks/update.go @@ -6,7 +6,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (w *V1WebhooksService) V1WebhookUpdate(ctx echo.Context, request gen.V1WebhookUpdateRequestObject) (gen.V1WebhookUpdateResponseObject, error) { diff --git a/api/v1/server/handlers/v1/workflow-runs/get-status.go b/api/v1/server/handlers/v1/workflow-runs/get-status.go index 812004478..b5e1b2072 100644 --- a/api/v1/server/handlers/v1/workflow-runs/get-status.go +++ b/api/v1/server/handlers/v1/workflow-runs/get-status.go @@ -4,7 +4,7 @@ import ( "github.com/labstack/echo/v4" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" ) func (t *V1WorkflowRunsService) V1WorkflowRunGetStatus(ctx echo.Context, request gen.V1WorkflowRunGetStatusRequestObject) (gen.V1WorkflowRunGetStatusResponseObject, error) { diff --git a/api/v1/server/handlers/v1/workflow-runs/get-timings.go b/api/v1/server/handlers/v1/workflow-runs/get-timings.go index 5f6502b72..d8f879126 100644 --- a/api/v1/server/handlers/v1/workflow-runs/get-timings.go +++ b/api/v1/server/handlers/v1/workflow-runs/get-timings.go @@ -7,9 +7,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" transformers "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" diff --git a/api/v1/server/handlers/v1/workflow-runs/get.go b/api/v1/server/handlers/v1/workflow-runs/get.go index b0c23b05b..62b4a6486 100644 --- a/api/v1/server/handlers/v1/workflow-runs/get.go +++ b/api/v1/server/handlers/v1/workflow-runs/get.go @@ -8,9 +8,9 @@ import ( "github.com/labstack/echo/v4" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" transformers "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" ) diff --git a/api/v1/server/handlers/v1/workflow-runs/list-task-events.go b/api/v1/server/handlers/v1/workflow-runs/list-task-events.go index ae22304b2..3a66e988d 100644 --- a/api/v1/server/handlers/v1/workflow-runs/list-task-events.go +++ b/api/v1/server/handlers/v1/workflow-runs/list-task-events.go @@ -4,9 +4,9 @@ import ( "github.com/labstack/echo/v4" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" transformers "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" ) diff --git a/api/v1/server/handlers/v1/workflow-runs/list.go b/api/v1/server/handlers/v1/workflow-runs/list.go index 0adfa017f..e13d03c73 100644 --- a/api/v1/server/handlers/v1/workflow-runs/list.go +++ b/api/v1/server/handlers/v1/workflow-runs/list.go @@ -9,9 +9,9 @@ import ( "github.com/labstack/echo/v4" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" transformers "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" diff --git a/api/v1/server/handlers/v1/workflow-runs/trigger.go b/api/v1/server/handlers/v1/workflow-runs/trigger.go index 17e199b8e..e0951531d 100644 --- a/api/v1/server/handlers/v1/workflow-runs/trigger.go +++ b/api/v1/server/handlers/v1/workflow-runs/trigger.go @@ -15,9 +15,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" contracts "github.com/hatchet-dev/hatchet/internal/services/shared/proto/v1" "github.com/hatchet-dev/hatchet/pkg/constants" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *V1WorkflowRunsService) V1WorkflowRunCreate(ctx echo.Context, request gen.V1WorkflowRunCreateRequestObject) (gen.V1WorkflowRunCreateResponseObject, error) { diff --git a/api/v1/server/handlers/workers/get.go b/api/v1/server/handlers/workers/get.go index 09211f113..62e8c1352 100644 --- a/api/v1/server/handlers/workers/get.go +++ b/api/v1/server/handlers/workers/get.go @@ -9,7 +9,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" transformersv1 "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *WorkerService) WorkerGet(ctx echo.Context, request gen.WorkerGetRequestObject) (gen.WorkerGetResponseObject, error) { diff --git a/api/v1/server/handlers/workers/list.go b/api/v1/server/handlers/workers/list.go index df2618c84..8cae90353 100644 --- a/api/v1/server/handlers/workers/list.go +++ b/api/v1/server/handlers/workers/list.go @@ -9,9 +9,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" transformersv1 "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/api/v1/server/handlers/workers/update.go b/api/v1/server/handlers/workers/update.go index 0a19c39e2..4382e5b60 100644 --- a/api/v1/server/handlers/workers/update.go +++ b/api/v1/server/handlers/workers/update.go @@ -5,9 +5,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *WorkerService) WorkerUpdate(ctx echo.Context, request gen.WorkerUpdateRequestObject) (gen.WorkerUpdateResponseObject, error) { diff --git a/api/v1/server/handlers/workflows/bulk_delete_scheduled.go b/api/v1/server/handlers/workflows/bulk_delete_scheduled.go index 94b5978b4..ee7baf57f 100644 --- a/api/v1/server/handlers/workflows/bulk_delete_scheduled.go +++ b/api/v1/server/handlers/workflows/bulk_delete_scheduled.go @@ -11,9 +11,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *WorkflowService) WorkflowScheduledBulkDelete(ctx echo.Context, request gen.WorkflowScheduledBulkDeleteRequestObject) (gen.WorkflowScheduledBulkDeleteResponseObject, error) { diff --git a/api/v1/server/handlers/workflows/bulk_update_scheduled.go b/api/v1/server/handlers/workflows/bulk_update_scheduled.go index b74c225d5..58114267d 100644 --- a/api/v1/server/handlers/workflows/bulk_update_scheduled.go +++ b/api/v1/server/handlers/workflows/bulk_update_scheduled.go @@ -8,9 +8,9 @@ import ( openapi_types "github.com/oapi-codegen/runtime/types" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *WorkflowService) WorkflowScheduledBulkUpdate(ctx echo.Context, request gen.WorkflowScheduledBulkUpdateRequestObject) (gen.WorkflowScheduledBulkUpdateResponseObject, error) { diff --git a/api/v1/server/handlers/workflows/create_cron.go b/api/v1/server/handlers/workflows/create_cron.go index 6547782fb..70d354646 100644 --- a/api/v1/server/handlers/workflows/create_cron.go +++ b/api/v1/server/handlers/workflows/create_cron.go @@ -9,9 +9,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *WorkflowService) CronWorkflowTriggerCreate(ctx echo.Context, request gen.CronWorkflowTriggerCreateRequestObject) (gen.CronWorkflowTriggerCreateResponseObject, error) { diff --git a/api/v1/server/handlers/workflows/create_scheduled.go b/api/v1/server/handlers/workflows/create_scheduled.go index 778bc7182..dd10b127d 100644 --- a/api/v1/server/handlers/workflows/create_scheduled.go +++ b/api/v1/server/handlers/workflows/create_scheduled.go @@ -9,9 +9,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" "github.com/hatchet-dev/hatchet/pkg/constants" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *WorkflowService) ScheduledWorkflowRunCreate(ctx echo.Context, request gen.ScheduledWorkflowRunCreateRequestObject) (gen.ScheduledWorkflowRunCreateResponseObject, error) { diff --git a/api/v1/server/handlers/workflows/delete.go b/api/v1/server/handlers/workflows/delete.go index 73e6a2199..6776b79ad 100644 --- a/api/v1/server/handlers/workflows/delete.go +++ b/api/v1/server/handlers/workflows/delete.go @@ -5,7 +5,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *WorkflowService) WorkflowDelete(ctx echo.Context, request gen.WorkflowDeleteRequestObject) (gen.WorkflowDeleteResponseObject, error) { diff --git a/api/v1/server/handlers/workflows/delete_cron.go b/api/v1/server/handlers/workflows/delete_cron.go index 950b09b23..f9913b79f 100644 --- a/api/v1/server/handlers/workflows/delete_cron.go +++ b/api/v1/server/handlers/workflows/delete_cron.go @@ -8,7 +8,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *WorkflowService) WorkflowCronDelete(ctx echo.Context, request gen.WorkflowCronDeleteRequestObject) (gen.WorkflowCronDeleteResponseObject, error) { diff --git a/api/v1/server/handlers/workflows/delete_scheduled.go b/api/v1/server/handlers/workflows/delete_scheduled.go index 88b99782c..7e0dd3ac2 100644 --- a/api/v1/server/handlers/workflows/delete_scheduled.go +++ b/api/v1/server/handlers/workflows/delete_scheduled.go @@ -8,7 +8,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *WorkflowService) WorkflowScheduledDelete(ctx echo.Context, request gen.WorkflowScheduledDeleteRequestObject) (gen.WorkflowScheduledDeleteResponseObject, error) { diff --git a/api/v1/server/handlers/workflows/get.go b/api/v1/server/handlers/workflows/get.go index c937d8c6c..dbb4deeac 100644 --- a/api/v1/server/handlers/workflows/get.go +++ b/api/v1/server/handlers/workflows/get.go @@ -6,7 +6,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *WorkflowService) WorkflowGet(ctx echo.Context, request gen.WorkflowGetRequestObject) (gen.WorkflowGetResponseObject, error) { diff --git a/api/v1/server/handlers/workflows/get_cron.go b/api/v1/server/handlers/workflows/get_cron.go index 51746ef96..68a37b153 100644 --- a/api/v1/server/handlers/workflows/get_cron.go +++ b/api/v1/server/handlers/workflows/get_cron.go @@ -10,7 +10,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *WorkflowService) WorkflowCronGet(ctx echo.Context, request gen.WorkflowCronGetRequestObject) (gen.WorkflowCronGetResponseObject, error) { diff --git a/api/v1/server/handlers/workflows/get_scheduled.go b/api/v1/server/handlers/workflows/get_scheduled.go index 8bbac557c..53ef0c788 100644 --- a/api/v1/server/handlers/workflows/get_scheduled.go +++ b/api/v1/server/handlers/workflows/get_scheduled.go @@ -6,7 +6,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *WorkflowService) WorkflowScheduledGet(ctx echo.Context, request gen.WorkflowScheduledGetRequestObject) (gen.WorkflowScheduledGetResponseObject, error) { diff --git a/api/v1/server/handlers/workflows/get_version.go b/api/v1/server/handlers/workflows/get_version.go index 415e4b219..5ad226e16 100644 --- a/api/v1/server/handlers/workflows/get_version.go +++ b/api/v1/server/handlers/workflows/get_version.go @@ -11,7 +11,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *WorkflowService) WorkflowVersionGet(ctx echo.Context, request gen.WorkflowVersionGetRequestObject) (gen.WorkflowVersionGetResponseObject, error) { diff --git a/api/v1/server/handlers/workflows/list.go b/api/v1/server/handlers/workflows/list.go index 2df1f9240..71ac98ad2 100644 --- a/api/v1/server/handlers/workflows/list.go +++ b/api/v1/server/handlers/workflows/list.go @@ -7,9 +7,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *WorkflowService) WorkflowList(ctx echo.Context, request gen.WorkflowListRequestObject) (gen.WorkflowListResponseObject, error) { diff --git a/api/v1/server/handlers/workflows/list_crons.go b/api/v1/server/handlers/workflows/list_crons.go index 61d9f6cce..d3d1cf0b6 100644 --- a/api/v1/server/handlers/workflows/list_crons.go +++ b/api/v1/server/handlers/workflows/list_crons.go @@ -12,9 +12,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *WorkflowService) CronWorkflowList(ctx echo.Context, request gen.CronWorkflowListRequestObject) (gen.CronWorkflowListResponseObject, error) { diff --git a/api/v1/server/handlers/workflows/list_scheduled.go b/api/v1/server/handlers/workflows/list_scheduled.go index bc53293bd..df9678406 100644 --- a/api/v1/server/handlers/workflows/list_scheduled.go +++ b/api/v1/server/handlers/workflows/list_scheduled.go @@ -12,9 +12,9 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/apierrors" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *WorkflowService) WorkflowScheduledList(ctx echo.Context, request gen.WorkflowScheduledListRequestObject) (gen.WorkflowScheduledListResponseObject, error) { diff --git a/api/v1/server/handlers/workflows/update_cron.go b/api/v1/server/handlers/workflows/update_cron.go index fbd16b3fc..5c76e57d2 100644 --- a/api/v1/server/handlers/workflows/update_cron.go +++ b/api/v1/server/handlers/workflows/update_cron.go @@ -7,9 +7,9 @@ import ( "github.com/labstack/echo/v4" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *WorkflowService) WorkflowCronUpdate(ctx echo.Context, request gen.WorkflowCronUpdateRequestObject) (gen.WorkflowCronUpdateResponseObject, error) { diff --git a/api/v1/server/handlers/workflows/update_scheduled.go b/api/v1/server/handlers/workflows/update_scheduled.go index 5179dfd61..848fb88c3 100644 --- a/api/v1/server/handlers/workflows/update_scheduled.go +++ b/api/v1/server/handlers/workflows/update_scheduled.go @@ -10,7 +10,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/api/v1/server/oas/transformers" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *WorkflowService) WorkflowScheduledUpdate(ctx echo.Context, request gen.WorkflowScheduledUpdateRequestObject) (gen.WorkflowScheduledUpdateResponseObject, error) { diff --git a/api/v1/server/middleware/populator/populator.go b/api/v1/server/middleware/populator/populator.go index f8097412a..ea04ba622 100644 --- a/api/v1/server/middleware/populator/populator.go +++ b/api/v1/server/middleware/populator/populator.go @@ -11,7 +11,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/middleware" "github.com/hatchet-dev/hatchet/pkg/config/server" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" "github.com/hatchet-dev/hatchet/pkg/telemetry/servertel" ) diff --git a/api/v1/server/oas/transformers/api_token.go b/api/v1/server/oas/transformers/api_token.go index f3dfa4f00..4a964b485 100644 --- a/api/v1/server/oas/transformers/api_token.go +++ b/api/v1/server/oas/transformers/api_token.go @@ -3,7 +3,7 @@ package transformers import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func ToAPIToken(token *sqlcv1.APIToken) *gen.APIToken { diff --git a/api/v1/server/oas/transformers/event.go b/api/v1/server/oas/transformers/event.go index 173269545..ffbdda133 100644 --- a/api/v1/server/oas/transformers/event.go +++ b/api/v1/server/oas/transformers/event.go @@ -5,9 +5,9 @@ import ( "fmt" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/jackc/pgx/v5/pgtype" ) diff --git a/api/v1/server/oas/transformers/log.go b/api/v1/server/oas/transformers/log.go index e878bab8d..26cde50b3 100644 --- a/api/v1/server/oas/transformers/log.go +++ b/api/v1/server/oas/transformers/log.go @@ -4,7 +4,7 @@ import ( "encoding/json" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func ToLogFromSQLC(log *sqlcv1.LogLine) *gen.LogLine { diff --git a/api/v1/server/oas/transformers/rate_limits.go b/api/v1/server/oas/transformers/rate_limits.go index a57b760de..da1157b02 100644 --- a/api/v1/server/oas/transformers/rate_limits.go +++ b/api/v1/server/oas/transformers/rate_limits.go @@ -2,7 +2,7 @@ package transformers import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func ToRateLimitFromSQLC(rl *sqlcv1.ListRateLimitsForTenantNoMutateRow) (*gen.RateLimit, error) { diff --git a/api/v1/server/oas/transformers/slack.go b/api/v1/server/oas/transformers/slack.go index 0f7f061d0..2047d3fd6 100644 --- a/api/v1/server/oas/transformers/slack.go +++ b/api/v1/server/oas/transformers/slack.go @@ -5,7 +5,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func ToSlackWebhook(slack *sqlcv1.SlackAppWebhook) *gen.SlackWebhook { diff --git a/api/v1/server/oas/transformers/sns.go b/api/v1/server/oas/transformers/sns.go index b2a318d05..90f48c569 100644 --- a/api/v1/server/oas/transformers/sns.go +++ b/api/v1/server/oas/transformers/sns.go @@ -7,7 +7,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func ToSNSIntegration(sns *sqlcv1.SNSIntegration, serverUrl string) *gen.SNSIntegration { diff --git a/api/v1/server/oas/transformers/tenant.go b/api/v1/server/oas/transformers/tenant.go index 3ac867d86..e5ad9cb10 100644 --- a/api/v1/server/oas/transformers/tenant.go +++ b/api/v1/server/oas/transformers/tenant.go @@ -4,9 +4,9 @@ import ( "strings" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func ToTenant(tenant *sqlcv1.Tenant) *gen.Tenant { diff --git a/api/v1/server/oas/transformers/tenant_invite.go b/api/v1/server/oas/transformers/tenant_invite.go index 33c373250..f1c08ef36 100644 --- a/api/v1/server/oas/transformers/tenant_invite.go +++ b/api/v1/server/oas/transformers/tenant_invite.go @@ -3,7 +3,7 @@ package transformers import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func ToTenantInviteLink(invite *sqlcv1.TenantInviteLink) *gen.TenantInvite { diff --git a/api/v1/server/oas/transformers/user.go b/api/v1/server/oas/transformers/user.go index 3d36b748d..7fabea8ab 100644 --- a/api/v1/server/oas/transformers/user.go +++ b/api/v1/server/oas/transformers/user.go @@ -4,9 +4,9 @@ import ( "github.com/oapi-codegen/runtime/types" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func ToUser(user *sqlcv1.User, hasPassword bool, hashedEmail *string) *gen.User { diff --git a/api/v1/server/oas/transformers/v1/events.go b/api/v1/server/oas/transformers/v1/events.go index 2d2986d9c..e2255219d 100644 --- a/api/v1/server/oas/transformers/v1/events.go +++ b/api/v1/server/oas/transformers/v1/events.go @@ -6,7 +6,7 @@ import ( "github.com/google/uuid" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" ) func parseTriggeredRuns(triggeredRuns []byte) ([]gen.V1EventTriggeredRun, error) { diff --git a/api/v1/server/oas/transformers/v1/filters.go b/api/v1/server/oas/transformers/v1/filters.go index 3b64714d4..7d7bd1316 100644 --- a/api/v1/server/oas/transformers/v1/filters.go +++ b/api/v1/server/oas/transformers/v1/filters.go @@ -5,7 +5,7 @@ import ( "github.com/google/uuid" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func ToV1Filter(filter *sqlcv1.V1Filter) gen.V1Filter { diff --git a/api/v1/server/oas/transformers/v1/log.go b/api/v1/server/oas/transformers/v1/log.go index a637596bf..e666da8e2 100644 --- a/api/v1/server/oas/transformers/v1/log.go +++ b/api/v1/server/oas/transformers/v1/log.go @@ -4,7 +4,7 @@ import ( "encoding/json" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func ToV1LogLine(log *sqlcv1.V1LogLine) *gen.V1LogLine { diff --git a/api/v1/server/oas/transformers/v1/tasks.go b/api/v1/server/oas/transformers/v1/tasks.go index 2e4478b03..af93d1f97 100644 --- a/api/v1/server/oas/transformers/v1/tasks.go +++ b/api/v1/server/oas/transformers/v1/tasks.go @@ -10,9 +10,9 @@ import ( "github.com/oapi-codegen/runtime/types" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func jsonToMap(jsonBytes []byte) map[string]interface{} { diff --git a/api/v1/server/oas/transformers/v1/webhooks.go b/api/v1/server/oas/transformers/v1/webhooks.go index 1065be617..1463fa2cd 100644 --- a/api/v1/server/oas/transformers/v1/webhooks.go +++ b/api/v1/server/oas/transformers/v1/webhooks.go @@ -4,7 +4,7 @@ import ( "github.com/google/uuid" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func ToV1Webhook(webhook *sqlcv1.V1IncomingWebhook) gen.V1Webhook { diff --git a/api/v1/server/oas/transformers/v1/worker.go b/api/v1/server/oas/transformers/v1/worker.go index 5407c3a29..17da62409 100644 --- a/api/v1/server/oas/transformers/v1/worker.go +++ b/api/v1/server/oas/transformers/v1/worker.go @@ -7,7 +7,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func ToSlotState(slots []*sqlcv1.ListSemaphoreSlotsWithStateForWorkerRow, remainingSlots int) *[]gen.SemaphoreSlots { diff --git a/api/v1/server/oas/transformers/v1/workflow_runs.go b/api/v1/server/oas/transformers/v1/workflow_runs.go index c4ae90da7..208baea51 100644 --- a/api/v1/server/oas/transformers/v1/workflow_runs.go +++ b/api/v1/server/oas/transformers/v1/workflow_runs.go @@ -8,9 +8,9 @@ import ( "github.com/jackc/pgx/v5/pgtype" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func WorkflowRunDataToV1TaskSummary(task *v1.WorkflowRunData, workflowIdsToNames map[pgtype.UUID]string, actionId string) gen.V1TaskSummary { diff --git a/api/v1/server/oas/transformers/webhook_worker.go b/api/v1/server/oas/transformers/webhook_worker.go index 27391cffa..3166ec276 100644 --- a/api/v1/server/oas/transformers/webhook_worker.go +++ b/api/v1/server/oas/transformers/webhook_worker.go @@ -3,7 +3,7 @@ package transformers import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func ToWebhookWorkerRequest(webhookWorker *sqlcv1.WebhookWorkerRequest) *gen.WebhookWorkerRequest { diff --git a/api/v1/server/oas/transformers/worker.go b/api/v1/server/oas/transformers/worker.go index 01d9146ec..fcac47b63 100644 --- a/api/v1/server/oas/transformers/worker.go +++ b/api/v1/server/oas/transformers/worker.go @@ -7,7 +7,7 @@ import ( "github.com/google/uuid" "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func ToWorkerLabels(labels []*sqlcv1.ListWorkerLabelsRow) *[]gen.WorkerLabel { diff --git a/api/v1/server/oas/transformers/workflow.go b/api/v1/server/oas/transformers/workflow.go index f71789264..b5004fd14 100644 --- a/api/v1/server/oas/transformers/workflow.go +++ b/api/v1/server/oas/transformers/workflow.go @@ -7,7 +7,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func ToWorkflow( diff --git a/api/v1/server/oas/transformers/workflow_run.go b/api/v1/server/oas/transformers/workflow_run.go index f38848179..cc6bf17c2 100644 --- a/api/v1/server/oas/transformers/workflow_run.go +++ b/api/v1/server/oas/transformers/workflow_run.go @@ -8,7 +8,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func getEpochFromTime(t time.Time) *int { diff --git a/api/v1/server/run/run.go b/api/v1/server/run/run.go index 985a135f0..ff6dd2ced 100644 --- a/api/v1/server/run/run.go +++ b/api/v1/server/run/run.go @@ -46,7 +46,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/oas/gen" "github.com/hatchet-dev/hatchet/pkg/config/server" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type apiService struct { diff --git a/cmd/hatchet-admin/cli/seed/seed-cypress.go b/cmd/hatchet-admin/cli/seed/seed-cypress.go index ba793ac10..955979f9f 100644 --- a/cmd/hatchet-admin/cli/seed/seed-cypress.go +++ b/cmd/hatchet-admin/cli/seed/seed-cypress.go @@ -13,8 +13,8 @@ import ( "github.com/jackc/pgx/v5" "github.com/hatchet-dev/hatchet/pkg/config/database" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" ) type User struct { diff --git a/cmd/hatchet-admin/cli/seed/seed.go b/cmd/hatchet-admin/cli/seed/seed.go index 6b8bdc893..736160373 100644 --- a/cmd/hatchet-admin/cli/seed/seed.go +++ b/cmd/hatchet-admin/cli/seed/seed.go @@ -8,8 +8,8 @@ import ( "github.com/jackc/pgx/v5" "github.com/hatchet-dev/hatchet/pkg/config/database" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" ) func SeedDatabase(dc *database.Layer) error { diff --git a/cmd/hatchet-engine/engine/run.go b/cmd/hatchet-engine/engine/run.go index c5787a7b2..ab4336b8e 100644 --- a/cmd/hatchet-engine/engine/run.go +++ b/cmd/hatchet-engine/engine/run.go @@ -13,9 +13,9 @@ import ( "github.com/hatchet-dev/hatchet/internal/services/admin" adminv1 "github.com/hatchet-dev/hatchet/internal/services/admin/v1" metricscontroller "github.com/hatchet-dev/hatchet/internal/services/controllers/metrics" + "github.com/hatchet-dev/hatchet/internal/services/controllers/olap" "github.com/hatchet-dev/hatchet/internal/services/controllers/retention" - "github.com/hatchet-dev/hatchet/internal/services/controllers/v1/olap" - "github.com/hatchet-dev/hatchet/internal/services/controllers/v1/task" + "github.com/hatchet-dev/hatchet/internal/services/controllers/task" "github.com/hatchet-dev/hatchet/internal/services/dispatcher" dispatcherv1 "github.com/hatchet-dev/hatchet/internal/services/dispatcher/v1" "github.com/hatchet-dev/hatchet/internal/services/grpc" @@ -27,8 +27,8 @@ import ( "github.com/hatchet-dev/hatchet/pkg/config/loader" "github.com/hatchet-dev/hatchet/pkg/config/server" "github.com/hatchet-dev/hatchet/pkg/config/shared" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/cache" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" "github.com/hatchet-dev/hatchet/pkg/telemetry" "github.com/rs/zerolog" diff --git a/internal/cel/cel.go b/internal/cel/cel.go index 35b8d7b10..03892bf82 100644 --- a/internal/cel/cel.go +++ b/internal/cel/cel.go @@ -10,7 +10,7 @@ import ( "github.com/google/cel-go/common/types/ref" "github.com/google/cel-go/ext" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" expr "google.golang.org/genproto/googleapis/api/expr/v1alpha1" ) diff --git a/internal/integrations/alerting/alerter.go b/internal/integrations/alerting/alerter.go index eb088cdca..77067a5e9 100644 --- a/internal/integrations/alerting/alerter.go +++ b/internal/integrations/alerting/alerter.go @@ -10,9 +10,9 @@ import ( "github.com/hatchet-dev/hatchet/internal/integrations/alerting/alerttypes" "github.com/hatchet-dev/hatchet/pkg/encryption" "github.com/hatchet-dev/hatchet/pkg/integrations/email" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/timediff" ) diff --git a/internal/integrations/alerting/email.go b/internal/integrations/alerting/email.go index 997dd5b95..1575088b7 100644 --- a/internal/integrations/alerting/email.go +++ b/internal/integrations/alerting/email.go @@ -11,9 +11,9 @@ import ( "github.com/hatchet-dev/hatchet/internal/integrations/alerting/alerttypes" "github.com/hatchet-dev/hatchet/pkg/integrations/email" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantAlertManager) sendEmailWorkflowRunAlert(tenant *sqlcv1.Tenant, emailGroup *v1.TenantAlertEmailGroupForSend, numFailed int, failedRuns []alerttypes.WorkflowRunFailedItem) error { diff --git a/internal/integrations/alerting/slack.go b/internal/integrations/alerting/slack.go index 7f301a478..4d2a092b8 100644 --- a/internal/integrations/alerting/slack.go +++ b/internal/integrations/alerting/slack.go @@ -6,7 +6,7 @@ import ( "github.com/slack-go/slack" "github.com/hatchet-dev/hatchet/internal/integrations/alerting/alerttypes" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TenantAlertManager) sendSlackWorkflowRunAlert(slackWebhook *sqlcv1.SlackAppWebhook, numFailed int, failedRuns []alerttypes.WorkflowRunFailedItem) error { diff --git a/internal/msgqueue/v1/message_ids.go b/internal/msgqueue/message_ids.go similarity index 98% rename from internal/msgqueue/v1/message_ids.go rename to internal/msgqueue/message_ids.go index 78e342c9e..21e7a03f1 100644 --- a/internal/msgqueue/v1/message_ids.go +++ b/internal/msgqueue/message_ids.go @@ -1,4 +1,4 @@ -package v1 +package msgqueue // Message ID constants for tenant messages const ( diff --git a/internal/msgqueue/v1/mq_pub_buffer.go b/internal/msgqueue/mq_pub_buffer.go similarity index 99% rename from internal/msgqueue/v1/mq_pub_buffer.go rename to internal/msgqueue/mq_pub_buffer.go index 5ea8c2481..2f7142d32 100644 --- a/internal/msgqueue/v1/mq_pub_buffer.go +++ b/internal/msgqueue/mq_pub_buffer.go @@ -1,4 +1,4 @@ -package v1 +package msgqueue import ( "context" diff --git a/internal/msgqueue/v1/mq_sub_buffer.go b/internal/msgqueue/mq_sub_buffer.go similarity index 99% rename from internal/msgqueue/v1/mq_sub_buffer.go rename to internal/msgqueue/mq_sub_buffer.go index c9d03b3de..55a40b380 100644 --- a/internal/msgqueue/v1/mq_sub_buffer.go +++ b/internal/msgqueue/mq_sub_buffer.go @@ -1,4 +1,4 @@ -package v1 +package msgqueue import ( "context" diff --git a/internal/msgqueue/v1/mq_sub_buffer_test.go b/internal/msgqueue/mq_sub_buffer_test.go similarity index 99% rename from internal/msgqueue/v1/mq_sub_buffer_test.go rename to internal/msgqueue/mq_sub_buffer_test.go index 69ad4700f..8fc3df9c1 100644 --- a/internal/msgqueue/v1/mq_sub_buffer_test.go +++ b/internal/msgqueue/mq_sub_buffer_test.go @@ -1,4 +1,4 @@ -package v1 +package msgqueue import ( "context" diff --git a/internal/msgqueue/v1/msg.go b/internal/msgqueue/msg.go similarity index 99% rename from internal/msgqueue/v1/msg.go rename to internal/msgqueue/msg.go index 637a75354..753dcff95 100644 --- a/internal/msgqueue/v1/msg.go +++ b/internal/msgqueue/msg.go @@ -1,4 +1,4 @@ -package v1 +package msgqueue import ( "encoding/json" diff --git a/internal/msgqueue/v1/msgqueue.go b/internal/msgqueue/msgqueue.go similarity index 99% rename from internal/msgqueue/v1/msgqueue.go rename to internal/msgqueue/msgqueue.go index 8ec69085a..c4057341f 100644 --- a/internal/msgqueue/v1/msgqueue.go +++ b/internal/msgqueue/msgqueue.go @@ -1,4 +1,4 @@ -package v1 +package msgqueue import ( "context" diff --git a/internal/msgqueue/v1/postgres/exchange.go b/internal/msgqueue/postgres/exchange.go similarity index 95% rename from internal/msgqueue/v1/postgres/exchange.go rename to internal/msgqueue/postgres/exchange.go index 0aa1fca3b..1b47b8981 100644 --- a/internal/msgqueue/v1/postgres/exchange.go +++ b/internal/msgqueue/postgres/exchange.go @@ -6,7 +6,7 @@ import ( "golang.org/x/sync/errgroup" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" ) func (p *PostgresMessageQueue) addTenantExchangeMessage(ctx context.Context, q msgqueue.Queue, msg *msgqueue.Message) error { diff --git a/internal/msgqueue/v1/postgres/msgqueue.go b/internal/msgqueue/postgres/msgqueue.go similarity index 98% rename from internal/msgqueue/v1/postgres/msgqueue.go rename to internal/msgqueue/postgres/msgqueue.go index 9253c0fdb..e00acda16 100644 --- a/internal/msgqueue/v1/postgres/msgqueue.go +++ b/internal/msgqueue/postgres/msgqueue.go @@ -13,11 +13,11 @@ import ( "golang.org/x/sync/errgroup" "github.com/hatchet-dev/hatchet/internal/cache" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" "github.com/hatchet-dev/hatchet/internal/queueutils" "github.com/hatchet-dev/hatchet/pkg/logger" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/internal/msgqueue/v1/rabbitmq/channel_pool.go b/internal/msgqueue/rabbitmq/channel_pool.go similarity index 100% rename from internal/msgqueue/v1/rabbitmq/channel_pool.go rename to internal/msgqueue/rabbitmq/channel_pool.go diff --git a/internal/msgqueue/v1/rabbitmq/gzip.go b/internal/msgqueue/rabbitmq/gzip.go similarity index 100% rename from internal/msgqueue/v1/rabbitmq/gzip.go rename to internal/msgqueue/rabbitmq/gzip.go diff --git a/internal/msgqueue/v1/rabbitmq/rabbitmq.go b/internal/msgqueue/rabbitmq/rabbitmq.go similarity index 99% rename from internal/msgqueue/v1/rabbitmq/rabbitmq.go rename to internal/msgqueue/rabbitmq/rabbitmq.go index 53a4a2b69..c4f280d2a 100644 --- a/internal/msgqueue/v1/rabbitmq/rabbitmq.go +++ b/internal/msgqueue/rabbitmq/rabbitmq.go @@ -15,7 +15,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" "github.com/hatchet-dev/hatchet/internal/queueutils" "github.com/hatchet-dev/hatchet/pkg/logger" "github.com/hatchet-dev/hatchet/pkg/random" diff --git a/internal/msgqueue/v1/rabbitmq/rabbitmq_test.go b/internal/msgqueue/rabbitmq/rabbitmq_test.go similarity index 99% rename from internal/msgqueue/v1/rabbitmq/rabbitmq_test.go rename to internal/msgqueue/rabbitmq/rabbitmq_test.go index bee612d51..24b0fe8ed 100644 --- a/internal/msgqueue/v1/rabbitmq/rabbitmq_test.go +++ b/internal/msgqueue/rabbitmq/rabbitmq_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" "github.com/hatchet-dev/hatchet/pkg/random" ) diff --git a/internal/msgqueue/v1/shared_tenant_reader.go b/internal/msgqueue/shared_tenant_reader.go similarity index 99% rename from internal/msgqueue/v1/shared_tenant_reader.go rename to internal/msgqueue/shared_tenant_reader.go index a9946ce72..212381a97 100644 --- a/internal/msgqueue/v1/shared_tenant_reader.go +++ b/internal/msgqueue/shared_tenant_reader.go @@ -1,4 +1,4 @@ -package v1 +package msgqueue import ( "context" diff --git a/internal/operation/interval.go b/internal/operation/interval.go index 7c6433962..a057848ba 100644 --- a/internal/operation/interval.go +++ b/internal/operation/interval.go @@ -9,7 +9,7 @@ import ( "github.com/rs/zerolog" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" ) const ( diff --git a/internal/operation/interval_test.go b/internal/operation/interval_test.go index 215c5e682..90699551a 100644 --- a/internal/operation/interval_test.go +++ b/internal/operation/interval_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/stretchr/testify/assert" ) diff --git a/internal/operation/operation.go b/internal/operation/operation.go index 61e133134..7d8180e86 100644 --- a/internal/operation/operation.go +++ b/internal/operation/operation.go @@ -8,7 +8,7 @@ import ( "github.com/rs/zerolog" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" ) type ID interface { diff --git a/internal/operation/pool.go b/internal/operation/pool.go index c58e1575a..d96aa37c4 100644 --- a/internal/operation/pool.go +++ b/internal/operation/pool.go @@ -6,9 +6,9 @@ import ( "time" "github.com/hatchet-dev/hatchet/internal/services/partition" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/rs/zerolog" ) diff --git a/internal/queueutils/pool.go b/internal/queueutils/pool.go index 362921903..cd3db6c6e 100644 --- a/internal/queueutils/pool.go +++ b/internal/queueutils/pool.go @@ -5,7 +5,7 @@ import ( "time" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/rs/zerolog" ) diff --git a/internal/services/admin/admin.go b/internal/services/admin/admin.go index 05dde5c89..345b54ff2 100644 --- a/internal/services/admin/admin.go +++ b/internal/services/admin/admin.go @@ -3,9 +3,9 @@ package admin import ( "fmt" - msgqueuev1 "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" "github.com/hatchet-dev/hatchet/internal/services/admin/contracts" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/validator" ) @@ -17,7 +17,7 @@ type AdminServiceImpl struct { contracts.UnimplementedWorkflowServiceServer repov1 v1.Repository - mqv1 msgqueuev1.MessageQueue + mqv1 msgqueue.MessageQueue v validator.Validator } @@ -25,7 +25,7 @@ type AdminServiceOpt func(*AdminServiceOpts) type AdminServiceOpts struct { repov1 v1.Repository - mqv1 msgqueuev1.MessageQueue + mqv1 msgqueue.MessageQueue v validator.Validator } @@ -43,7 +43,7 @@ func WithRepositoryV1(r v1.Repository) AdminServiceOpt { } } -func WithMessageQueueV1(mq msgqueuev1.MessageQueue) AdminServiceOpt { +func WithMessageQueueV1(mq msgqueue.MessageQueue) AdminServiceOpt { return func(opts *AdminServiceOpts) { opts.mqv1 = mq } diff --git a/internal/services/admin/server.go b/internal/services/admin/server.go index 13db8c8dd..b0b22ab51 100644 --- a/internal/services/admin/server.go +++ b/internal/services/admin/server.go @@ -13,9 +13,9 @@ import ( "github.com/hatchet-dev/hatchet/internal/services/admin/contracts" "github.com/hatchet-dev/hatchet/pkg/client/types" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (a *AdminServiceImpl) TriggerWorkflow(ctx context.Context, req *contracts.TriggerWorkflowRequest) (*contracts.TriggerWorkflowResponse, error) { diff --git a/internal/services/admin/server_v1.go b/internal/services/admin/server_v1.go index 46afdc841..1d9114564 100644 --- a/internal/services/admin/server_v1.go +++ b/internal/services/admin/server_v1.go @@ -8,14 +8,14 @@ import ( "go.opentelemetry.io/otel/attribute" "github.com/hatchet-dev/hatchet/internal/datautils" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" "github.com/hatchet-dev/hatchet/internal/services/admin/contracts" tasktypes "github.com/hatchet-dev/hatchet/internal/services/shared/tasktypes/v1" "github.com/hatchet-dev/hatchet/pkg/constants" grpcmiddleware "github.com/hatchet-dev/hatchet/pkg/grpc/middleware" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" "google.golang.org/grpc/codes" diff --git a/internal/services/admin/v1/admin.go b/internal/services/admin/v1/admin.go index 3631ab94d..0feb61086 100644 --- a/internal/services/admin/v1/admin.go +++ b/internal/services/admin/v1/admin.go @@ -3,10 +3,10 @@ package v1 import ( "fmt" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" contracts "github.com/hatchet-dev/hatchet/internal/services/shared/proto/v1" "github.com/hatchet-dev/hatchet/pkg/analytics" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/validator" ) diff --git a/internal/services/admin/v1/server.go b/internal/services/admin/v1/server.go index 0edb2f43c..b1e81dad4 100644 --- a/internal/services/admin/v1/server.go +++ b/internal/services/admin/v1/server.go @@ -13,13 +13,13 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" contracts "github.com/hatchet-dev/hatchet/internal/services/shared/proto/v1" tasktypes "github.com/hatchet-dev/hatchet/internal/services/shared/tasktypes/v1" "github.com/hatchet-dev/hatchet/pkg/client/types" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (a *AdminServiceImpl) CancelTasks(ctx context.Context, req *contracts.CancelTasksRequest) (*contracts.CancelTasksResponse, error) { diff --git a/internal/services/controllers/metrics/collector.go b/internal/services/controllers/metrics/collector.go index 700df0734..ba395db8f 100644 --- a/internal/services/controllers/metrics/collector.go +++ b/internal/services/controllers/metrics/collector.go @@ -12,7 +12,7 @@ import ( "github.com/hatchet-dev/hatchet/pkg/config/server" hatcheterrors "github.com/hatchet-dev/hatchet/pkg/errors" "github.com/hatchet-dev/hatchet/pkg/logger" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/internal/services/controllers/v1/olap/analyze.go b/internal/services/controllers/olap/analyze.go similarity index 100% rename from internal/services/controllers/v1/olap/analyze.go rename to internal/services/controllers/olap/analyze.go diff --git a/internal/services/controllers/v1/olap/controller.go b/internal/services/controllers/olap/controller.go similarity index 99% rename from internal/services/controllers/v1/olap/controller.go rename to internal/services/controllers/olap/controller.go index ca35fb7ff..16b230d73 100644 --- a/internal/services/controllers/v1/olap/controller.go +++ b/internal/services/controllers/olap/controller.go @@ -17,7 +17,7 @@ import ( "github.com/hatchet-dev/hatchet/internal/datautils" "github.com/hatchet-dev/hatchet/internal/integrations/alerting" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" "github.com/hatchet-dev/hatchet/internal/queueutils" "github.com/hatchet-dev/hatchet/internal/services/partition" "github.com/hatchet-dev/hatchet/internal/services/shared/recoveryutils" @@ -25,9 +25,9 @@ import ( "github.com/hatchet-dev/hatchet/pkg/config/server" hatcheterrors "github.com/hatchet-dev/hatchet/pkg/errors" "github.com/hatchet-dev/hatchet/pkg/logger" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/internal/services/controllers/v1/olap/create_partitions.go b/internal/services/controllers/olap/create_partitions.go similarity index 100% rename from internal/services/controllers/v1/olap/create_partitions.go rename to internal/services/controllers/olap/create_partitions.go diff --git a/internal/services/controllers/v1/olap/process_alerts.go b/internal/services/controllers/olap/process_alerts.go similarity index 94% rename from internal/services/controllers/v1/olap/process_alerts.go rename to internal/services/controllers/olap/process_alerts.go index b3f091ac3..8bfceba7c 100644 --- a/internal/services/controllers/v1/olap/process_alerts.go +++ b/internal/services/controllers/olap/process_alerts.go @@ -5,9 +5,9 @@ import ( "fmt" "time" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/internal/services/controllers/v1/olap/process_dag_status_updates.go b/internal/services/controllers/olap/process_dag_status_updates.go similarity index 94% rename from internal/services/controllers/v1/olap/process_dag_status_updates.go rename to internal/services/controllers/olap/process_dag_status_updates.go index 767dae447..fd2cb59b4 100644 --- a/internal/services/controllers/v1/olap/process_dag_status_updates.go +++ b/internal/services/controllers/olap/process_dag_status_updates.go @@ -4,11 +4,11 @@ import ( "context" "time" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" tasktypes "github.com/hatchet-dev/hatchet/internal/services/shared/tasktypes/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/jackc/pgx/v5/pgtype" ) diff --git a/internal/services/controllers/v1/olap/process_task_status_updates.go b/internal/services/controllers/olap/process_task_status_updates.go similarity index 94% rename from internal/services/controllers/v1/olap/process_task_status_updates.go rename to internal/services/controllers/olap/process_task_status_updates.go index e5d5cd03c..af53cf288 100644 --- a/internal/services/controllers/v1/olap/process_task_status_updates.go +++ b/internal/services/controllers/olap/process_task_status_updates.go @@ -4,11 +4,11 @@ import ( "context" "time" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" tasktypes "github.com/hatchet-dev/hatchet/internal/services/shared/tasktypes/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/jackc/pgx/v5/pgtype" ) diff --git a/internal/services/controllers/v1/olap/prometheus_worker.go b/internal/services/controllers/olap/prometheus_worker.go similarity index 99% rename from internal/services/controllers/v1/olap/prometheus_worker.go rename to internal/services/controllers/olap/prometheus_worker.go index 49d5063cd..b4443765c 100644 --- a/internal/services/controllers/v1/olap/prometheus_worker.go +++ b/internal/services/controllers/olap/prometheus_worker.go @@ -8,7 +8,7 @@ import ( "github.com/hatchet-dev/hatchet/internal/services/shared/recoveryutils" "github.com/hatchet-dev/hatchet/pkg/integrations/metrics/prometheus" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type taskPrometheusUpdate struct { diff --git a/internal/services/controllers/retention/controller.go b/internal/services/controllers/retention/controller.go index ad7c21b0f..13e10939f 100644 --- a/internal/services/controllers/retention/controller.go +++ b/internal/services/controllers/retention/controller.go @@ -13,7 +13,7 @@ import ( "github.com/hatchet-dev/hatchet/internal/services/partition" hatcheterrors "github.com/hatchet-dev/hatchet/pkg/errors" "github.com/hatchet-dev/hatchet/pkg/logger" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" ) type RetentionController interface { diff --git a/internal/services/controllers/retention/shared.go b/internal/services/controllers/retention/shared.go index e8cf6148b..618e0eb42 100644 --- a/internal/services/controllers/retention/shared.go +++ b/internal/services/controllers/retention/shared.go @@ -7,7 +7,7 @@ import ( "golang.org/x/sync/errgroup" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func GetDataRetentionExpiredTime(duration string) (time.Time, error) { diff --git a/internal/services/controllers/v1/task/analyze.go b/internal/services/controllers/task/analyze.go similarity index 100% rename from internal/services/controllers/v1/task/analyze.go rename to internal/services/controllers/task/analyze.go diff --git a/internal/services/controllers/v1/task/cleanup.go b/internal/services/controllers/task/cleanup.go similarity index 100% rename from internal/services/controllers/v1/task/cleanup.go rename to internal/services/controllers/task/cleanup.go diff --git a/internal/services/controllers/v1/task/controller.go b/internal/services/controllers/task/controller.go similarity index 99% rename from internal/services/controllers/v1/task/controller.go rename to internal/services/controllers/task/controller.go index 983f36228..2439c70c8 100644 --- a/internal/services/controllers/v1/task/controller.go +++ b/internal/services/controllers/task/controller.go @@ -16,7 +16,7 @@ import ( "github.com/hatchet-dev/hatchet/internal/cel" "github.com/hatchet-dev/hatchet/internal/datautils" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" "github.com/hatchet-dev/hatchet/internal/operation" "github.com/hatchet-dev/hatchet/internal/queueutils" "github.com/hatchet-dev/hatchet/internal/services/partition" @@ -27,9 +27,9 @@ import ( hatcheterrors "github.com/hatchet-dev/hatchet/pkg/errors" "github.com/hatchet-dev/hatchet/pkg/integrations/metrics/prometheus" "github.com/hatchet-dev/hatchet/pkg/logger" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/internal/services/controllers/v1/task/create_partitions.go b/internal/services/controllers/task/create_partitions.go similarity index 100% rename from internal/services/controllers/v1/task/create_partitions.go rename to internal/services/controllers/task/create_partitions.go diff --git a/internal/services/controllers/v1/task/evict_idempotency_keys.go b/internal/services/controllers/task/evict_idempotency_keys.go similarity index 100% rename from internal/services/controllers/v1/task/evict_idempotency_keys.go rename to internal/services/controllers/task/evict_idempotency_keys.go diff --git a/internal/services/controllers/v1/task/process_payload_wal.go b/internal/services/controllers/task/process_payload_wal.go similarity index 100% rename from internal/services/controllers/v1/task/process_payload_wal.go rename to internal/services/controllers/task/process_payload_wal.go diff --git a/internal/services/controllers/v1/task/process_reassignments.go b/internal/services/controllers/task/process_reassignments.go similarity index 96% rename from internal/services/controllers/v1/task/process_reassignments.go rename to internal/services/controllers/task/process_reassignments.go index ee957d086..2b35cbd32 100644 --- a/internal/services/controllers/v1/task/process_reassignments.go +++ b/internal/services/controllers/task/process_reassignments.go @@ -5,11 +5,11 @@ import ( "fmt" "time" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" tasktypes "github.com/hatchet-dev/hatchet/internal/services/shared/tasktypes/v1" "github.com/hatchet-dev/hatchet/pkg/integrations/metrics/prometheus" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/internal/services/controllers/v1/task/process_retry_queue_items.go b/internal/services/controllers/task/process_retry_queue_items.go similarity index 93% rename from internal/services/controllers/v1/task/process_retry_queue_items.go rename to internal/services/controllers/task/process_retry_queue_items.go index 6e3589aba..ee47adf87 100644 --- a/internal/services/controllers/v1/task/process_retry_queue_items.go +++ b/internal/services/controllers/task/process_retry_queue_items.go @@ -7,9 +7,9 @@ import ( "github.com/hashicorp/go-multierror" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" tasktypes "github.com/hatchet-dev/hatchet/internal/services/shared/tasktypes/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/internal/services/controllers/v1/task/process_sleeps.go b/internal/services/controllers/task/process_sleeps.go similarity index 100% rename from internal/services/controllers/v1/task/process_sleeps.go rename to internal/services/controllers/task/process_sleeps.go diff --git a/internal/services/controllers/v1/task/process_timeouts.go b/internal/services/controllers/task/process_timeouts.go similarity index 94% rename from internal/services/controllers/v1/task/process_timeouts.go rename to internal/services/controllers/task/process_timeouts.go index d8346939f..08c371f30 100644 --- a/internal/services/controllers/v1/task/process_timeouts.go +++ b/internal/services/controllers/task/process_timeouts.go @@ -5,10 +5,10 @@ import ( "fmt" "time" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" tasktypes "github.com/hatchet-dev/hatchet/internal/services/shared/tasktypes/v1" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/internal/services/dispatcher/dispatcher.go b/internal/services/dispatcher/dispatcher.go index 3d599f0fa..6c72b7246 100644 --- a/internal/services/dispatcher/dispatcher.go +++ b/internal/services/dispatcher/dispatcher.go @@ -11,13 +11,13 @@ import ( "github.com/rs/zerolog" "github.com/hatchet-dev/hatchet/internal/datautils" - msgqueuev1 "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" "github.com/hatchet-dev/hatchet/internal/services/dispatcher/contracts" "github.com/hatchet-dev/hatchet/internal/services/shared/recoveryutils" "github.com/hatchet-dev/hatchet/pkg/logger" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/cache" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" "github.com/hatchet-dev/hatchet/pkg/validator" hatcheterrors "github.com/hatchet-dev/hatchet/pkg/errors" @@ -32,10 +32,10 @@ type DispatcherImpl struct { contracts.UnimplementedDispatcherServer s gocron.Scheduler - mqv1 msgqueuev1.MessageQueue - pubBuffer *msgqueuev1.MQPubBuffer - sharedNonBufferedReaderv1 *msgqueuev1.SharedTenantReader - sharedBufferedReaderv1 *msgqueuev1.SharedBufferedTenantReader + mqv1 msgqueue.MessageQueue + pubBuffer *msgqueue.MQPubBuffer + sharedNonBufferedReaderv1 *msgqueue.SharedTenantReader + sharedBufferedReaderv1 *msgqueue.SharedBufferedTenantReader l *zerolog.Logger dv datautils.DataDecoderValidator v validator.Validator @@ -113,7 +113,7 @@ func (w *workers) Delete(workerId string) { type DispatcherOpt func(*DispatcherOpts) type DispatcherOpts struct { - mqv1 msgqueuev1.MessageQueue + mqv1 msgqueue.MessageQueue l *zerolog.Logger dv datautils.DataDecoderValidator repov1 v1.Repository @@ -138,7 +138,7 @@ func defaultDispatcherOpts() *DispatcherOpts { } } -func WithMessageQueueV1(mqv1 msgqueuev1.MessageQueue) DispatcherOpt { +func WithMessageQueueV1(mqv1 msgqueue.MessageQueue) DispatcherOpt { return func(opts *DispatcherOpts) { opts.mqv1 = mqv1 } @@ -224,7 +224,7 @@ func New(fs ...DispatcherOpt) (*DispatcherImpl, error) { a := hatcheterrors.NewWrapped(opts.alerter) a.WithData(map[string]interface{}{"service": "dispatcher"}) - pubBuffer := msgqueuev1.NewMQPubBuffer(opts.mqv1) + pubBuffer := msgqueue.NewMQPubBuffer(opts.mqv1) return &DispatcherImpl{ mqv1: opts.mqv1, @@ -245,8 +245,8 @@ func New(fs ...DispatcherOpt) (*DispatcherImpl, error) { func (d *DispatcherImpl) Start() (func() error, error) { ctx, cancel := context.WithCancel(context.Background()) - d.sharedNonBufferedReaderv1 = msgqueuev1.NewSharedTenantReader(d.mqv1) - d.sharedBufferedReaderv1 = msgqueuev1.NewSharedBufferedTenantReader(d.mqv1) + d.sharedNonBufferedReaderv1 = msgqueue.NewSharedTenantReader(d.mqv1) + d.sharedBufferedReaderv1 = msgqueue.NewSharedBufferedTenantReader(d.mqv1) // register the dispatcher by creating a new dispatcher in the database dispatcher, err := d.repov1.Dispatcher().CreateNewDispatcher(ctx, &v1.CreateDispatcherOpts{ @@ -277,7 +277,7 @@ func (d *DispatcherImpl) Start() (func() error, error) { // subscribe to a task queue with the dispatcher id dispatcherId := sqlchelpers.UUIDToStr(dispatcher.ID) - fv1 := func(task *msgqueuev1.Message) error { + fv1 := func(task *msgqueue.Message) error { wg.Add(1) defer wg.Done() @@ -291,7 +291,7 @@ func (d *DispatcherImpl) Start() (func() error, error) { } // subscribe to a task queue with the dispatcher id - cleanupQueueV1, err := d.mqv1.Subscribe(msgqueuev1.QueueTypeFromDispatcherID(dispatcherId), fv1, msgqueuev1.NoOpHook) + cleanupQueueV1, err := d.mqv1.Subscribe(msgqueue.QueueTypeFromDispatcherID(dispatcherId), fv1, msgqueue.NoOpHook) if err != nil { cancel() @@ -346,7 +346,7 @@ func (d *DispatcherImpl) Start() (func() error, error) { return cleanup, nil } -func (d *DispatcherImpl) handleV1Task(ctx context.Context, task *msgqueuev1.Message) (err error) { +func (d *DispatcherImpl) handleV1Task(ctx context.Context, task *msgqueue.Message) (err error) { defer func() { if r := recover(); r != nil { recoverErr := recoveryutils.RecoverWithAlert(d.l, d.a, r) diff --git a/internal/services/dispatcher/dispatcher_v1.go b/internal/services/dispatcher/dispatcher_v1.go index 92c70b981..c8be4d891 100644 --- a/internal/services/dispatcher/dispatcher_v1.go +++ b/internal/services/dispatcher/dispatcher_v1.go @@ -11,16 +11,16 @@ import ( "github.com/hashicorp/go-multierror" "golang.org/x/sync/errgroup" - msgqueuev1 "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" "github.com/hatchet-dev/hatchet/internal/queueutils" tasktypesv1 "github.com/hatchet-dev/hatchet/internal/services/shared/tasktypes/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) -func (d *DispatcherImpl) handleTaskBulkAssignedTask(ctx context.Context, msg *msgqueuev1.Message) error { +func (d *DispatcherImpl) handleTaskBulkAssignedTask(ctx context.Context, msg *msgqueue.Message) error { ctx, span := telemetry.NewSpanWithCarrier(ctx, "task-assigned-bulk", msg.OtelCarrier) defer span.End() @@ -28,7 +28,7 @@ func (d *DispatcherImpl) handleTaskBulkAssignedTask(ctx context.Context, msg *ms // on the worker ctx, cancel := context.WithTimeout(ctx, 25*time.Second) - msgs := msgqueuev1.JSONConvert[tasktypesv1.TaskAssignedBulkTaskPayload](msg.Payloads) + msgs := msgqueue.JSONConvert[tasktypesv1.TaskAssignedBulkTaskPayload](msg.Payloads) outerEg := errgroup.Group{} toRetry := []*sqlcv1.V1Task{} @@ -232,7 +232,7 @@ func (d *DispatcherImpl) handleTaskBulkAssignedTask(ctx context.Context, msg *ms d.l.Error().Err(err).Int64("task_id", task.ID).Msg("could not create monitoring event") } else { defer func() { - if err := d.pubBuffer.Pub(ctx, msgqueuev1.OLAP_QUEUE, msg, false); err != nil { + if err := d.pubBuffer.Pub(ctx, msgqueue.OLAP_QUEUE, msg, false); err != nil { d.l.Error().Err(err).Msg("could not publish monitoring event") } }() @@ -288,7 +288,7 @@ func (d *DispatcherImpl) handleTaskBulkAssignedTask(ctx context.Context, msg *ms queueutils.SleepWithExponentialBackoff(100*time.Millisecond, 5*time.Second, int(task.InternalRetryCount)) - err = d.mqv1.SendMessage(retryCtx, msgqueuev1.TASK_PROCESSING_QUEUE, msg) + err = d.mqv1.SendMessage(retryCtx, msgqueue.TASK_PROCESSING_QUEUE, msg) if err != nil { return fmt.Errorf("could not send failed task message: %w", err) @@ -311,7 +311,7 @@ func (d *DispatcherImpl) handleTaskBulkAssignedTask(ctx context.Context, msg *ms return nil } -func (d *DispatcherImpl) handleTaskCancelled(ctx context.Context, msg *msgqueuev1.Message) error { +func (d *DispatcherImpl) handleTaskCancelled(ctx context.Context, msg *msgqueue.Message) error { ctx, span := telemetry.NewSpanWithCarrier(ctx, "tasks-cancelled", msg.OtelCarrier) defer span.End() @@ -320,7 +320,7 @@ func (d *DispatcherImpl) handleTaskCancelled(ctx context.Context, msg *msgqueuev ctx, cancel := context.WithTimeout(ctx, 25*time.Second) defer cancel() - msgs := msgqueuev1.JSONConvert[tasktypesv1.SignalTaskCancelledPayload](msg.Payloads) + msgs := msgqueue.JSONConvert[tasktypesv1.SignalTaskCancelledPayload](msg.Payloads) taskIdsToRetryCounts := make(map[int64][]int32) diff --git a/internal/services/dispatcher/server.go b/internal/services/dispatcher/server.go index 8e3bd0bbc..5f07a719d 100644 --- a/internal/services/dispatcher/server.go +++ b/internal/services/dispatcher/server.go @@ -17,9 +17,9 @@ import ( "google.golang.org/grpc/status" "github.com/hatchet-dev/hatchet/internal/services/dispatcher/contracts" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/internal/services/dispatcher/server_v1.go b/internal/services/dispatcher/server_v1.go index eb2aa595f..4374a10a6 100644 --- a/internal/services/dispatcher/server_v1.go +++ b/internal/services/dispatcher/server_v1.go @@ -18,12 +18,12 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" "github.com/hatchet-dev/hatchet/internal/services/dispatcher/contracts" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" tasktypes "github.com/hatchet-dev/hatchet/internal/services/shared/tasktypes/v1" ) diff --git a/internal/services/dispatcher/subscribed_worker.go b/internal/services/dispatcher/subscribed_worker.go index c0c3e1ac6..137b9979a 100644 --- a/internal/services/dispatcher/subscribed_worker.go +++ b/internal/services/dispatcher/subscribed_worker.go @@ -3,7 +3,7 @@ package dispatcher import ( "sync" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" "github.com/hatchet-dev/hatchet/internal/services/dispatcher/contracts" ) diff --git a/internal/services/dispatcher/subscribed_worker_v1.go b/internal/services/dispatcher/subscribed_worker_v1.go index 5e5ebf227..48626cd88 100644 --- a/internal/services/dispatcher/subscribed_worker_v1.go +++ b/internal/services/dispatcher/subscribed_worker_v1.go @@ -9,12 +9,12 @@ import ( "go.opentelemetry.io/otel/codes" "google.golang.org/grpc" - msgqueuev1 "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" "github.com/hatchet-dev/hatchet/internal/services/dispatcher/contracts" tasktypesv1 "github.com/hatchet-dev/hatchet/internal/services/shared/tasktypes/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) @@ -211,7 +211,7 @@ func (worker *subscribedWorker) CancelTask( return fmt.Errorf("could not create monitoring event for task %d: %w", task.ID, err) } - err = worker.pubBuffer.Pub(ctx, msgqueuev1.OLAP_QUEUE, msg, false) + err = worker.pubBuffer.Pub(ctx, msgqueue.OLAP_QUEUE, msg, false) if err != nil { return fmt.Errorf("could not publish monitoring event for task %d: %w", task.ID, err) } diff --git a/internal/services/dispatcher/v1/dispatcher.go b/internal/services/dispatcher/v1/dispatcher.go index 339b22119..0aa23d83e 100644 --- a/internal/services/dispatcher/v1/dispatcher.go +++ b/internal/services/dispatcher/v1/dispatcher.go @@ -5,10 +5,10 @@ import ( "github.com/rs/zerolog" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" contracts "github.com/hatchet-dev/hatchet/internal/services/shared/proto/v1" "github.com/hatchet-dev/hatchet/pkg/logger" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/validator" ) diff --git a/internal/services/dispatcher/v1/server.go b/internal/services/dispatcher/v1/server.go index 1d9747006..5f7df2869 100644 --- a/internal/services/dispatcher/v1/server.go +++ b/internal/services/dispatcher/v1/server.go @@ -15,9 +15,9 @@ import ( "google.golang.org/grpc/status" contracts "github.com/hatchet-dev/hatchet/internal/services/shared/proto/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (d *DispatcherServiceImpl) RegisterDurableEvent(ctx context.Context, req *contracts.RegisterDurableEventRequest) (*contracts.RegisterDurableEventResponse, error) { diff --git a/internal/services/health/health.go b/internal/services/health/health.go index f5b640cd7..7bbc6b553 100644 --- a/internal/services/health/health.go +++ b/internal/services/health/health.go @@ -11,8 +11,8 @@ import ( "github.com/rs/zerolog" - msgqueuev1 "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" ) type Health struct { @@ -20,11 +20,11 @@ type Health struct { version string repository v1.HealthRepository - queue msgqueuev1.MessageQueue + queue msgqueue.MessageQueue l *zerolog.Logger } -func New(repo v1.HealthRepository, queue msgqueuev1.MessageQueue, version string, l *zerolog.Logger) *Health { +func New(repo v1.HealthRepository, queue msgqueue.MessageQueue, version string, l *zerolog.Logger) *Health { return &Health{ version: version, repository: repo, diff --git a/internal/services/ingestor/ingestor.go b/internal/services/ingestor/ingestor.go index bde6bfb09..6e81a6a1d 100644 --- a/internal/services/ingestor/ingestor.go +++ b/internal/services/ingestor/ingestor.go @@ -6,10 +6,10 @@ import ( lru "github.com/hashicorp/golang-lru/v2" - msgqueuev1 "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" "github.com/hatchet-dev/hatchet/internal/services/ingestor/contracts" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/validator" ) @@ -25,12 +25,12 @@ type Ingestor interface { type IngestorOptFunc func(*IngestorOpts) type IngestorOpts struct { - mqv1 msgqueuev1.MessageQueue + mqv1 msgqueue.MessageQueue repov1 v1.Repository isLogIngestionEnabled bool } -func WithMessageQueueV1(mq msgqueuev1.MessageQueue) IngestorOptFunc { +func WithMessageQueueV1(mq msgqueue.MessageQueue) IngestorOptFunc { return func(opts *IngestorOpts) { opts.mqv1 = mq } @@ -59,7 +59,7 @@ type IngestorImpl struct { steprunTenantLookupCache *lru.Cache[string, string] - mqv1 msgqueuev1.MessageQueue + mqv1 msgqueue.MessageQueue v validator.Validator repov1 v1.Repository diff --git a/internal/services/ingestor/ingestor_v1.go b/internal/services/ingestor/ingestor_v1.go index b1c5d8abb..399401b2a 100644 --- a/internal/services/ingestor/ingestor_v1.go +++ b/internal/services/ingestor/ingestor_v1.go @@ -9,11 +9,11 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" tasktypes "github.com/hatchet-dev/hatchet/internal/services/shared/tasktypes/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/internal/services/ingestor/server.go b/internal/services/ingestor/server.go index 60b76a7f3..51dee9b93 100644 --- a/internal/services/ingestor/server.go +++ b/internal/services/ingestor/server.go @@ -11,9 +11,9 @@ import ( "github.com/hatchet-dev/hatchet/internal/services/ingestor/contracts" "github.com/hatchet-dev/hatchet/pkg/constants" grpcmiddleware "github.com/hatchet-dev/hatchet/pkg/grpc/middleware" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (i *IngestorImpl) Push(ctx context.Context, req *contracts.PushEventRequest) (*contracts.Event, error) { diff --git a/internal/services/ingestor/server_v1.go b/internal/services/ingestor/server_v1.go index f56dce687..c84c214c9 100644 --- a/internal/services/ingestor/server_v1.go +++ b/internal/services/ingestor/server_v1.go @@ -5,12 +5,12 @@ import ( "encoding/json" "time" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" "github.com/hatchet-dev/hatchet/internal/services/ingestor/contracts" tasktypes "github.com/hatchet-dev/hatchet/internal/services/shared/tasktypes/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/internal/services/partition/partition.go b/internal/services/partition/partition.go index 7055e9499..407422ea2 100644 --- a/internal/services/partition/partition.go +++ b/internal/services/partition/partition.go @@ -9,8 +9,8 @@ import ( "github.com/go-co-op/gocron/v2" "github.com/rs/zerolog" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/internal/services/scheduler/v1/scheduler.go b/internal/services/scheduler/v1/scheduler.go index c8f7cb03d..dab0fa8d6 100644 --- a/internal/services/scheduler/v1/scheduler.go +++ b/internal/services/scheduler/v1/scheduler.go @@ -12,16 +12,16 @@ import ( "github.com/rs/zerolog" "github.com/hatchet-dev/hatchet/internal/datautils" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" "github.com/hatchet-dev/hatchet/internal/services/partition" "github.com/hatchet-dev/hatchet/internal/services/shared/recoveryutils" tasktypes "github.com/hatchet-dev/hatchet/internal/services/shared/tasktypes/v1" "github.com/hatchet-dev/hatchet/pkg/config/shared" hatcheterrors "github.com/hatchet-dev/hatchet/pkg/errors" "github.com/hatchet-dev/hatchet/pkg/logger" + repov1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - repov1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" v1 "github.com/hatchet-dev/hatchet/pkg/scheduling/v1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/internal/services/shared/tasktypes/v1/event.go b/internal/services/shared/tasktypes/v1/event.go index 7b3fc62e8..68cdd21dc 100644 --- a/internal/services/shared/tasktypes/v1/event.go +++ b/internal/services/shared/tasktypes/v1/event.go @@ -3,8 +3,8 @@ package v1 import ( "time" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" ) type UserEventTaskPayload struct { diff --git a/internal/services/shared/tasktypes/v1/olap.go b/internal/services/shared/tasktypes/v1/olap.go index b7068489d..75ae7451c 100644 --- a/internal/services/shared/tasktypes/v1/olap.go +++ b/internal/services/shared/tasktypes/v1/olap.go @@ -6,10 +6,10 @@ import ( "github.com/google/uuid" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" "github.com/hatchet-dev/hatchet/internal/services/dispatcher/contracts" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type CELEvaluationFailures struct { diff --git a/internal/services/shared/tasktypes/v1/scheduler.go b/internal/services/shared/tasktypes/v1/scheduler.go index 25184b3ab..a86fc4068 100644 --- a/internal/services/shared/tasktypes/v1/scheduler.go +++ b/internal/services/shared/tasktypes/v1/scheduler.go @@ -1,9 +1,9 @@ package v1 import ( - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type CheckTenantQueuesPayload struct { diff --git a/internal/services/shared/tasktypes/v1/task.go b/internal/services/shared/tasktypes/v1/task.go index c1b431aed..b9be17387 100644 --- a/internal/services/shared/tasktypes/v1/task.go +++ b/internal/services/shared/tasktypes/v1/task.go @@ -3,9 +3,9 @@ package v1 import ( "github.com/jackc/pgx/v5/pgtype" - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func TriggerTaskMessage(tenantId string, payloads ...*v1.WorkflowNameTriggerOpts) (*msgqueue.Message, error) { diff --git a/internal/services/ticker/cron.go b/internal/services/ticker/cron.go index 7d664765f..25dcd14cf 100644 --- a/internal/services/ticker/cron.go +++ b/internal/services/ticker/cron.go @@ -11,7 +11,7 @@ import ( "github.com/google/uuid" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) // runPollCronSchedules acquires a list of cron schedules from the database and schedules any which are not diff --git a/internal/services/ticker/cron_v1.go b/internal/services/ticker/cron_v1.go index 0d78e970c..1979ccbc1 100644 --- a/internal/services/ticker/cron_v1.go +++ b/internal/services/ticker/cron_v1.go @@ -8,11 +8,11 @@ import ( "github.com/google/uuid" - msgqueuev1 "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" tasktypes "github.com/hatchet-dev/hatchet/internal/services/shared/tasktypes/v1" "github.com/hatchet-dev/hatchet/pkg/constants" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TickerImpl) runCronWorkflowV1(ctx context.Context, tenantId string, workflowVersion *sqlcv1.GetWorkflowVersionForEngineRow, cron, cronParentId string, cronName *string, input []byte, additionalMetadata map[string]interface{}, priority *int32) error { @@ -57,7 +57,7 @@ func (t *TickerImpl) runCronWorkflowV1(ctx context.Context, tenantId string, wor return fmt.Errorf("could not create trigger task message: %w", err) } - err = t.mqv1.SendMessage(ctx, msgqueuev1.TASK_PROCESSING_QUEUE, msg) + err = t.mqv1.SendMessage(ctx, msgqueue.TASK_PROCESSING_QUEUE, msg) if err != nil { return fmt.Errorf("could not send message to task queue: %w", err) diff --git a/internal/services/ticker/schedule_workflow.go b/internal/services/ticker/schedule_workflow.go index f9acf220d..f4f216d16 100644 --- a/internal/services/ticker/schedule_workflow.go +++ b/internal/services/ticker/schedule_workflow.go @@ -6,7 +6,7 @@ import ( "time" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TickerImpl) runPollSchedules(ctx context.Context) func() { diff --git a/internal/services/ticker/schedule_workflow_v1.go b/internal/services/ticker/schedule_workflow_v1.go index 7386beaae..3c6e18c7a 100644 --- a/internal/services/ticker/schedule_workflow_v1.go +++ b/internal/services/ticker/schedule_workflow_v1.go @@ -10,11 +10,11 @@ import ( "github.com/jackc/pgerrcode" "github.com/jackc/pgx/v5/pgconn" - msgqueuev1 "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" tasktypes "github.com/hatchet-dev/hatchet/internal/services/shared/tasktypes/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func (t *TickerImpl) runScheduledWorkflowV1(ctx context.Context, tenantId string, workflowVersion *sqlcv1.GetWorkflowVersionForEngineRow, scheduledWorkflowId string, scheduled *sqlcv1.PollScheduledWorkflowsRow) error { @@ -55,7 +55,7 @@ func (t *TickerImpl) runScheduledWorkflowV1(ctx context.Context, tenantId string return fmt.Errorf("could not create trigger task message: %w", err) } - err = t.mqv1.SendMessage(ctx, msgqueuev1.TASK_PROCESSING_QUEUE, msg) + err = t.mqv1.SendMessage(ctx, msgqueue.TASK_PROCESSING_QUEUE, msg) if err != nil { return fmt.Errorf("could not send message to task queue: %w", err) diff --git a/internal/services/ticker/ticker.go b/internal/services/ticker/ticker.go index 3f15396d2..4b5324f2c 100644 --- a/internal/services/ticker/ticker.go +++ b/internal/services/ticker/ticker.go @@ -12,9 +12,9 @@ import ( "github.com/hatchet-dev/hatchet/internal/datautils" "github.com/hatchet-dev/hatchet/internal/integrations/alerting" - msgqueuev1 "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" "github.com/hatchet-dev/hatchet/pkg/logger" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" ) type Ticker interface { @@ -22,7 +22,7 @@ type Ticker interface { } type TickerImpl struct { - mqv1 msgqueuev1.MessageQueue + mqv1 msgqueue.MessageQueue l *zerolog.Logger repov1 v1.Repository @@ -46,7 +46,7 @@ type TickerImpl struct { type TickerOpt func(*TickerOpts) type TickerOpts struct { - mqv1 msgqueuev1.MessageQueue + mqv1 msgqueue.MessageQueue l *zerolog.Logger repov1 v1.Repository @@ -65,7 +65,7 @@ func defaultTickerOpts() *TickerOpts { } } -func WithMessageQueueV1(mq msgqueuev1.MessageQueue) TickerOpt { +func WithMessageQueueV1(mq msgqueue.MessageQueue) TickerOpt { return func(opts *TickerOpts) { opts.mqv1 = mq } diff --git a/internal/testutils/env.go b/internal/testutils/env.go index 5fd5ba01c..f364108a9 100644 --- a/internal/testutils/env.go +++ b/internal/testutils/env.go @@ -11,7 +11,7 @@ import ( "github.com/hatchet-dev/hatchet/pkg/config/loader" "github.com/hatchet-dev/hatchet/pkg/config/server" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/jackc/pgx/v5" ) diff --git a/internal/whrequest/request.go b/internal/whrequest/request.go deleted file mode 100644 index 55d555fb0..000000000 --- a/internal/whrequest/request.go +++ /dev/null @@ -1,63 +0,0 @@ -package whrequest - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "io" - "net/http" - "time" - - "github.com/hatchet-dev/hatchet/internal/signature" -) - -func Send(ctx context.Context, url string, secret string, data any, headers ...func(req *http.Request)) ([]byte, *int, error) { - body, err := json.Marshal(data) - if err != nil { - return nil, nil, err - } - - req, err := http.NewRequestWithContext(ctx, "POST", url, bytes.NewReader(body)) - if err != nil { - return nil, nil, err - } - - sig, err := signature.Sign(string(body), secret) - if err != nil { - return nil, nil, err - } - req.Header.Set("X-Hatchet-Signature", sig) - req.Header.Set("Content-Type", "application/json") - - for _, h := range headers { - h(req) - } - - httpClient := &http.Client{ - // use 10 minutes timeout - Timeout: time.Second * 600, - } - - // TODO block-list - - // nolint:gosec - resp, err := httpClient.Do(req) - if err != nil { - connRefused := 502 - return nil, &connRefused, err - } - - defer resp.Body.Close() - - if resp.StatusCode != http.StatusOK { - return nil, &resp.StatusCode, fmt.Errorf("request failed with status code %d", resp.StatusCode) - } - - res, err := io.ReadAll(resp.Body) - if err != nil { - return nil, &resp.StatusCode, fmt.Errorf("could not read response body: %w", err) - } - - return res, &resp.StatusCode, nil -} diff --git a/pkg/auth/cookie/sessionstore.go b/pkg/auth/cookie/sessionstore.go index ac7a0c842..f55c5c630 100644 --- a/pkg/auth/cookie/sessionstore.go +++ b/pkg/auth/cookie/sessionstore.go @@ -14,7 +14,7 @@ import ( "github.com/gorilla/sessions" "github.com/jackc/pgx/v5" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" ) const UserSessionKey string = "user_id" diff --git a/pkg/auth/token/token.go b/pkg/auth/token/token.go index aea9dea6a..3c973e72c 100644 --- a/pkg/auth/token/token.go +++ b/pkg/auth/token/token.go @@ -9,8 +9,8 @@ import ( "github.com/tink-crypto/tink-go/jwt" "github.com/hatchet-dev/hatchet/pkg/encryption" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - repository "github.com/hatchet-dev/hatchet/pkg/repository/v1" ) type JWTManager interface { @@ -28,11 +28,11 @@ type TokenOpts struct { type jwtManagerImpl struct { encryption encryption.EncryptionService opts *TokenOpts - tokenRepo repository.APITokenRepository + tokenRepo v1.APITokenRepository verifier jwt.Verifier } -func NewJWTManager(encryptionSvc encryption.EncryptionService, tokenRepo repository.APITokenRepository, opts *TokenOpts) (JWTManager, error) { +func NewJWTManager(encryptionSvc encryption.EncryptionService, tokenRepo v1.APITokenRepository, opts *TokenOpts) (JWTManager, error) { verifier, err := jwt.NewVerifier(encryptionSvc.GetPublicJWTHandle()) if err != nil { @@ -89,7 +89,7 @@ func (j *jwtManagerImpl) GenerateTenantToken(ctx context.Context, tenantId, name } // write the token to the database - _, err = j.tokenRepo.CreateAPIToken(ctx, &repository.CreateAPITokenOpts{ + _, err = j.tokenRepo.CreateAPIToken(ctx, &v1.CreateAPITokenOpts{ ID: token.TokenId, ExpiresAt: token.ExpiresAt, TenantId: &tenantId, diff --git a/pkg/auth/token/token_test.go b/pkg/auth/token/token_test.go index f79391e77..303917575 100644 --- a/pkg/auth/token/token_test.go +++ b/pkg/auth/token/token_test.go @@ -16,8 +16,8 @@ import ( "github.com/hatchet-dev/hatchet/pkg/config/database" "github.com/hatchet-dev/hatchet/pkg/encryption" "github.com/hatchet-dev/hatchet/pkg/random" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" ) func TestCreateTenantToken(t *testing.T) { // make sure no cache is used for tests diff --git a/pkg/config/database/config.go b/pkg/config/database/config.go index ad8354d0c..c20a3bf9a 100644 --- a/pkg/config/database/config.go +++ b/pkg/config/database/config.go @@ -7,7 +7,7 @@ import ( "github.com/spf13/viper" "github.com/hatchet-dev/hatchet/pkg/config/shared" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" ) type ConfigFile struct { diff --git a/pkg/config/loader/loader.go b/pkg/config/loader/loader.go index 4b0a7ea57..2a2dd808f 100644 --- a/pkg/config/loader/loader.go +++ b/pkg/config/loader/loader.go @@ -44,11 +44,11 @@ import ( "github.com/hatchet-dev/hatchet/pkg/security" "github.com/hatchet-dev/hatchet/pkg/validator" - msgqueuev1 "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" - pgmqv1 "github.com/hatchet-dev/hatchet/internal/msgqueue/v1/postgres" - rabbitmqv1 "github.com/hatchet-dev/hatchet/internal/msgqueue/v1/rabbitmq" + "github.com/hatchet-dev/hatchet/internal/msgqueue" + pgmq "github.com/hatchet-dev/hatchet/internal/msgqueue/postgres" + "github.com/hatchet-dev/hatchet/internal/msgqueue/rabbitmq" clientv1 "github.com/hatchet-dev/hatchet/pkg/client/v1" - repov1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + repov1 "github.com/hatchet-dev/hatchet/pkg/repository" ) // LoadDatabaseConfigFile loads the database config file via viper @@ -366,7 +366,7 @@ func createControllerLayer(dc *database.Layer, cf *server.ServerConfigFile, vers return nil, nil, fmt.Errorf("could not create session store: %w", err) } - var mqv1 msgqueuev1.MessageQueue + var mqv1 msgqueue.MessageQueue cleanup1 := func() error { return nil } @@ -378,10 +378,10 @@ func createControllerLayer(dc *database.Layer, cf *server.ServerConfigFile, vers case "postgres": var cleanupv1 func() error - cleanupv1, mqv1, err = pgmqv1.NewPostgresMQ( + cleanupv1, mqv1, err = pgmq.NewPostgresMQ( dc.V1.MessageQueue(), - pgmqv1.WithLogger(&l), - pgmqv1.WithQos(cf.MessageQueue.Postgres.Qos), + pgmq.WithLogger(&l), + pgmq.WithQos(cf.MessageQueue.Postgres.Qos), ) if err != nil { @@ -398,18 +398,18 @@ func createControllerLayer(dc *database.Layer, cf *server.ServerConfigFile, vers var cleanupv1 func() error - cleanupv1, mqv1, err = rabbitmqv1.New( - rabbitmqv1.WithURL(cf.MessageQueue.RabbitMQ.URL), - rabbitmqv1.WithLogger(&l), - rabbitmqv1.WithQos(cf.MessageQueue.RabbitMQ.Qos), - rabbitmqv1.WithDisableTenantExchangePubs(cf.Runtime.DisableTenantPubs), - rabbitmqv1.WithMaxPubChannels(cf.MessageQueue.RabbitMQ.MaxPubChans), - rabbitmqv1.WithMaxSubChannels(cf.MessageQueue.RabbitMQ.MaxSubChans), - rabbitmqv1.WithGzipCompression( + cleanupv1, mqv1, err = rabbitmq.New( + rabbitmq.WithURL(cf.MessageQueue.RabbitMQ.URL), + rabbitmq.WithLogger(&l), + rabbitmq.WithQos(cf.MessageQueue.RabbitMQ.Qos), + rabbitmq.WithDisableTenantExchangePubs(cf.Runtime.DisableTenantPubs), + rabbitmq.WithMaxPubChannels(cf.MessageQueue.RabbitMQ.MaxPubChans), + rabbitmq.WithMaxSubChannels(cf.MessageQueue.RabbitMQ.MaxSubChans), + rabbitmq.WithGzipCompression( cf.MessageQueue.RabbitMQ.CompressionEnabled, cf.MessageQueue.RabbitMQ.CompressionThreshold, ), - rabbitmqv1.WithMessageRejection(cf.MessageQueue.RabbitMQ.EnableMessageRejection, cf.MessageQueue.RabbitMQ.MaxDeathCount), + rabbitmq.WithMessageRejection(cf.MessageQueue.RabbitMQ.EnableMessageRejection, cf.MessageQueue.RabbitMQ.MaxDeathCount), ) if err != nil { diff --git a/pkg/config/server/server.go b/pkg/config/server/server.go index 6e48a0589..2eb3bec4f 100644 --- a/pkg/config/server/server.go +++ b/pkg/config/server/server.go @@ -12,7 +12,7 @@ import ( "github.com/hatchet-dev/hatchet/api/v1/server/middleware" "github.com/hatchet-dev/hatchet/internal/integrations/alerting" - msgqueuev1 "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" + "github.com/hatchet-dev/hatchet/internal/msgqueue" "github.com/hatchet-dev/hatchet/internal/services/ingestor" "github.com/hatchet-dev/hatchet/pkg/analytics" "github.com/hatchet-dev/hatchet/pkg/auth/cookie" @@ -555,7 +555,7 @@ type ServerConfig struct { Namespaces []string - MessageQueueV1 msgqueuev1.MessageQueue + MessageQueueV1 msgqueue.MessageQueue Logger *zerolog.Logger diff --git a/pkg/repository/v1/api_token.go b/pkg/repository/api_token.go similarity index 97% rename from pkg/repository/v1/api_token.go rename to pkg/repository/api_token.go index 94f9dd760..bc3f692aa 100644 --- a/pkg/repository/v1/api_token.go +++ b/pkg/repository/api_token.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -6,7 +6,7 @@ import ( "github.com/hatchet-dev/hatchet/pkg/repository/cache" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type CreateAPITokenOpts struct { diff --git a/pkg/repository/v1/callbacks.go b/pkg/repository/callbacks.go similarity index 99% rename from pkg/repository/v1/callbacks.go rename to pkg/repository/callbacks.go index 5730f87b7..df48f8f3f 100644 --- a/pkg/repository/v1/callbacks.go +++ b/pkg/repository/callbacks.go @@ -1,4 +1,4 @@ -package v1 +package repository import "github.com/rs/zerolog" diff --git a/pkg/repository/v1/dispatcher.go b/pkg/repository/dispatcher.go similarity index 97% rename from pkg/repository/v1/dispatcher.go rename to pkg/repository/dispatcher.go index 5ccbf4f59..9d7b2bc18 100644 --- a/pkg/repository/v1/dispatcher.go +++ b/pkg/repository/dispatcher.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -7,7 +7,7 @@ import ( "github.com/jackc/pgx/v5/pgtype" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type CreateDispatcherOpts struct { diff --git a/pkg/repository/v1/filters.go b/pkg/repository/filters.go similarity index 98% rename from pkg/repository/v1/filters.go rename to pkg/repository/filters.go index 3fcbdd127..506f67cdc 100644 --- a/pkg/repository/v1/filters.go +++ b/pkg/repository/filters.go @@ -1,10 +1,10 @@ -package v1 +package repository import ( "context" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/jackc/pgx/v5/pgtype" ) diff --git a/pkg/repository/v1/health.go b/pkg/repository/health.go similarity index 97% rename from pkg/repository/v1/health.go rename to pkg/repository/health.go index ede84859b..035808fa4 100644 --- a/pkg/repository/v1/health.go +++ b/pkg/repository/health.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" diff --git a/pkg/repository/v1/idempotency.go b/pkg/repository/idempotency.go similarity index 96% rename from pkg/repository/v1/idempotency.go rename to pkg/repository/idempotency.go index ff4ee2e45..29f0d5bd9 100644 --- a/pkg/repository/v1/idempotency.go +++ b/pkg/repository/idempotency.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -7,7 +7,7 @@ import ( "github.com/jackc/pgx/v5/pgxpool" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type WasSuccessfullyClaimed bool diff --git a/pkg/repository/v1/ids.go b/pkg/repository/ids.go similarity index 98% rename from pkg/repository/v1/ids.go rename to pkg/repository/ids.go index a991f047a..95ddd292a 100644 --- a/pkg/repository/v1/ids.go +++ b/pkg/repository/ids.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -9,7 +9,7 @@ import ( "github.com/jackc/pgx/v5/pgtype" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func getChildSignalEventKey(parentExternalId string, stepIndex, childIndex int64, childKeyArg *string) string { diff --git a/pkg/repository/v1/input.go b/pkg/repository/input.go similarity index 99% rename from pkg/repository/v1/input.go rename to pkg/repository/input.go index c1ec72d37..14d25570f 100644 --- a/pkg/repository/v1/input.go +++ b/pkg/repository/input.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "encoding/json" diff --git a/pkg/repository/v1/interval_settings.go b/pkg/repository/interval_settings.go similarity index 97% rename from pkg/repository/v1/interval_settings.go rename to pkg/repository/interval_settings.go index 53abaeef8..9cc573e2c 100644 --- a/pkg/repository/v1/interval_settings.go +++ b/pkg/repository/interval_settings.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -8,7 +8,7 @@ import ( "github.com/jackc/pgx/v5" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type IntervalSettingsRepository interface { diff --git a/pkg/repository/v1/jsonb.go b/pkg/repository/jsonb.go similarity index 94% rename from pkg/repository/v1/jsonb.go rename to pkg/repository/jsonb.go index d8c1711dd..adfdc2e74 100644 --- a/pkg/repository/v1/jsonb.go +++ b/pkg/repository/jsonb.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "fmt" diff --git a/pkg/repository/v1/log_line.go b/pkg/repository/log_line.go similarity index 97% rename from pkg/repository/v1/log_line.go rename to pkg/repository/log_line.go index c783cd722..1024b22b7 100644 --- a/pkg/repository/v1/log_line.go +++ b/pkg/repository/log_line.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -7,7 +7,7 @@ import ( "github.com/jackc/pgx/v5/pgtype" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type ListLogsOpts struct { diff --git a/pkg/repository/v1/match.go b/pkg/repository/match.go similarity index 99% rename from pkg/repository/v1/match.go rename to pkg/repository/match.go index 7c65011d2..8b7fc145e 100644 --- a/pkg/repository/v1/match.go +++ b/pkg/repository/match.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -13,7 +13,7 @@ import ( "github.com/google/uuid" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/pkg/repository/v1/match_data.go b/pkg/repository/match_data.go similarity index 97% rename from pkg/repository/v1/match_data.go rename to pkg/repository/match_data.go index 6a039683e..bb48a5c0a 100644 --- a/pkg/repository/v1/match_data.go +++ b/pkg/repository/match_data.go @@ -1,10 +1,10 @@ -package v1 +package repository import ( "encoding/json" "fmt" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) // parses match aggregated data diff --git a/pkg/repository/v1/mq.go b/pkg/repository/mq.go similarity index 98% rename from pkg/repository/v1/mq.go rename to pkg/repository/mq.go index 99a4f78d3..8950afe75 100644 --- a/pkg/repository/v1/mq.go +++ b/pkg/repository/mq.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -10,7 +10,7 @@ import ( "github.com/jackc/pgx/v5/pgtype" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/pkg/repository/v1/multiplexer.go b/pkg/repository/multiplexer.go similarity index 99% rename from pkg/repository/v1/multiplexer.go rename to pkg/repository/multiplexer.go index 0faa5c13a..a7b30e7a1 100644 --- a/pkg/repository/v1/multiplexer.go +++ b/pkg/repository/multiplexer.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" diff --git a/pkg/repository/v1/multiplexer_test.go b/pkg/repository/multiplexer_test.go similarity index 99% rename from pkg/repository/v1/multiplexer_test.go rename to pkg/repository/multiplexer_test.go index 434f0da95..11382b643 100644 --- a/pkg/repository/v1/multiplexer_test.go +++ b/pkg/repository/multiplexer_test.go @@ -1,6 +1,6 @@ //go:build !e2e && !load && !rampup && !integration -package v1 +package repository import ( "sync" diff --git a/pkg/repository/v1/olap.go b/pkg/repository/olap.go similarity index 99% rename from pkg/repository/v1/olap.go rename to pkg/repository/olap.go index 886dcef4e..dde936783 100644 --- a/pkg/repository/v1/olap.go +++ b/pkg/repository/olap.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -23,7 +23,7 @@ import ( "github.com/hatchet-dev/hatchet/pkg/config/limits" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" "github.com/hatchet-dev/hatchet/pkg/validator" ) diff --git a/pkg/repository/v1/olappayload.go b/pkg/repository/olappayload.go similarity index 86% rename from pkg/repository/v1/olappayload.go rename to pkg/repository/olappayload.go index 806fa7f66..43381def3 100644 --- a/pkg/repository/v1/olappayload.go +++ b/pkg/repository/olappayload.go @@ -1,8 +1,9 @@ -package v1 +package repository import ( - msgqueue "github.com/hatchet-dev/hatchet/internal/msgqueue/v1" "github.com/jackc/pgx/v5/pgtype" + + "github.com/hatchet-dev/hatchet/internal/msgqueue" ) type OLAPPayloadToOffload struct { diff --git a/pkg/repository/v1/output.go b/pkg/repository/output.go similarity index 97% rename from pkg/repository/v1/output.go rename to pkg/repository/output.go index c92b919b0..e71cb5fd1 100644 --- a/pkg/repository/v1/output.go +++ b/pkg/repository/output.go @@ -1,10 +1,10 @@ -package v1 +package repository import ( "encoding/json" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type TaskOutputEvent struct { diff --git a/pkg/repository/v1/payloadstore.go b/pkg/repository/payloadstore.go similarity index 99% rename from pkg/repository/v1/payloadstore.go rename to pkg/repository/payloadstore.go index 2f41f2849..70d0b7209 100644 --- a/pkg/repository/v1/payloadstore.go +++ b/pkg/repository/payloadstore.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -18,7 +18,7 @@ import ( "golang.org/x/sync/errgroup" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/pkg/repository/v1/pg_health.go b/pkg/repository/pg_health.go similarity index 98% rename from pkg/repository/v1/pg_health.go rename to pkg/repository/pg_health.go index 379d405c9..ab87d0335 100644 --- a/pkg/repository/v1/pg_health.go +++ b/pkg/repository/pg_health.go @@ -1,11 +1,11 @@ -package v1 +package repository import ( "context" "time" "github.com/hatchet-dev/hatchet/pkg/repository/cache" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) // PGHealthRepository provides database health monitoring functionality. diff --git a/pkg/repository/v1/rate_limit.go b/pkg/repository/rate_limit.go similarity index 98% rename from pkg/repository/v1/rate_limit.go rename to pkg/repository/rate_limit.go index b5d47e414..39db65944 100644 --- a/pkg/repository/v1/rate_limit.go +++ b/pkg/repository/rate_limit.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -11,7 +11,7 @@ import ( "github.com/jackc/pgx/v5/pgtype" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type ListRateLimitOpts struct { diff --git a/pkg/repository/v1/repository.go b/pkg/repository/repository.go similarity index 99% rename from pkg/repository/v1/repository.go rename to pkg/repository/repository.go index 6e27aec49..d3266971c 100644 --- a/pkg/repository/v1/repository.go +++ b/pkg/repository/repository.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "fmt" diff --git a/pkg/repository/v1/scheduler.go b/pkg/repository/scheduler.go similarity index 97% rename from pkg/repository/v1/scheduler.go rename to pkg/repository/scheduler.go index af6c14060..7cbecd18a 100644 --- a/pkg/repository/v1/scheduler.go +++ b/pkg/repository/scheduler.go @@ -1,10 +1,11 @@ -package v1 +package repository import ( "context" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" "github.com/jackc/pgx/v5/pgtype" + + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type SchedulerRepository interface { diff --git a/pkg/repository/v1/scheduler_assignment.go b/pkg/repository/scheduler_assignment.go similarity index 93% rename from pkg/repository/v1/scheduler_assignment.go rename to pkg/repository/scheduler_assignment.go index 2099bf0fe..27018d6f5 100644 --- a/pkg/repository/v1/scheduler_assignment.go +++ b/pkg/repository/scheduler_assignment.go @@ -1,11 +1,11 @@ -package v1 +package repository import ( "context" "github.com/jackc/pgx/v5/pgtype" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/pkg/repository/v1/scheduler_concurrency.go b/pkg/repository/scheduler_concurrency.go similarity index 99% rename from pkg/repository/v1/scheduler_concurrency.go rename to pkg/repository/scheduler_concurrency.go index 1cb718921..8af74eb49 100644 --- a/pkg/repository/v1/scheduler_concurrency.go +++ b/pkg/repository/scheduler_concurrency.go @@ -1,11 +1,11 @@ -package v1 +package repository import ( "context" "fmt" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/jackc/pgx/v5/pgtype" ) diff --git a/pkg/repository/v1/scheduler_lease.go b/pkg/repository/scheduler_lease.go similarity index 98% rename from pkg/repository/v1/scheduler_lease.go rename to pkg/repository/scheduler_lease.go index 2faf411f8..5a7b813e4 100644 --- a/pkg/repository/v1/scheduler_lease.go +++ b/pkg/repository/scheduler_lease.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -8,7 +8,7 @@ import ( "github.com/jackc/pgx/v5/pgtype" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/pkg/repository/v1/scheduler_queue.go b/pkg/repository/scheduler_queue.go similarity index 99% rename from pkg/repository/v1/scheduler_queue.go rename to pkg/repository/scheduler_queue.go index fbf4c60f4..18e1bd84b 100644 --- a/pkg/repository/v1/scheduler_queue.go +++ b/pkg/repository/scheduler_queue.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -12,7 +12,7 @@ import ( "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" "github.com/hatchet-dev/hatchet/pkg/telemetry" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type RateLimitResult struct { diff --git a/pkg/repository/v1/security_check.go b/pkg/repository/security_check.go similarity index 96% rename from pkg/repository/v1/security_check.go rename to pkg/repository/security_check.go index 8ae1ddfb6..78e5e6473 100644 --- a/pkg/repository/v1/security_check.go +++ b/pkg/repository/security_check.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" diff --git a/pkg/repository/v1/shared.go b/pkg/repository/shared.go similarity index 97% rename from pkg/repository/v1/shared.go rename to pkg/repository/shared.go index bb32c4d6d..669fdc17c 100644 --- a/pkg/repository/v1/shared.go +++ b/pkg/repository/shared.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "log" @@ -11,7 +11,7 @@ import ( "github.com/hatchet-dev/hatchet/internal/cel" "github.com/hatchet-dev/hatchet/pkg/config/limits" "github.com/hatchet-dev/hatchet/pkg/repository/cache" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/validator" celgo "github.com/google/cel-go/cel" diff --git a/pkg/repository/v1/slack.go b/pkg/repository/slack.go similarity index 96% rename from pkg/repository/v1/slack.go rename to pkg/repository/slack.go index 1450b82c8..d9401d2c3 100644 --- a/pkg/repository/v1/slack.go +++ b/pkg/repository/slack.go @@ -1,10 +1,10 @@ -package v1 +package repository import ( "context" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type UpsertSlackWebhookOpts struct { diff --git a/pkg/repository/v1/sns.go b/pkg/repository/sns.go similarity index 96% rename from pkg/repository/v1/sns.go rename to pkg/repository/sns.go index f7fe0c97d..df15e62ff 100644 --- a/pkg/repository/v1/sns.go +++ b/pkg/repository/sns.go @@ -1,10 +1,10 @@ -package v1 +package repository import ( "context" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type CreateSNSIntegrationOpts struct { diff --git a/pkg/repository/v1/sqlcv1/api_token.sql b/pkg/repository/sqlcv1/api_token.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/api_token.sql rename to pkg/repository/sqlcv1/api_token.sql diff --git a/pkg/repository/v1/sqlcv1/api_token.sql.go b/pkg/repository/sqlcv1/api_token.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/api_token.sql.go rename to pkg/repository/sqlcv1/api_token.sql.go diff --git a/pkg/repository/v1/sqlcv1/batch.go b/pkg/repository/sqlcv1/batch.go similarity index 100% rename from pkg/repository/v1/sqlcv1/batch.go rename to pkg/repository/sqlcv1/batch.go diff --git a/pkg/repository/v1/sqlcv1/concurrency-additional-tables.sql b/pkg/repository/sqlcv1/concurrency-additional-tables.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/concurrency-additional-tables.sql rename to pkg/repository/sqlcv1/concurrency-additional-tables.sql diff --git a/pkg/repository/v1/sqlcv1/concurrency-overwrite.sql.go b/pkg/repository/sqlcv1/concurrency-overwrite.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/concurrency-overwrite.sql.go rename to pkg/repository/sqlcv1/concurrency-overwrite.sql.go diff --git a/pkg/repository/v1/sqlcv1/concurrency.sql b/pkg/repository/sqlcv1/concurrency.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/concurrency.sql rename to pkg/repository/sqlcv1/concurrency.sql diff --git a/pkg/repository/v1/sqlcv1/concurrency.sql.go b/pkg/repository/sqlcv1/concurrency.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/concurrency.sql.go rename to pkg/repository/sqlcv1/concurrency.sql.go diff --git a/pkg/repository/v1/sqlcv1/copyfrom.go b/pkg/repository/sqlcv1/copyfrom.go similarity index 100% rename from pkg/repository/v1/sqlcv1/copyfrom.go rename to pkg/repository/sqlcv1/copyfrom.go diff --git a/pkg/repository/v1/sqlcv1/dags.sql b/pkg/repository/sqlcv1/dags.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/dags.sql rename to pkg/repository/sqlcv1/dags.sql diff --git a/pkg/repository/v1/sqlcv1/dags.sql.go b/pkg/repository/sqlcv1/dags.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/dags.sql.go rename to pkg/repository/sqlcv1/dags.sql.go diff --git a/pkg/repository/v1/sqlcv1/db.go b/pkg/repository/sqlcv1/db.go similarity index 100% rename from pkg/repository/v1/sqlcv1/db.go rename to pkg/repository/sqlcv1/db.go diff --git a/pkg/repository/v1/sqlcv1/dispatcher.sql b/pkg/repository/sqlcv1/dispatcher.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/dispatcher.sql rename to pkg/repository/sqlcv1/dispatcher.sql diff --git a/pkg/repository/v1/sqlcv1/dispatcher.sql.go b/pkg/repository/sqlcv1/dispatcher.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/dispatcher.sql.go rename to pkg/repository/sqlcv1/dispatcher.sql.go diff --git a/pkg/repository/v1/sqlcv1/filters.sql b/pkg/repository/sqlcv1/filters.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/filters.sql rename to pkg/repository/sqlcv1/filters.sql diff --git a/pkg/repository/v1/sqlcv1/filters.sql.go b/pkg/repository/sqlcv1/filters.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/filters.sql.go rename to pkg/repository/sqlcv1/filters.sql.go diff --git a/pkg/repository/v1/sqlcv1/health.sql b/pkg/repository/sqlcv1/health.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/health.sql rename to pkg/repository/sqlcv1/health.sql diff --git a/pkg/repository/v1/sqlcv1/health.sql.go b/pkg/repository/sqlcv1/health.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/health.sql.go rename to pkg/repository/sqlcv1/health.sql.go diff --git a/pkg/repository/v1/sqlcv1/idempotency-keys.sql b/pkg/repository/sqlcv1/idempotency-keys.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/idempotency-keys.sql rename to pkg/repository/sqlcv1/idempotency-keys.sql diff --git a/pkg/repository/v1/sqlcv1/idempotency-keys.sql.go b/pkg/repository/sqlcv1/idempotency-keys.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/idempotency-keys.sql.go rename to pkg/repository/sqlcv1/idempotency-keys.sql.go diff --git a/pkg/repository/v1/sqlcv1/interval_settings.sql b/pkg/repository/sqlcv1/interval_settings.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/interval_settings.sql rename to pkg/repository/sqlcv1/interval_settings.sql diff --git a/pkg/repository/v1/sqlcv1/interval_settings.sql.go b/pkg/repository/sqlcv1/interval_settings.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/interval_settings.sql.go rename to pkg/repository/sqlcv1/interval_settings.sql.go diff --git a/pkg/repository/v1/sqlcv1/lease.sql b/pkg/repository/sqlcv1/lease.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/lease.sql rename to pkg/repository/sqlcv1/lease.sql diff --git a/pkg/repository/v1/sqlcv1/lease.sql.go b/pkg/repository/sqlcv1/lease.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/lease.sql.go rename to pkg/repository/sqlcv1/lease.sql.go diff --git a/pkg/repository/v1/sqlcv1/log_line.sql b/pkg/repository/sqlcv1/log_line.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/log_line.sql rename to pkg/repository/sqlcv1/log_line.sql diff --git a/pkg/repository/v1/sqlcv1/log_line.sql.go b/pkg/repository/sqlcv1/log_line.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/log_line.sql.go rename to pkg/repository/sqlcv1/log_line.sql.go diff --git a/pkg/repository/v1/sqlcv1/matches-overwrite.sql.go b/pkg/repository/sqlcv1/matches-overwrite.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/matches-overwrite.sql.go rename to pkg/repository/sqlcv1/matches-overwrite.sql.go diff --git a/pkg/repository/v1/sqlcv1/matches.sql b/pkg/repository/sqlcv1/matches.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/matches.sql rename to pkg/repository/sqlcv1/matches.sql diff --git a/pkg/repository/v1/sqlcv1/matches.sql.go b/pkg/repository/sqlcv1/matches.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/matches.sql.go rename to pkg/repository/sqlcv1/matches.sql.go diff --git a/pkg/repository/v1/sqlcv1/models.go b/pkg/repository/sqlcv1/models.go similarity index 100% rename from pkg/repository/v1/sqlcv1/models.go rename to pkg/repository/sqlcv1/models.go diff --git a/pkg/repository/v1/sqlcv1/mq.sql b/pkg/repository/sqlcv1/mq.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/mq.sql rename to pkg/repository/sqlcv1/mq.sql diff --git a/pkg/repository/v1/sqlcv1/mq.sql.go b/pkg/repository/sqlcv1/mq.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/mq.sql.go rename to pkg/repository/sqlcv1/mq.sql.go diff --git a/pkg/repository/v1/sqlcv1/olap-overwrite.sql b/pkg/repository/sqlcv1/olap-overwrite.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/olap-overwrite.sql rename to pkg/repository/sqlcv1/olap-overwrite.sql diff --git a/pkg/repository/v1/sqlcv1/olap-overwrite.sql.go b/pkg/repository/sqlcv1/olap-overwrite.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/olap-overwrite.sql.go rename to pkg/repository/sqlcv1/olap-overwrite.sql.go diff --git a/pkg/repository/v1/sqlcv1/olap.sql b/pkg/repository/sqlcv1/olap.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/olap.sql rename to pkg/repository/sqlcv1/olap.sql diff --git a/pkg/repository/v1/sqlcv1/olap.sql.go b/pkg/repository/sqlcv1/olap.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/olap.sql.go rename to pkg/repository/sqlcv1/olap.sql.go diff --git a/pkg/repository/v1/sqlcv1/payload-store-overwrite.sql.go b/pkg/repository/sqlcv1/payload-store-overwrite.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/payload-store-overwrite.sql.go rename to pkg/repository/sqlcv1/payload-store-overwrite.sql.go diff --git a/pkg/repository/v1/sqlcv1/payload-store.sql b/pkg/repository/sqlcv1/payload-store.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/payload-store.sql rename to pkg/repository/sqlcv1/payload-store.sql diff --git a/pkg/repository/v1/sqlcv1/payload-store.sql.go b/pkg/repository/sqlcv1/payload-store.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/payload-store.sql.go rename to pkg/repository/sqlcv1/payload-store.sql.go diff --git a/pkg/repository/v1/sqlcv1/pg_health.sql b/pkg/repository/sqlcv1/pg_health.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/pg_health.sql rename to pkg/repository/sqlcv1/pg_health.sql diff --git a/pkg/repository/v1/sqlcv1/pg_health.sql.go b/pkg/repository/sqlcv1/pg_health.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/pg_health.sql.go rename to pkg/repository/sqlcv1/pg_health.sql.go diff --git a/pkg/repository/v1/sqlcv1/queue.sql b/pkg/repository/sqlcv1/queue.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/queue.sql rename to pkg/repository/sqlcv1/queue.sql diff --git a/pkg/repository/v1/sqlcv1/queue.sql.go b/pkg/repository/sqlcv1/queue.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/queue.sql.go rename to pkg/repository/sqlcv1/queue.sql.go diff --git a/pkg/repository/v1/sqlcv1/rate_limits.sql b/pkg/repository/sqlcv1/rate_limits.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/rate_limits.sql rename to pkg/repository/sqlcv1/rate_limits.sql diff --git a/pkg/repository/v1/sqlcv1/rate_limits.sql.go b/pkg/repository/sqlcv1/rate_limits.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/rate_limits.sql.go rename to pkg/repository/sqlcv1/rate_limits.sql.go diff --git a/pkg/repository/v1/sqlcv1/security_check.sql b/pkg/repository/sqlcv1/security_check.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/security_check.sql rename to pkg/repository/sqlcv1/security_check.sql diff --git a/pkg/repository/v1/sqlcv1/security_check.sql.go b/pkg/repository/sqlcv1/security_check.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/security_check.sql.go rename to pkg/repository/sqlcv1/security_check.sql.go diff --git a/pkg/repository/v1/sqlcv1/slack.sql b/pkg/repository/sqlcv1/slack.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/slack.sql rename to pkg/repository/sqlcv1/slack.sql diff --git a/pkg/repository/v1/sqlcv1/slack.sql.go b/pkg/repository/sqlcv1/slack.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/slack.sql.go rename to pkg/repository/sqlcv1/slack.sql.go diff --git a/pkg/repository/v1/sqlcv1/sleep.sql b/pkg/repository/sqlcv1/sleep.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/sleep.sql rename to pkg/repository/sqlcv1/sleep.sql diff --git a/pkg/repository/v1/sqlcv1/sleep.sql.go b/pkg/repository/sqlcv1/sleep.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/sleep.sql.go rename to pkg/repository/sqlcv1/sleep.sql.go diff --git a/pkg/repository/v1/sqlcv1/sns.sql b/pkg/repository/sqlcv1/sns.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/sns.sql rename to pkg/repository/sqlcv1/sns.sql diff --git a/pkg/repository/v1/sqlcv1/sns.sql.go b/pkg/repository/sqlcv1/sns.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/sns.sql.go rename to pkg/repository/sqlcv1/sns.sql.go diff --git a/pkg/repository/v1/sqlcv1/sqlc.yaml b/pkg/repository/sqlcv1/sqlc.yaml similarity index 89% rename from pkg/repository/v1/sqlcv1/sqlc.yaml rename to pkg/repository/sqlcv1/sqlc.yaml index 4770fe831..4fe10e9c7 100644 --- a/pkg/repository/v1/sqlcv1/sqlc.yaml +++ b/pkg/repository/sqlcv1/sqlc.yaml @@ -37,10 +37,10 @@ sql: - users.sql - workflow_schedules.sql schema: - - ../../../../sql/schema/v0.sql - - ../../../../sql/schema/v1-core.sql - - ../../../../sql/schema/v1-olap.sql - - ../../../../sql/schema/pg-stubs.sql + - ../../../sql/schema/v0.sql + - ../../../sql/schema/v1-core.sql + - ../../../sql/schema/v1-olap.sql + - ../../../sql/schema/pg-stubs.sql - ./concurrency-additional-tables.sql strict_order_by: false gen: diff --git a/pkg/repository/v1/sqlcv1/tasks-overwrite.go b/pkg/repository/sqlcv1/tasks-overwrite.go similarity index 100% rename from pkg/repository/v1/sqlcv1/tasks-overwrite.go rename to pkg/repository/sqlcv1/tasks-overwrite.go diff --git a/pkg/repository/v1/sqlcv1/tasks-overwrite.sql b/pkg/repository/sqlcv1/tasks-overwrite.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/tasks-overwrite.sql rename to pkg/repository/sqlcv1/tasks-overwrite.sql diff --git a/pkg/repository/v1/sqlcv1/tasks.sql b/pkg/repository/sqlcv1/tasks.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/tasks.sql rename to pkg/repository/sqlcv1/tasks.sql diff --git a/pkg/repository/v1/sqlcv1/tasks.sql.go b/pkg/repository/sqlcv1/tasks.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/tasks.sql.go rename to pkg/repository/sqlcv1/tasks.sql.go diff --git a/pkg/repository/v1/sqlcv1/tenant_invites.sql b/pkg/repository/sqlcv1/tenant_invites.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/tenant_invites.sql rename to pkg/repository/sqlcv1/tenant_invites.sql diff --git a/pkg/repository/v1/sqlcv1/tenant_invites.sql.go b/pkg/repository/sqlcv1/tenant_invites.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/tenant_invites.sql.go rename to pkg/repository/sqlcv1/tenant_invites.sql.go diff --git a/pkg/repository/v1/sqlcv1/tenant_limits.sql b/pkg/repository/sqlcv1/tenant_limits.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/tenant_limits.sql rename to pkg/repository/sqlcv1/tenant_limits.sql diff --git a/pkg/repository/v1/sqlcv1/tenant_limits.sql.go b/pkg/repository/sqlcv1/tenant_limits.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/tenant_limits.sql.go rename to pkg/repository/sqlcv1/tenant_limits.sql.go diff --git a/pkg/repository/v1/sqlcv1/tenants.sql b/pkg/repository/sqlcv1/tenants.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/tenants.sql rename to pkg/repository/sqlcv1/tenants.sql diff --git a/pkg/repository/v1/sqlcv1/tenants.sql.go b/pkg/repository/sqlcv1/tenants.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/tenants.sql.go rename to pkg/repository/sqlcv1/tenants.sql.go diff --git a/pkg/repository/v1/sqlcv1/ticker.sql b/pkg/repository/sqlcv1/ticker.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/ticker.sql rename to pkg/repository/sqlcv1/ticker.sql diff --git a/pkg/repository/v1/sqlcv1/ticker.sql.go b/pkg/repository/sqlcv1/ticker.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/ticker.sql.go rename to pkg/repository/sqlcv1/ticker.sql.go diff --git a/pkg/repository/v1/sqlcv1/triggers.sql b/pkg/repository/sqlcv1/triggers.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/triggers.sql rename to pkg/repository/sqlcv1/triggers.sql diff --git a/pkg/repository/v1/sqlcv1/triggers.sql.go b/pkg/repository/sqlcv1/triggers.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/triggers.sql.go rename to pkg/repository/sqlcv1/triggers.sql.go diff --git a/pkg/repository/v1/sqlcv1/users.sql b/pkg/repository/sqlcv1/users.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/users.sql rename to pkg/repository/sqlcv1/users.sql diff --git a/pkg/repository/v1/sqlcv1/users.sql.go b/pkg/repository/sqlcv1/users.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/users.sql.go rename to pkg/repository/sqlcv1/users.sql.go diff --git a/pkg/repository/v1/sqlcv1/webhooks.sql b/pkg/repository/sqlcv1/webhooks.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/webhooks.sql rename to pkg/repository/sqlcv1/webhooks.sql diff --git a/pkg/repository/v1/sqlcv1/webhooks.sql.go b/pkg/repository/sqlcv1/webhooks.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/webhooks.sql.go rename to pkg/repository/sqlcv1/webhooks.sql.go diff --git a/pkg/repository/v1/sqlcv1/workers.sql b/pkg/repository/sqlcv1/workers.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/workers.sql rename to pkg/repository/sqlcv1/workers.sql diff --git a/pkg/repository/v1/sqlcv1/workers.sql.go b/pkg/repository/sqlcv1/workers.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/workers.sql.go rename to pkg/repository/sqlcv1/workers.sql.go diff --git a/pkg/repository/v1/sqlcv1/workflow_schedules.sql b/pkg/repository/sqlcv1/workflow_schedules.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/workflow_schedules.sql rename to pkg/repository/sqlcv1/workflow_schedules.sql diff --git a/pkg/repository/v1/sqlcv1/workflow_schedules.sql.go b/pkg/repository/sqlcv1/workflow_schedules.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/workflow_schedules.sql.go rename to pkg/repository/sqlcv1/workflow_schedules.sql.go diff --git a/pkg/repository/v1/sqlcv1/workflows.sql b/pkg/repository/sqlcv1/workflows.sql similarity index 100% rename from pkg/repository/v1/sqlcv1/workflows.sql rename to pkg/repository/sqlcv1/workflows.sql diff --git a/pkg/repository/v1/sqlcv1/workflows.sql.go b/pkg/repository/sqlcv1/workflows.sql.go similarity index 100% rename from pkg/repository/v1/sqlcv1/workflows.sql.go rename to pkg/repository/sqlcv1/workflows.sql.go diff --git a/pkg/repository/v1/task.go b/pkg/repository/task.go similarity index 99% rename from pkg/repository/v1/task.go rename to pkg/repository/task.go index 9d81a02ca..b4471fbb8 100644 --- a/pkg/repository/v1/task.go +++ b/pkg/repository/task.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -17,7 +17,7 @@ import ( "github.com/hatchet-dev/hatchet/internal/cel" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/pkg/repository/v1/task_partition_test.go b/pkg/repository/task_partition_test.go similarity index 99% rename from pkg/repository/v1/task_partition_test.go rename to pkg/repository/task_partition_test.go index 624c645e1..358de6ec1 100644 --- a/pkg/repository/v1/task_partition_test.go +++ b/pkg/repository/task_partition_test.go @@ -1,6 +1,6 @@ //go:build !e2e && !load && !rampup && !integration -package v1 +package repository import ( "context" @@ -21,7 +21,7 @@ import ( "github.com/testcontainers/testcontainers-go/wait" "github.com/hatchet-dev/hatchet/cmd/hatchet-migrate/migrate" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) func setupPostgresWithMigration(t *testing.T) (*pgxpool.Pool, func()) { diff --git a/pkg/repository/v1/tenant.go b/pkg/repository/tenant.go similarity index 99% rename from pkg/repository/v1/tenant.go rename to pkg/repository/tenant.go index a62fe074d..0068e53d8 100644 --- a/pkg/repository/v1/tenant.go +++ b/pkg/repository/tenant.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -14,7 +14,7 @@ import ( "github.com/hatchet-dev/hatchet/pkg/repository/cache" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type CreateTenantOpts struct { diff --git a/pkg/repository/v1/tenant_alerting.go b/pkg/repository/tenant_alerting.go similarity index 99% rename from pkg/repository/v1/tenant_alerting.go rename to pkg/repository/tenant_alerting.go index 666a06f6b..9f696f331 100644 --- a/pkg/repository/v1/tenant_alerting.go +++ b/pkg/repository/tenant_alerting.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -11,7 +11,7 @@ import ( "github.com/hatchet-dev/hatchet/pkg/repository/cache" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type UpsertTenantAlertingSettingsOpts struct { diff --git a/pkg/repository/v1/tenant_invite.go b/pkg/repository/tenant_invite.go similarity index 98% rename from pkg/repository/v1/tenant_invite.go rename to pkg/repository/tenant_invite.go index 5065fa17c..c6a714280 100644 --- a/pkg/repository/v1/tenant_invite.go +++ b/pkg/repository/tenant_invite.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -10,7 +10,7 @@ import ( "github.com/jackc/pgx/v5/pgtype" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type CreateTenantInviteOpts struct { diff --git a/pkg/repository/v1/tenant_limit.go b/pkg/repository/tenant_limit.go similarity index 99% rename from pkg/repository/v1/tenant_limit.go rename to pkg/repository/tenant_limit.go index 30912d9a0..a948e6fe0 100644 --- a/pkg/repository/v1/tenant_limit.go +++ b/pkg/repository/tenant_limit.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -12,7 +12,7 @@ import ( "github.com/hatchet-dev/hatchet/pkg/config/limits" "github.com/hatchet-dev/hatchet/pkg/repository/cache" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type TenantLimitConfig struct { diff --git a/pkg/repository/v1/ticker.go b/pkg/repository/ticker.go similarity index 98% rename from pkg/repository/v1/ticker.go rename to pkg/repository/ticker.go index b7042256d..c6b3099a3 100644 --- a/pkg/repository/v1/ticker.go +++ b/pkg/repository/ticker.go @@ -1,11 +1,11 @@ -package v1 +package repository import ( "context" "time" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type CreateTickerOpts struct { diff --git a/pkg/repository/v1/trigger.go b/pkg/repository/trigger.go similarity index 99% rename from pkg/repository/v1/trigger.go rename to pkg/repository/trigger.go index 6c44750e3..14c4c9535 100644 --- a/pkg/repository/v1/trigger.go +++ b/pkg/repository/trigger.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -15,7 +15,7 @@ import ( "github.com/hatchet-dev/hatchet/internal/cel" "github.com/hatchet-dev/hatchet/pkg/constants" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type EventTriggerOpts struct { diff --git a/pkg/repository/v1/trigger_test.go b/pkg/repository/trigger_test.go similarity index 97% rename from pkg/repository/v1/trigger_test.go rename to pkg/repository/trigger_test.go index 2e59aba59..ac197575f 100644 --- a/pkg/repository/v1/trigger_test.go +++ b/pkg/repository/trigger_test.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "testing" diff --git a/pkg/repository/v1/user.go b/pkg/repository/user.go similarity index 98% rename from pkg/repository/v1/user.go rename to pkg/repository/user.go index d32901f24..0c1ec229c 100644 --- a/pkg/repository/v1/user.go +++ b/pkg/repository/user.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -11,7 +11,7 @@ import ( "golang.org/x/crypto/bcrypt" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type CreateUserOpts struct { diff --git a/pkg/repository/v1/user_session.go b/pkg/repository/user_session.go similarity index 97% rename from pkg/repository/v1/user_session.go rename to pkg/repository/user_session.go index 445a1e092..ff5bcf0e7 100644 --- a/pkg/repository/v1/user_session.go +++ b/pkg/repository/user_session.go @@ -1,11 +1,11 @@ -package v1 +package repository import ( "context" "time" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type CreateSessionOpts struct { diff --git a/pkg/repository/v1/webhooks.go b/pkg/repository/webhooks.go similarity index 99% rename from pkg/repository/v1/webhooks.go rename to pkg/repository/webhooks.go index fbb657905..3a4adcd75 100644 --- a/pkg/repository/v1/webhooks.go +++ b/pkg/repository/webhooks.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -7,7 +7,7 @@ import ( "github.com/jackc/pgx/v5/pgtype" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type WebhookRepository interface { diff --git a/pkg/repository/v1/worker.go b/pkg/repository/worker.go similarity index 99% rename from pkg/repository/v1/worker.go rename to pkg/repository/worker.go index b1b2344f8..1db7b9bf0 100644 --- a/pkg/repository/v1/worker.go +++ b/pkg/repository/worker.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -11,7 +11,7 @@ import ( "github.com/hatchet-dev/hatchet/internal/services/dispatcher/contracts" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type RuntimeInfo struct { diff --git a/pkg/repository/v1/workflow.go b/pkg/repository/workflow.go similarity index 99% rename from pkg/repository/v1/workflow.go rename to pkg/repository/workflow.go index 7ce655d67..6dac8c67f 100644 --- a/pkg/repository/v1/workflow.go +++ b/pkg/repository/workflow.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -18,7 +18,7 @@ import ( "github.com/hatchet-dev/hatchet/internal/digest" "github.com/hatchet-dev/hatchet/pkg/client/types" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/pkg/repository/v1/workflow_schedules.go b/pkg/repository/workflow_schedules.go similarity index 99% rename from pkg/repository/v1/workflow_schedules.go rename to pkg/repository/workflow_schedules.go index c36d96bc4..bd2cad89c 100644 --- a/pkg/repository/v1/workflow_schedules.go +++ b/pkg/repository/workflow_schedules.go @@ -1,4 +1,4 @@ -package v1 +package repository import ( "context" @@ -9,7 +9,7 @@ import ( "github.com/jackc/pgx/v5/pgtype" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type ListScheduledWorkflowsOpts struct { diff --git a/pkg/scheduling/v1/concurrency.go b/pkg/scheduling/v1/concurrency.go index 66f5ef9ab..136374275 100644 --- a/pkg/scheduling/v1/concurrency.go +++ b/pkg/scheduling/v1/concurrency.go @@ -10,8 +10,8 @@ import ( "golang.org/x/time/rate" "github.com/hatchet-dev/hatchet/pkg/randomticker" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/pkg/scheduling/v1/extension.go b/pkg/scheduling/v1/extension.go index de76fafee..790389594 100644 --- a/pkg/scheduling/v1/extension.go +++ b/pkg/scheduling/v1/extension.go @@ -5,7 +5,7 @@ import ( "golang.org/x/sync/errgroup" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type PostAssignInput struct { diff --git a/pkg/scheduling/v1/lease_manager.go b/pkg/scheduling/v1/lease_manager.go index e7daa1832..355fc559d 100644 --- a/pkg/scheduling/v1/lease_manager.go +++ b/pkg/scheduling/v1/lease_manager.go @@ -10,8 +10,8 @@ import ( "golang.org/x/sync/errgroup" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) // LeaseManager is responsible for leases on multiple queues and multiplexing diff --git a/pkg/scheduling/v1/lease_manager_test.go b/pkg/scheduling/v1/lease_manager_test.go index dbb14d51b..d9f95c00f 100644 --- a/pkg/scheduling/v1/lease_manager_test.go +++ b/pkg/scheduling/v1/lease_manager_test.go @@ -13,8 +13,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type mockLeaseRepo struct { diff --git a/pkg/scheduling/v1/pool.go b/pkg/scheduling/v1/pool.go index 3d0f7c830..d51ecc54d 100644 --- a/pkg/scheduling/v1/pool.go +++ b/pkg/scheduling/v1/pool.go @@ -7,9 +7,9 @@ import ( "github.com/rs/zerolog" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type sharedConfig struct { diff --git a/pkg/scheduling/v1/prometheus_extension.go b/pkg/scheduling/v1/prometheus_extension.go index f88d16108..855d544af 100644 --- a/pkg/scheduling/v1/prometheus_extension.go +++ b/pkg/scheduling/v1/prometheus_extension.go @@ -4,7 +4,7 @@ import ( "sync" "github.com/hatchet-dev/hatchet/pkg/integrations/metrics/prometheus" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type PrometheusExtension struct { diff --git a/pkg/scheduling/v1/queuer.go b/pkg/scheduling/v1/queuer.go index 51d19aeeb..982850692 100644 --- a/pkg/scheduling/v1/queuer.go +++ b/pkg/scheduling/v1/queuer.go @@ -10,8 +10,8 @@ import ( "github.com/rs/zerolog" "github.com/hatchet-dev/hatchet/pkg/integrations/metrics/prometheus" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/pkg/scheduling/v1/rate_limit.go b/pkg/scheduling/v1/rate_limit.go index 8d6b287e8..cc124006c 100644 --- a/pkg/scheduling/v1/rate_limit.go +++ b/pkg/scheduling/v1/rate_limit.go @@ -8,7 +8,7 @@ import ( "github.com/jackc/pgx/v5/pgtype" "github.com/rs/zerolog" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" ) const MAX_RATE_LIMIT_UPDATE_FREQUENCY = 500 * time.Millisecond // avoid boundary conditions on 1 second polls diff --git a/pkg/scheduling/v1/rate_limit_test.go b/pkg/scheduling/v1/rate_limit_test.go index 7ea7b0072..a3b519408 100644 --- a/pkg/scheduling/v1/rate_limit_test.go +++ b/pkg/scheduling/v1/rate_limit_test.go @@ -10,8 +10,8 @@ import ( "testing" "time" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/jackc/pgx/v5/pgtype" "github.com/rs/zerolog" "github.com/stretchr/testify/assert" diff --git a/pkg/scheduling/v1/scheduler.go b/pkg/scheduling/v1/scheduler.go index b5d8871e6..be9d60202 100644 --- a/pkg/scheduling/v1/scheduler.go +++ b/pkg/scheduling/v1/scheduler.go @@ -11,9 +11,9 @@ import ( "github.com/hatchet-dev/hatchet/internal/queueutils" "github.com/hatchet-dev/hatchet/pkg/randomticker" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" "github.com/hatchet-dev/hatchet/pkg/telemetry" ) diff --git a/pkg/scheduling/v1/slot.go b/pkg/scheduling/v1/slot.go index ff4fa4bc3..b5edfc9bc 100644 --- a/pkg/scheduling/v1/slot.go +++ b/pkg/scheduling/v1/slot.go @@ -6,7 +6,7 @@ import ( "time" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) // slot expiry is 1 second to account for the 1 second replenish rate, plus 500 ms of buffer diff --git a/pkg/scheduling/v1/slot_test.go b/pkg/scheduling/v1/slot_test.go index 58109a4ab..14c1fcba0 100644 --- a/pkg/scheduling/v1/slot_test.go +++ b/pkg/scheduling/v1/slot_test.go @@ -9,9 +9,9 @@ import ( "github.com/jackc/pgx/v5/pgtype" "github.com/stretchr/testify/assert" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) var stableWorkerId1 = uuid.New().String() diff --git a/pkg/scheduling/v1/tenant_manager.go b/pkg/scheduling/v1/tenant_manager.go index f3e8372a8..65422fabb 100644 --- a/pkg/scheduling/v1/tenant_manager.go +++ b/pkg/scheduling/v1/tenant_manager.go @@ -8,9 +8,9 @@ import ( lru "github.com/hashicorp/golang-lru/v2" "github.com/jackc/pgx/v5/pgtype" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/hatchet-dev/hatchet/pkg/repository/sqlchelpers" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) // tenantManager manages the scheduler and queuers for a tenant and multiplexes diff --git a/pkg/scheduling/v1/worker.go b/pkg/scheduling/v1/worker.go index 5026fce25..ec4261e3b 100644 --- a/pkg/scheduling/v1/worker.go +++ b/pkg/scheduling/v1/worker.go @@ -1,8 +1,8 @@ package v1 import ( - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" - "github.com/hatchet-dev/hatchet/pkg/repository/v1/sqlcv1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" + "github.com/hatchet-dev/hatchet/pkg/repository/sqlcv1" ) type worker struct { diff --git a/pkg/security/security.go b/pkg/security/security.go index 6feab30bd..df2d5d350 100644 --- a/pkg/security/security.go +++ b/pkg/security/security.go @@ -5,7 +5,7 @@ import ( "io" "net/http" - v1 "github.com/hatchet-dev/hatchet/pkg/repository/v1" + v1 "github.com/hatchet-dev/hatchet/pkg/repository" "github.com/rs/zerolog" ) diff --git a/pkg/webhook/worker.go b/pkg/webhook/worker.go deleted file mode 100644 index 8a198b28e..000000000 --- a/pkg/webhook/worker.go +++ /dev/null @@ -1,68 +0,0 @@ -package webhook - -import ( - "fmt" - - "github.com/hatchet-dev/hatchet/pkg/client" - "github.com/hatchet-dev/hatchet/pkg/worker" - - "github.com/rs/zerolog" -) - -type WebhookWorker struct { - opts WorkerOpts - client client.Client - l *zerolog.Logger -} - -type WorkerOpts struct { - Name string - Token string - ID string - Secret string - URL string - TenantID string - Actions []string - WebhookId string - Logger *zerolog.Logger -} - -func New(opts WorkerOpts) (*WebhookWorker, error) { - cl, err := client.New( - client.WithToken(opts.Token), - client.WithLogger(opts.Logger), - ) - - if err != nil { - return nil, fmt.Errorf("could not create client: %w", err) - } - - return &WebhookWorker{ - opts: opts, - client: cl, - l: opts.Logger, - }, nil -} - -func (w *WebhookWorker) Start() (func() error, error) { - r, err := worker.NewWorker( - worker.WithClient(w.client), - worker.WithInternalData(w.opts.Actions), - worker.WithName("Webhook_"+w.opts.ID), - worker.WithLogger(w.l), - ) - if err != nil { - return nil, fmt.Errorf("could not create webhook worker: %w", err) - } - - cleanup, err := r.StartWebhook(worker.WebhookWorkerOpts{ - URL: w.opts.URL, - Secret: w.opts.Secret, - WebhookId: w.opts.WebhookId, - }) - if err != nil { - return nil, fmt.Errorf("could not start webhook worker: %w", err) - } - - return cleanup, nil -} diff --git a/pkg/worker/webhook_handler.go b/pkg/worker/webhook_handler.go deleted file mode 100644 index 22be2df43..000000000 --- a/pkg/worker/webhook_handler.go +++ /dev/null @@ -1,184 +0,0 @@ -package worker - -import ( - "encoding/json" - "fmt" - "io" - "net/http" - "strings" - "time" - - "github.com/hatchet-dev/hatchet/internal/signature" - "github.com/hatchet-dev/hatchet/pkg/client" -) - -type WebhookHandlerOptions struct { - Secret string -} - -type HealthCheckResponse struct { - Actions []string `json:"actions"` -} - -func (w *Worker) WebhookHttpHandler(opts WebhookHandlerOptions, workflows ...workflowConverter) http.HandlerFunc { - return func(writer http.ResponseWriter, r *http.Request) { - // health check with actions - if r.Method == http.MethodGet { - writer.WriteHeader(http.StatusOK) - _, _ = writer.Write([]byte("OK!")) - return - } - if r.Method != http.MethodPut && r.Method != http.MethodPost { - writer.WriteHeader(http.StatusMethodNotAllowed) - _, _ = writer.Write([]byte("Method not allowed")) - return - } - - data, err := io.ReadAll(r.Body) - if err != nil { - w.l.Error().Err(err).Msg("error reading body") - writer.WriteHeader(http.StatusInternalServerError) - _, _ = writer.Write([]byte(err.Error())) - return - } - - expected := r.Header.Get("X-Hatchet-Signature") - actual, err := signature.Sign(string(data), opts.Secret) - if err != nil { - w.l.Error().Err(err).Msg("error signing request") - writer.WriteHeader(http.StatusInternalServerError) - _, _ = writer.Write([]byte(err.Error())) - return - } - - if expected != actual { - w.l.Error().Err(fmt.Errorf("expected signature %s, got %s", expected, actual)).Msg("error in request signature") - writer.WriteHeader(http.StatusInternalServerError) - _, _ = writer.Write([]byte("wrong signature")) - return - } - - if r.Method == http.MethodPut { - for _, wf := range workflows { - err = w.RegisterWorkflow(wf) - if err != nil { - w.l.Error().Err(err).Msg("error registering workflow") - writer.WriteHeader(http.StatusInternalServerError) - _, _ = writer.Write([]byte(err.Error())) - return - } - } - - var actions []string - for _, action := range w.actions { - actions = append(actions, action.Name()) - } - - res := HealthCheckResponse{ - Actions: actions, - } - data, err := json.Marshal(res) - if err != nil { - panic(err) - } - writer.WriteHeader(http.StatusOK) - _, _ = writer.Write(data) - return - } - - var action ActionPayload - if err := json.Unmarshal(data, &action); err != nil { - w.l.Error().Err(err).Msg("error unmarshalling action") - writer.WriteHeader(http.StatusInternalServerError) - _, _ = writer.Write([]byte(err.Error())) - return - } - - actionWithPayload := action.Action - actionWithPayload.ActionPayload = []byte(action.ActionPayload) - - timestamp := time.Now().UTC() - _, err = w.client.Dispatcher().SendStepActionEvent(r.Context(), - &client.ActionEvent{ - Action: actionWithPayload, - EventTimestamp: ×tamp, - EventType: client.ActionEventTypeStarted, - }, - ) - if err != nil { - w.l.Error().Err(err).Msg("error dispatching event") - writer.WriteHeader(http.StatusInternalServerError) - _, _ = writer.Write([]byte(err.Error())) - return - } - - ctx, err := newHatchetContext(r.Context(), actionWithPayload, w.client, w.l, w) - if err != nil { - w.l.Error().Err(err).Msg("error creating context") - writer.WriteHeader(http.StatusInternalServerError) - _, _ = writer.Write([]byte(err.Error())) - return - } - resp, err := w.webhookProcess(ctx) - if err != nil { - // FIXME handle error gracefully and send a failed event - w.l.Error().Err(err).Msg("error processing request") - writer.WriteHeader(http.StatusInternalServerError) - _, _ = writer.Write([]byte(err.Error())) - return - } - - timestamp = time.Now().UTC() - _, err = w.client.Dispatcher().SendStepActionEvent(r.Context(), - &client.ActionEvent{ - Action: actionWithPayload, - EventTimestamp: ×tamp, - EventType: client.ActionEventTypeCompleted, - EventPayload: resp, - }, - ) - if err != nil { - w.l.Error().Err(err).Msg("error dispatching event") - writer.WriteHeader(http.StatusInternalServerError) - _, _ = writer.Write([]byte(err.Error())) - return - } - - writer.WriteHeader(http.StatusOK) - _, _ = writer.Write([]byte("OK")) - } -} - -func (w *Worker) webhookProcess(ctx HatchetContext) (interface{}, error) { - var do Action - for _, action := range w.actions { - split := strings.Split(action.Name(), ":") // service:action - if split[1] == ctx.StepName() { - do = action - break - } - } - - if do == nil { - return nil, fmt.Errorf("fatal: could not find action for step run %s", ctx.StepName()) - } - - res := do.Run(ctx) - - if len(res) != 2 { - return nil, fmt.Errorf("invalid response from action, expected 2 values") - } - - if res[1] != nil { - err, ok := res[1].(error) - if !ok { - return nil, fmt.Errorf("invalid response from action, expected error") - } - - if err != nil { - return nil, err - } - } - - return res[0], nil -} diff --git a/pkg/worker/worker_webhook.go b/pkg/worker/worker_webhook.go deleted file mode 100644 index 75160612c..000000000 --- a/pkg/worker/worker_webhook.go +++ /dev/null @@ -1,160 +0,0 @@ -package worker - -import ( - "context" - "fmt" - "time" - - openapi_types "github.com/oapi-codegen/runtime/types" - - "github.com/hatchet-dev/hatchet/internal/whrequest" - "github.com/hatchet-dev/hatchet/pkg/client" - "github.com/hatchet-dev/hatchet/pkg/client/rest" -) - -type RegisterWebhookWorkerOpts struct { - Name string - URL string - Secret *string -} - -type ActionPayload struct { - *client.Action - - ActionPayload string `json:"actionPayload"` -} - -func (w *Worker) RegisterWebhook(ww RegisterWebhookWorkerOpts) error { - tenantId := openapi_types.UUID{} - if err := tenantId.Scan(w.client.TenantId()); err != nil { - return fmt.Errorf("error getting tenant id: %w", err) - } - - res, err := w.client.API().WebhookCreate(context.Background(), tenantId, rest.WebhookCreateJSONRequestBody{ - Url: ww.URL, - Secret: ww.Secret, - Name: ww.Name, - }) - if err != nil { - return fmt.Errorf("error creating webhook worker: %w", err) - } - - if res.StatusCode != 200 { - return fmt.Errorf("error creating webhook, failed with status code %d", res.StatusCode) - } - - return nil -} - -type WebhookWorkerOpts struct { - URL string - Secret string - WebhookId string -} - -// FIXME do not expose this to the end-user client somehow -func (w *Worker) StartWebhook(ww WebhookWorkerOpts) (func() error, error) { - ctx, cancel := context.WithCancel(context.Background()) - listener, _, err := w.client.Dispatcher().GetActionListener(ctx, &client.GetActionListenerRequest{ - WorkerName: w.name, - Actions: w.initActionNames, - MaxRuns: w.maxRuns, - WebhookId: &ww.WebhookId, - }) - - if err != nil { - cancel() - return nil, fmt.Errorf("could not get action listener: %w", err) - } - - actionCh, errCh, err := listener.Actions(ctx) - - if err != nil { - cancel() - return nil, fmt.Errorf("could not get action channel: %w", err) - } - - go func() { - for { - select { - case err := <-errCh: - // NOTE: this matches the behavior of the old worker, until we change the signature of the webhook workers - w.l.Error().Err(err).Msgf("error from action channel for webhook worker %s", w.name) - return - case action := <-actionCh: - go func(action *client.Action) { - err := w.sendWebhook(context.Background(), action, ww) - - if err != nil { - w.l.Error().Err(err).Msgf("could not execute action: %s", action.ActionId) - } - - w.l.Debug().Msgf("action %s completed", action.ActionId) - }(action) - case <-ctx.Done(): - w.l.Debug().Msgf("worker %s received context done, stopping", w.name) - return - } - } - }() - - cleanup := func() error { - cancel() - - w.l.Debug().Msgf("worker %s stopped", w.name) - - return nil - } - - return cleanup, nil -} - -func (w *Worker) sendWebhook(ctx context.Context, action *client.Action, ww WebhookWorkerOpts) error { - w.l.Debug().Msgf("action received from step run %s, sending webhook at %s", action.StepRunId, time.Now()) - - actionWithPayload := ActionPayload{ - Action: action, - ActionPayload: string(action.ActionPayload), - } - - _, statusCode, err := whrequest.Send(ctx, ww.URL, ww.Secret, actionWithPayload) - - if statusCode != nil && *statusCode != 200 { - w.l.Debug().Msgf("step run %s webhook sent with status code %d", action.StepRunId, *statusCode) - } - - if err != nil { - w.l.Warn().Msgf("step run %s could not send webhook to %s: %s", action.StepRunId, ww.URL, err) - if err := w.markFailed(action, fmt.Errorf("could not send webhook: %w", err)); err != nil { - return fmt.Errorf("could not send webhook and then could not send failed action event: %w", err) - } - return err - } - - return nil -} - -func (w *Worker) markFailed(action *client.Action, err error) error { - failureEvent := w.getActionEvent(action, client.ActionEventTypeFailed) - - w.alerter.SendAlert(context.Background(), err, map[string]interface{}{ - "actionId": action.ActionId, - "workerId": action.WorkerId, - "workflowRunId": action.WorkflowRunId, - "jobName": action.JobName, - "actionType": action.ActionType, - }) - - failureEvent.EventPayload = err.Error() - - _, err = w.client.Dispatcher().SendStepActionEvent( - context.Background(), - failureEvent, - ) - - if err != nil { - return fmt.Errorf("could not send action event: %w", err) - } - - return nil -}