Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARGO-4893 Issue during excluding metric egi.cloud.openstack-vm from fedcloud SITES #429

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

cthermolia-grnet
Copy link
Collaborator

@cthermolia-grnet cthermolia-grnet commented Dec 10, 2024

We modified recomputations. Before calculating previous status
the dataset is passed from an CalcRecomputation operation that checks if the metric is in exclude period and changes it status
to exclude if yes.
Then the dataset wil be passed to the CalcPrevStatus operation where the previous status and timestamp are calculated.
With this way we simplify calculations .

--run.date: 2025-02-01
//we test if for a period extending today all the today data has EXCLUDED status
// exclude period: "start_time": "2025-02-01T00:00:00Z" - "end_time": "2025-02-02T00:00:00Z",
//the exclude period extends today , so all expected data should have EXCLUDED status. note tha
//the first elements should keep it's previous status MISSING as no previous data exist in dataset

    testRecomputationData(env, "/test/recomputations/recomp_all.json", "/test/recomputations/initialMetricData.json", 
    "/test/recomputations/expRecomputationData_1.json");

--run.date: 2025-02-02
//we test if for a period extending today all the today data has EXCLUDED status and previous state is correctly
EXCLUDED as period extends today
//the initial dataset has also yesterday data to check if previous status is correctly calculated
// exclude period: "start_time": "2025-02-01T00:00:00Z" - "end_time": "2025-02-02T00:00:00Z",
//the exclude period extends today , so all expected data should have EXCLUDED status. note tha
//the first elements should have is previous status EXCLUDED as the exclude period includes yesterday

    testRecomputationData(env, "/test/recomputations/recomp_all.json", "/test/recomputations/initialMetricData.json", 
    "/test/recomputations/expRecomputationData_2.json");

   //we test the case the period starts at today and ends inside today , so the data inside the period are
    //correctly excluded and the data after the period are correctly keep their status.
    // exclude period: "start_time": "2025-02-01T00:00:00Z"- "end_time": "2025-02-02T04:00:00Z",
    //the exclude period  starts at the today and ends inside today , so  all data  before the end of the exclude period should 
    //have EXCLUDED status.
    // and all the data after the end of exclude period should keep their status.
    //as no data  exists with timestamp exactly the end of the exclude period we need to
    // add one data element to define that the regular period starts , with status
    // the  one of the element before had initially

    testRecomputationData(env, "/test/recomputations/recomp_all_3.json", "/test/recomputations/initialMetricData_3.json", 
    "/test/recomputations/expRecomputationData_3.json");
    
    //we test the case the  period starts and ends inside  today
    // so the data inside the period should be correctly excluded and the data before and after the period  correctly keep their 
    //status.
   // exclude period:    "start_time": "2025-02-02T02:30:00Z" - "end_time": "2025-02-02T04:30:00Z",

    //as no data  exists with timestamp exactly at the start of the exclude period we need to
    // add one data element to define that the exclude period starts.

    //as no data  exists with timestamp exactly the end of the exclude period we need to
    // add one data element to define that the regular period starts , with status
    // the  one of the element before had initially

    testRecomputationData(env, "/test/recomputations/recomp_all_4.json", "/test/recomputations/initialMetricData_4.json", 
    "/test/recomputations/expRecomputationData_4.json");
    
    //we test the case that no recomputation exists, data should have their initial statuses
    
   testRecomputationData(env, "/test/recomputations/recomp_all_6.json", "/test/recomputations/initialMetricData_4.json", 
   "/test/recomputations/expRecomputationData_6.json");
   
   // //we test the case the  period starts before today and ends inside  today
   // so  all data  before the end of the exclude period should have EXCLUDED status.
   // exclude period:         "start_time": "2025-02-01T00:00:00Z" - "end_time": "2025-02-02T02:00:00Z",
   // and all the data after the end of exclude period should keep their status.
   //as no data  exists with timestamp exactly the end of the exclude period we need to
   // add one data element to define that the regular period starts , with status
   // the  one of the element before had initially

    testRecomputationData(env, "/test/recomputations/recomp_all_7.json", "/test/recomputations/initialMetricData_5.json", 
    "/test/recomputations/expRecomputationData_7.json");
    
     // //we test the case the  period starts inside today and ends tomorrow
     // so  all data  after the period starts should have EXCLUDED status.
    // exclude period:   "start_time": "2025-02-02T21:00:00Z" -     "end_time": "2025-02-03T00:00:00Z",
    // as no data  exists with timestamp exactly the start of the exclude period add one data element to define that the regular 
      period starts , with status

    testRecomputationData(env, "/test/recomputations/recomp_all_8.json", "/test/recomputations/initialMetricData_4.json", 
    "/test/recomputations/expRecomputationData_8.json");

@cthermolia-grnet cthermolia-grnet self-assigned this Dec 10, 2024
@cthermolia-grnet cthermolia-grnet force-pushed the checkMetricAr branch 2 times, most recently from e257465 to af11ef1 Compare December 18, 2024 11:43
@cthermolia-grnet cthermolia-grnet force-pushed the checkMetricAr branch 2 times, most recently from 6f30c36 to 14ad32f Compare February 14, 2025 08:03
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.

1 participant