Commit graph

265 commits

Author SHA1 Message Date
Sipke Schoorstra 562d91bd55
Fix async callback awaiting in HTTP endpoint (#6660)
* Await HTTP resume callbacks

* Update HttpEndpoint.cs

* Update HttpEndpointActivityExecutionContextExtensions.cs

* Refactor to use `WaitForHttpRequestAsync` consistently.

Replaced `WaitForHttpRequest` with `WaitForHttpRequestAsync` across the codebase to align with asynchronous naming conventions. This change improves clarity and maintains consistency in method naming.

* Add 'codex/*' branch to workflow path filters

This update ensures that actions in the workflow are triggered for changes in branches following the 'codex/*' naming convention. It aligns the path filters with the branching strategy and improves CI/CD coverage.
2025-05-20 11:24:23 +02:00
Sipke Schoorstra dacbef13e6
Update workflows to support 'develop' branch conventions
Added 'develop/*' to branch filters and adjusted conditions to accommodate 'develop' branch-related logic, including versioning and filtering updates. Ensures proper handling of 'develop' branch workflows and aligns with project branching strategy.
2025-04-28 19:09:43 +02:00
Sipke Schoorstra 2eec542f50
Merge remote-tracking branch 'origin/rc/3.4.0' 2025-04-16 08:41:04 +02:00
Sipke Schoorstra 3874c0bebe
Update Docker image tags to v3.4.0-preview
Upgraded Docker image references in workflows to v3.4.0-preview from v3.3.0-preview. This ensures the workflows use the latest version for building and pushing images.
2025-04-02 16:11:38 +02:00
Sipke Schoorstra fb1feb5ac4
Merge branch 'rc/3.4.0' 2025-04-01 10:23:04 +02:00
Sipke Schoorstra 0e6fdc7e0d Update package prefix logic for release candidate branches
Include release candidate (rc/*) branches in the condition to assign the "preview" package prefix. This ensures consistent versioning for branches intended for pre-production releases.
2025-03-26 16:23:17 +01:00
Sipke Schoorstra b543366a4b
Refactor trigger indexing and update base version to 3.5.0. (#6516)
Refactored `TriggerIndexingContext` to enhance immutability and streamline trigger handling logic. Added support for generating trigger names dynamically and improved bookmark creation in HTTP workflows. Removed unused Docker Compose file and updated the base version in the build workflow to `3.5.0`.

Fixes #6512
2025-03-20 12:04:51 +01:00
Sipke Schoorstra ffe1a611d7
Remove unused datadog compose file and update branch reference.
The datadog compose file was removed from the solution as it is no longer needed. Additionally, the GitHub workflow was updated to reference the "rc/3.4.0" branch instead of "main" for the release process.
2025-03-18 19:41:46 +01:00
Sipke Schoorstra 2092b8aefe
Add 'rc/*' branch pattern to workflow triggers
This update includes the 'rc/*' branch pattern to the workflow triggers in the packages.yml file. It ensures workflows are triggered for release candidate branches, aligning with the project's branching strategy.
2025-03-18 19:30:16 +01:00
Marius Vasile Vușcan c4048fad4d
Merge branch 'refs/heads/main' into blueberry
# Conflicts:
#	.github/workflows/packages.yml
#	Directory.Packages.props
#	samples/aspnet/Elsa.Samples.AspNet.EntityFrameworkCore.PostgresSql/Elsa.Samples.AspNet.EntityFrameworkCore.PostgresSql.csproj
#	src/Directory.Build.props
#	src/apps/Elsa.Server.LoadBalancer/Elsa.Server.LoadBalancer.csproj
#	src/apps/Elsa.ServerAndStudio.Web/Elsa.ServerAndStudio.Web.csproj
#	src/apps/Elsa.Studio.Web/Elsa.Studio.Web.csproj
#	src/apps/ElsaStudioWebAssembly/ElsaStudioWebAssembly.csproj
#	src/bundles/Elsa.Server.Web/Elsa.Server.Web.csproj
#	src/clients/Elsa.Api.Client/Elsa.Api.Client.csproj
#	src/clients/Elsa.Api.Client/Extensions/DependencyInjectionExtensions.cs
#	src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationPlan.cs
#	src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationPlanParams.cs
#	src/clients/Elsa.Api.Client/Resources/Alterations/Models/AlterationWorkflowInstanceFilter.cs
#	src/clients/Elsa.Api.Client/Resources/Alterations/Responses/RunRequest.cs
#	src/modules/Elsa.Common/Elsa.Common.csproj
#	src/modules/Elsa.Dapper/Elsa.Dapper.csproj
#	src/modules/Elsa.Expressions/Elsa.Expressions.csproj
#	src/modules/Elsa.Http/Activities/SendHttpRequestBase.cs
#	src/modules/Elsa.Http/Elsa.Http.csproj
#	src/modules/Elsa.MassTransit.AzureServiceBus/Handlers/RemoveOrphanedSubscriptions.cs
#	src/modules/Elsa.MassTransit/Services/MassTransitWorkflowDispatcher.cs
#	src/modules/Elsa.ProtoActor/Mappers/WorkflowExecutionResultMapper.cs
#	src/modules/Elsa.ProtoActor/Proto/Shared.proto
#	src/modules/Elsa.ProtoActor/Proto/WorkflowInstance.Messages.proto
#	src/modules/Elsa.Quartz.EntityFrameworkCore.PostgreSql/Elsa.Quartz.EntityFrameworkCore.PostgreSql.csproj
#	src/modules/Elsa.Quartz/Elsa.Quartz.csproj
#	src/modules/Elsa.Workflows.Core/Contexts/StorageDriverContext.cs
#	src/modules/Elsa.Workflows.Runtime.ProtoActor/Extensions/ProtoOutputExtensions.cs
#	src/modules/Elsa.Workflows.Runtime/Activities/ExecuteWorkflow.cs
#	src/modules/Elsa.Workflows.Runtime/Features/WorkflowRuntimeFeature.cs
#	src/modules/Elsa.Workflows.Runtime/Handlers/ResumeExecuteWorkflowActivity.cs
#	src/modules/Elsa.Workflows.Runtime/HostedServices/WorkflowInboxCleanupHostedService.cs
#	src/modules/Elsa.Workflows.Runtime/Services/DefaultWorkflowRuntime.cs
#	test/component/Elsa.Workflows.ComponentTests/Scenarios/ExecuteWorkflows/ExecuteWorkflowsTests.cs
#	test/component/Elsa.Workflows.ComponentTests/Scenarios/ExecuteWorkflows/Workflows/MainWorkflow.cs
#	test/component/Elsa.Workflows.ComponentTests/Scenarios/ExecuteWorkflows/Workflows/SubroutineWorkflow.cs
#	test/integration/Elsa.Workflows.IntegrationTests/Scenarios/WorkflowCancellation/ProtoActorTests.cs
2025-03-10 15:13:26 +02:00
Sipke Schoorstra b7cd6e00a8
Add enh/* branch pattern to workflow triggers
This update ensures that the workflow is triggered for branches following the `enh/*` naming convention. It aligns with existing patterns like `feat/*` and `perf/*`, improving consistency in branch handling.
2025-03-08 16:18:50 +01:00
Sipke Schoorstra 05bfebd4d1
Add 'feat/*' branch pattern to workflow triggers
This update ensures that feature branches are included in the workflow triggers, improving automation coverage. It aligns the workflow configuration with the branching strategy.
2025-02-22 21:29:11 +01:00
Sipke Schoorstra 7084675a5c Add 'enh/*' branch to GitHub Actions workflow
This update ensures that branches following the 'enh/*' naming convention are included in the workflow. It aligns with existing branch patterns like 'feature/*' to maintain consistency in automation coverage.
2025-02-17 19:04:42 +01:00
Sipke Schoorstra 9aec0f0579 Update base version and fix branch matching logic
Updated the base_version to 3.4.0 to align with the latest release. Adjusted the branch matching logic to use 'origin/main' instead of the specific 'origin/patch/3.3.2' to improve maintainability and adaptability.
2025-02-06 21:06:41 +01:00
Sipke Schoorstra 9e395c2bce Update branch check in release workflow
Replaces the hardcoded branch reference `patch/3.3.2-rc2` with `patch/3.3.2` to align with the proper naming convention. This ensures the workflow correctly identifies the intended branch during release events.
2025-02-06 18:40:03 +01:00
Sipke Schoorstra 3800db783a Update branch filter in release condition for GitHub Actions
Replaced 'origin/main' with 'origin/patch/3.3.2-rc2' in the workflow's branch filter. This ensures the release process targets the correct branch during specific GitHub events.
2025-02-06 18:24:01 +01:00
Sipke Schoorstra 1081960e6d Add 'patch/*' branch to workflow triggers
Included 'patch/*' as a trigger for the GitHub Actions workflow to ensure automated processes cover patch branches. This aligns with the existing structure for branch-specific workflows.
2025-02-06 17:09:56 +01:00
Marius Vasile Vușcan 29a8f4367d
Updated deprecated artifacts 2025-02-06 16:28:29 +02:00
Marius Vasile Vușcan 9bd41f1f11
Updated deprecated artifact 2025-02-06 16:07:58 +02:00
Marko Lahma 6945eb191a Upgrade to NUKE 9.0.4 and fix automatic workflow generation 2025-01-26 19:29:19 +02:00
Sipke Schoorstra adea7fa666
Update and rename doc.md to documentation.md 2025-01-24 23:29:18 +01:00
Sipke Schoorstra d373b24d15
Update performance.md 2025-01-24 23:28:55 +01:00
Sipke Schoorstra cbe0cccbcd
Delete .github/ISSUE_TEMPLATE/test.md 2025-01-24 23:25:30 +01:00
Sipke Schoorstra bb2456595d
Update and rename enhancement.md to improvement.md 2025-01-24 23:22:13 +01:00
Sipke Schoorstra 8f36d4c871
Update test.md 2025-01-24 23:21:42 +01:00
Sipke Schoorstra 6b6b081b66
Update and rename chore.md to task.md 2025-01-24 23:21:12 +01:00
Sipke Schoorstra 157927dc95
Update performance.md 2025-01-24 23:20:26 +01:00
Sipke Schoorstra b17240bafe
Update feature_request.md 2025-01-24 23:20:10 +01:00
Sipke Schoorstra 8e468e343c
Update doc.md 2025-01-24 23:19:30 +01:00
Sipke Schoorstra 8d443aed62
Update chore.md 2025-01-24 23:19:15 +01:00
Sipke Schoorstra 1b022d34c8
Update bug_report.md 2025-01-24 23:18:57 +01:00
Sipke Schoorstra 941ce429f1
Update enhancement.md 2025-01-24 23:18:42 +01:00
Sipke Schoorstra 2459b56fd3
Update bug_report.md 2025-01-24 23:17:50 +01:00
Sipke Schoorstra 48bd06ecc7 Update base version to 3.3.2 in GitHub workflow
Incremented the `base_version` from 3.3.1 to 3.3.2 in the GitHub Actions workflow configuration. This ensures alignment with the updated versioning for release management.
2025-01-24 23:08:42 +01:00
Sipke Schoorstra 184b159c6f Bump base version to 3.3.1 in workflow configuration 2025-01-24 14:22:16 +01:00
Sipke Schoorstra d31661926d Simplify activity context handling in workflows.
Replaced `GetActiveChildren` with a direct `Children` property in `Flowchart.cs` to streamline logic. Removed redundant `GetDescendents`, `GetActiveChildren`, and `GetChildren` methods from `ActivityExecutionContextExtensions.cs`. Also updated GitHub workflows to allow performance-related branches.
2025-01-20 18:29:13 +01:00
Sipke Schoorstra 95a5986b52
Create dependabot.yml 2025-01-16 20:45:00 +01:00
Marius Vasile Vușcan 83b43f8daf
update 2025-01-14 12:30:37 +02:00
Sipke Schoorstra 60db7cb964 Disable multitenancy and streamline NuGet publishing workflow.
Multitenancy is now disabled by default in `Program.cs` to simplify configuration. Additionally, removed the `publish_preview_nuget` step and refined conditions for `publish_nuget` to improve the workflow and align with the release process.
2025-01-11 19:55:06 +01:00
Sipke Schoorstra e39f671bcc Update release types in GitHub Actions workflow
Added 'published' to the release type triggers in the packages.yml file. This ensures workflows are triggered for both prereleased and published release events.
2024-12-21 08:37:38 +01:00
Robin Sue dae77709d4 Add .NET 9 to actions 2024-12-10 21:06:42 +01:00
Sipke Schoorstra a2448523a9
Fix race condition and add rate limiting to bookmark queue processing (#6187)
* Fix race condition and add rate limiting to bookmark queue processing

Introduce rate-limited function invocation for bookmark queue processing using ThrottleDebounce library to optimize performance. Update related classes and interfaces to support asynchronous and cancellation-aware operations, improving system responsiveness. Adjust logging to provide more detailed information during bookmark queue handling.

* Enable workflows on bug branches

This change updates the GitHub Actions workflow configuration to trigger on branches with the 'bug/*' pattern. This allows for automated actions on bug fix branches alongside the main branch, improving development and testing processes.
2024-12-07 17:34:10 +01:00
Sipke Schoorstra 692937d7d7
Enhance Multitenancy with Runtime Tenant Management and Task Handling (#6173)
* Work in progress: Add DefaultTenantService for tenant management

Introduce `DefaultTenantService` and its corresponding interface `ITenantService` to manage tenant operations such as finding, getting, and listing tenants. Update `MultitenantBackgroundService` to utilize `DefaultTenantService` for handling tenant lifecycle events. This enhancement standardizes tenant operations and improves the maintainability of the multitenancy feature.

* WIP

* Add multitenancy event handlers and task interfaces

Implemented new interfaces IBackgroundTaskStarter and ITaskExecutor to manage task lifecycle events efficiently. Introduced new classes such as RunBackgroundTasks, RunStartupTasks, and StartRecurringTasks for handling tenant activation and deactivation events. Modified TaskExecutor to implement these interfaces and adjusted tenant registration logic to invoke these new handlers.

* Refactor multitenancy and task management services.

Remove background and recurring task runners, and integrate tenant activation and deactivation into the multitenancy feature. Enable multitenancy in the server application and create a new service for tenant activation and deactivation. This refactor simplifies the management of tenant-specific tasks and enhances the modularity of the platform.

* Refactor background service to use startup tasks

Replaced hosted service implementation with startup tasks for executing multi-tenant tasks and EF Core migrations. Introduced `PriorityAttribute` to manage task execution order, ensuring migrations run before other services that require database access. This simplifies tenant activation with an ordered task execution and removes redundant classes.

* Refactor MultitenancyFeature service registrations

Reorganized service registrations for better clarity and maintainability. Changed the registration of some services to use factory delegates for retrieving existing services to ensure correct dependencies. This refactor improves the flexibility of the tenant lifecycle event handling.

* Update V3_3 migration files

* Add tenant management endpoints and enhance tenant handling

Implemented tenant management endpoints including Add, Get, List, and Update. Enhanced tenant handling by introducing configuration and store-based providers, and improved error logging for tenant updates. Adjusted various internal functionalities to better support multitenancy features through different persistence providers.

* Implement tenant deletion endpoint and refactor migration setup.

Introduce a new API endpoint to handle tenant deletions while providing appropriate responses based on successful or unsuccessful attempts. Refactor migration handling by replacing startup tasks with hosted services across various modules to streamline the migration execution process.

* Add and integrate ConfigurationJsonConverter

Introduce a `ConfigurationJsonConverter` to handle JSON serialization and deserialization of `IConfiguration` objects. This change centralizes configuration serialization logic, leading to cleaner and more maintainable code. Updated various parts of the codebase to use the new serialization utility, ensuring a consistent approach throughout the application.

* Refactor JSON conversion and update tenant endpoint.

Removed unused workflow references and streamlined JSON handling in `ConfigurationJsonConverter`. Simplified tenant ID handling by removing `IIdentityGenerator` and setting a default value for `UpdatedTenant.Id`.

* Add logging for cancelled recurring tasks

Integrated ILogger to log information when a recurring task is canceled due to an OperationCanceledException. This change enhances troubleshooting by providing clearer insights into task cancellations and their underlying reasons, improving maintainability and observability of the task execution process.

* Disable multitenancy support and adjust default Tenant ID.

Multitenancy is now disabled by setting 'useMultitenancy' to false in the configuration. Additionally, the default Tenant's ID has been changed from null to an empty string to prevent potential null reference issues.

* Remove MultitenantHostedService abstraction file

The MultitenantHostedService.cs file was removed as it is no longer necessary. Its responsibilities have likely been refactored or integrated into another service, indicating a simplification or restructuring of the multitenancy handling in the codebase.

* Rename PriorityAttribute to OrderAttribute for clarity.

This change improves the clarity of the code by renaming PriorityAttribute to OrderAttribute, reflecting its actual purpose. All occurrences of the attribute in the codebase have been updated accordingly to maintain consistency. This makes the intent of the code more understandable for future maintenance and development.

* Fix message key retrieval in ProduceMessage activity

Update the ProduceMessage activity to use GetOrDefault for retrieving the message key. This change ensures that a null key is used if no explicit key is provided or if the key is empty or whitespace, preventing potential errors during message production.

* Refactor multitenancy and scheduling services.

Removed DefaultTenantContextInitializer interface and class, refactored tenant activation/deactivation to use try-catch logging, and updated tenant context handling to use IDisposable for context push. New activities and workflows added in Elsa.Server.Web, and scheduling services enhanced to schedule jobs with explicit job keys and groups. Also, adjusted configurations to enable multitenancy, providing improved maintainability and flexibility.

* Remove Example1 activities and disable multitenancy

Deleted Example1Activity, Example1Workflow, and FirstActivity classes to clean up unused code and simplify the codebase. Disabled multitenancy by setting useMultitenancy to false, likely to streamline configuration and resource utilization.

* Fix and normalize URL path concatenation.

Ensure that the base URLs in both base path providers consistently end with a forward slash. This normalization prevents potential issues with endpoint routing and path concatenation, improving overall URL construction robustness.
2024-12-03 15:07:55 +01:00
Sipke Schoorstra bb8b0551f4 Disable SonarCloud analysis steps in workflow
Commented out steps related to SonarCloud analysis to temporarily disable them. This includes setting up JDK, installing necessary tools, and running SonarCloud commands for code analysis and coverage.
2024-11-21 19:17:35 +01:00
Sipke Schoorstra 50e23ba738 Add workflow to close stale issues and PRs
Introduced a new GitHub Actions workflow to automatically mark issues and PRs as stale and close them after a period of inactivity. This helps in managing the project's issue tracker by ensuring old, inactive issues are addressed or closed.
2024-11-12 11:19:09 +01:00
Sipke Schoorstra f626bff2d5 Handle prereleased action in GitHub workflow
Update the workflow to handle prereleases by modifying the conditions to include "prereleased" in addition to "published" for the "release" event. This ensures that the workflow functions correctly for both prereleases and official releases.
2024-11-12 10:58:50 +01:00
Sipke Schoorstra 6ed6c8a30e Merge remote-tracking branch 'origin/patch/3.2.x' into blueberry 2024-11-05 15:46:02 +01:00
Sipke Schoorstra ab7fcbc334 Update branch check condition in GitHub Actions workflow
Replaced the branch check from "patch/3.2.x" to "main" to ensure the correct branch is targeted during the release process. This change improves the accuracy of the conditional checks within the workflow.
2024-10-31 20:17:25 +01:00
Sipke Schoorstra c3b6decf66 Update default version to 3.2.2 in workflows
Changed the fallback version from 3.2.1-preview to 3.2.2-preview in the GitHub Actions workflow configuration. This ensures that new preview versions are correctly labeled with the latest version number.
2024-10-25 22:49:49 +02:00
Sipke Schoorstra b8f2bb5834 Update branch trigger in GitHub workflow
Changed the workflow trigger branch from 'blueberry' to 'main'. This ensures the workflow runs on pushes to the 'main' branch, aligning with our new branching strategy.
2024-10-12 18:52:01 +02:00