Skip to content

Conversation

@Knerio
Copy link
Member

@Knerio Knerio commented Dec 18, 2025

close #779

@Knerio Knerio requested a review from Taucher2003 December 18, 2025 12:56
@Knerio Knerio self-assigned this Dec 18, 2025
@Knerio
Copy link
Member Author

Knerio commented Dec 18, 2025

Maybe we should save the last x execution times for comparison? @raphael-goetz @Taucher2003 what do you think?

@github-actions
Copy link

GitLab Pipeline Action

General information

Link to pipeline: https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2222278893

Status: Failed
Duration: 3 minutes

Job summaries

rspec: [ee]

Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/12484566277/artifacts/tmp/coverage/index.html
Test summary available at https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2222278893/test_report
Finished in 0.00009 seconds (files took 5.59 seconds to load)
0 examples, 0 failures, 233 errors occurred outside of examples
Line Coverage: 71.73% (2174 / 3031)
section_end:1766062838:step_script
�[0Ksection_start:1766062838:upload_artifacts_on_failure
�[0K�[0K�[36;1mUploading artifacts for failed job�[0;m�[0;m
�[32;1mUploading artifacts...�[0;m
rspec.xml: found 1 matching artifact files and directories�[0;m
Uploading artifacts as "junit" to coordinator... 201 Created�[0;m correlation_id�[0;m=9afed82843386c0d-DFW id�[0;m=12484566277 responseStatus�[0;m=201 Created token�[0;m=6b_xFxxBo
section_end:1766062840:upload_artifacts_on_failure
�[0Ksection_start:1766062840:cleanup_file_variables
�[0K�[0K�[36;1mCleaning up project directory and file based variables�[0;m�[0;m
section_end:1766062840:cleanup_file_variables
�[0K
�[31;1mERROR: Job failed: exit code 1
�[0;m

rspec: [ce]

Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/12484566272/artifacts/tmp/coverage/index.html
Test summary available at https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2222278893/test_report
Finished in 0.00009 seconds (files took 4.62 seconds to load)
0 examples, 0 failures, 222 errors occurred outside of examples
Line Coverage: 71.62% (2044 / 2854)
section_end:1766062831:step_script
�[0Ksection_start:1766062831:upload_artifacts_on_failure
�[0K�[0K�[36;1mUploading artifacts for failed job�[0;m�[0;m
�[32;1mUploading artifacts...�[0;m
rspec.xml: found 1 matching artifact files and directories�[0;m
Uploading artifacts as "junit" to coordinator... 201 Created�[0;m correlation_id�[0;m=9afed7fb620df849-ATL id�[0;m=12484566272 responseStatus�[0;m=201 Created token�[0;m=6b_FHpUf5
section_end:1766062832:upload_artifacts_on_failure
�[0Ksection_start:1766062832:cleanup_file_variables
�[0K�[0K�[36;1mCleaning up project directory and file based variables�[0;m�[0;m
section_end:1766062832:cleanup_file_variables
�[0K
�[31;1mERROR: Job failed: exit code 1
�[0;m

rubocop

724 files inspected, no offenses detected


class AddLastExecutionDurationToFlows < Code0::ZeroTrack::Database::Migration[1.0]
def change
add_column :flows, :last_execution_duration, :bigint, null: true, default: nil
Copy link
Member

Choose a reason for hiding this comment

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

A single field is not going to work for our requirements. We need to store each execution duration (well, more like a daily aggregate of all executions that day) and can't store only the last execution duration. This is going to be used for usage quotas, so we need to know how much time was used for a given time span.

We definitely also need to store the time in relation to the runtime because not every runtime is subject to usage quotas. Not sure if we need granularity for each flow or if we should limit the granularity to projects.

Copy link
Member Author

Choose a reason for hiding this comment

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

So we should store every execution time of every flow? Or just in the last 14 days or so?

@Knerio Knerio marked this pull request as draft December 18, 2025 19:16
@Knerio Knerio changed the title Add last execution duration to flow Add execution durations to flow Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement runtime usage service

3 participants