Skip to content

Commit

Permalink
Setting the requestor name without any modifications while saving a run
Browse files Browse the repository at this point in the history
Signed-off-by: Aashir Siddiqui <aashir_sidiki@hotmail.com>
  • Loading branch information
aashir21 committed Nov 28, 2024
1 parent 352eda2 commit de3e066
Showing 1 changed file with 1 addition and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,28 +242,7 @@ private boolean storeRun(String runName, SubmitRunRequest runRequest) throws Dyn
} else {
otherRunProperties.put(runPropertyPrefix + ".group", UUID.randomUUID().toString());
}

//Putting this in as a feature flag, checking if CPS property is set
//If set to true then it will allow it to have mixed characters, for e.g,
// Galasadelivery@ibm.com. Else it would set everything to lowercase by default

boolean isMixedCaseRequestorAllowed = false;
try {
String propValue ;
propValue = cps.getProperty("runs.requestor", "is.mixed.case");
if ("true".equals(propValue)) {
isMixedCaseRequestorAllowed = true;
}
} catch(ConfigurationPropertyStoreException ex){
// swallow the exception.
}
String storedRequestor;
if (isMixedCaseRequestorAllowed) {
storedRequestor = requestor ;
} else {
storedRequestor = requestor.toLowerCase();
}
otherRunProperties.put(runPropertyPrefix + ".requestor", storedRequestor);
otherRunProperties.put(runPropertyPrefix + ".requestor", requestor);

if (sharedEnvironmentPhase != null) {
otherRunProperties.put(runPropertyPrefix + ".shared.environment", "true");
Expand Down

0 comments on commit de3e066

Please sign in to comment.