Project

General

Profile

Actions

Feature #5327

closed

one modulepar to differentiate between nightly and latest

Added by osmith over 2 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
11/25/2021
Due date:
% Done:

100%

Spec Reference:

Description

New Osmocom releases were just made, and related modulepar variables needed to be adjusted/removed in osmo-ttcn3-hacks as well as docker-playground:

docker-playground.git: osmo-ttcn3-hacks.git: How about, instead of adding new variables for each project and dropping them again in the next release, we do:
  • create one modulepar variable that indicates whether nightly or latest is used (in a libarary, so it's available in all testsuites)
  • adjust docker-playground to set this for all projects once
  • with each new release, we only drop the if() {} around statements that were exclusively running for nightly, but keep the variable
if (mp_is_nightly) {
   extra code
}

Then we need no changes in docker-playground.git after the release, and less changes in osmo-ttcn3-hacks.git.

Thoughts?

Actions #1

Updated by laforge over 2 years ago

  • Status changed from New to Feedback

looks good to me.

Would be good if that modulepar could somehow be set automatically based on the jenkins job name or something like that, so we don't have to hav sed statements in each job, but only in one location.

One could even go further and introduce a modulepar that specifies the 'build', like a string or an enum that indicates "nightly", 'latest" or in the future "2021q4" or the like. Every time we execute a testsuite, this modulepar gets set by some "magic" and the tests can adjust their behavior, if they so choose.

Actions #2

Updated by pespin over 2 years ago

We can have a separate ttcn3 file/module with that module parameter and a few APIs to simpliify/unify checks.
mp_version_name := "latest"

boolean Osmo_Version.is_nightly();
boolean Osmo_Version.is_latest();
etc.

Bear in mind we'll need to keep some seds since sometimes the changes are required in osmocom program config file, eg osmo-bsc.cfg.

Actions #3

Updated by osmith over 2 years ago

  • Status changed from Feedback to In Progress
  • % Done changed from 0 to 90

pespin wrote in #note-2:

Bear in mind we'll need to keep some seds since sometimes the changes are required in osmocom program config file, eg osmo-bsc.cfg.

Ah right, so there might be some docker-playground patches even with this change. (Still useful though.)

Implemented based on the suggestions above. I've put it in Misc_Helpers since it fits there too IMHO and we already have that available in most/all? modules.

First user:
Actions #4

Updated by osmith over 2 years ago

laforge wrote in #note-1:

Would be good if that modulepar could somehow be set automatically based on the jenkins job name or something like that, so we don't have to hav sed statements in each job, but only in one location.

I just read that comment again. Lines like

write_osmocom_stack_version "$VOL_BASE_DIR/bsc-tester/BSC_Tests.cfg" 

are added to each ttcn3-*/*jenkins*.sh.

I think we'd need to have an extra function call in any case in the jenkins.sh file, or else the only place to put that would be in "network_create" possibly. But that would be a hack since the function is for another purpose. The path to the cfg file could be auto-detected (find all .cfg files in VOL_BASE_DIR) if preferred... but I think having that explicitly stated doesn't hurt either.

Actions #5

Updated by osmith over 2 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)