Skip to content

Commit

Permalink
Deactivate spec registration with id option
Browse files Browse the repository at this point in the history
  • Loading branch information
seokho-son committed Apr 5, 2024
1 parent da9f33c commit 005f835
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 28 deletions.
15 changes: 8 additions & 7 deletions src/core/mcir/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -1585,7 +1585,7 @@ func LoadCommonResource() (common.IdList, error) {
value, ok := specMap.Load(searchKey)
if ok {
spiderSpec := value.(SpiderSpecInfo)
log.Info().Msgf("Found spec in the map: %s", spiderSpec.Name)
//log.Info().Msgf("Found spec in the map: %s", spiderSpec.Name)
tumblebugSpec, errConvert := ConvertSpiderSpecToTumblebugSpec(spiderSpec)
if errConvert != nil {
log.Error().Err(errConvert).Msg("Cannot ConvertSpiderSpecToTumblebugSpec")
Expand All @@ -1599,11 +1599,12 @@ func LoadCommonResource() (common.IdList, error) {
}

} else {
log.Info().Msgf("Not Found spec in the map: %s", searchKey)
_, errRegisterSpec = RegisterSpecWithCspSpecName(common.SystemCommonNs, &specReqTmp, true)
if errRegisterSpec != nil {
log.Error().Err(errRegisterSpec).Msg("RegisterSpec WithCspSpecName failed")
}
errRegisterSpec = fmt.Errorf("Not Found spec from the fetched spec list: %s", searchKey)
log.Err(errRegisterSpec).Msgf("")
// _, errRegisterSpec = RegisterSpecWithCspSpecName(common.SystemCommonNs, &specReqTmp, true)
// if errRegisterSpec != nil {
// log.Error().Err(errRegisterSpec).Msg("RegisterSpec WithCspSpecName failed")
// }
}

if errRegisterSpec != nil {
Expand Down Expand Up @@ -1657,7 +1658,7 @@ func LoadCommonResource() (common.IdList, error) {
go func(i int, row []string, lenImages int) {
defer wait.Done()
// RandomSleep for safe parallel executions
common.RandomSleep(0, lenImages/8)
common.RandomSleep(0, lenImages/5)
imageReqTmp := TbImageReq{}
// row0: ProviderName
// row1: connectionName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ EOF
fi

# for Cloud Connection Config Info
echo "[Cloud Connection Config] ${CONN_CONFIG[$INDEX,$REGION]}"
resp=$(
curl -H "${AUTH}" -sX POST http://$SpiderServer/spider/connectionconfig -H 'Content-Type: application/json' -d @- <<EOF
{
Expand Down Expand Up @@ -168,26 +167,6 @@ for ((cspi = 1; cspi <= INDEXX; cspi++)); do
echo ""
done

echo -e "${BOLD}"
while true; do
read -p 'Confirm the above configuration. Do you want to proceed ? (y/n) : ' CHECKPROCEED
echo -e "${NC}"
case $CHECKPROCEED in
[Yy]*)
break
;;
[Nn]*)
echo
echo "Cancel [$0 $@]"
echo "See you soon. :)"
echo
exit 1
;;
*)
echo "Please answer yes or no."
;;
esac
done

if [ "${INDEX}" == "0" ]; then
echo "[Parallel execution for all CSP regions]"
Expand Down

0 comments on commit 005f835

Please sign in to comment.