@@ -667,28 +667,35 @@ def __build_app_deploy_strategy(self, location, model_apps, existing_app_refs, s
667
667
existing_plan_hash = self .__get_file_hash (plan_path )
668
668
if model_src_hash == existing_src_hash :
669
669
if model_plan_hash == existing_plan_hash :
670
- # If model hashes match existing hashes, the application did not change.
671
- # Unless targets were added, there's no need to redeploy.
672
- model_targets = dictionary_utils .get_element (app_dict , TARGET )
673
- model_targets_list = alias_utils .create_list (model_targets , 'WLSDPLY-08000' )
674
- model_targets_set = Set (model_targets_list )
675
-
676
- existing_app_targets = dictionary_utils .get_element (existing_app_ref , 'target' )
677
- existing_app_targets_set = Set (existing_app_targets )
678
-
679
- if existing_app_targets_set .issuperset (model_targets_set ):
680
- self .__remove_app_from_deployment (model_apps , app )
670
+ if not (os .path .isabs (src_path ) and os .path .isabs (model_src_path ) and
671
+ FileUtils .getCanonicalPath (src_path ) == FileUtils .getCanonicalPath (model_src_path )):
672
+ # If model hashes match existing hashes, the application did not change.
673
+ # Unless targets were added, there's no need to redeploy.
674
+ # If it is an absolute path, there is nothing to compare so assume redeploy
675
+ model_targets = dictionary_utils .get_element (app_dict , TARGET )
676
+ model_targets_list = alias_utils .create_list (model_targets , 'WLSDPLY-08000' )
677
+ model_targets_set = Set (model_targets_list )
678
+
679
+ existing_app_targets = dictionary_utils .get_element (existing_app_ref , 'target' )
680
+ existing_app_targets_set = Set (existing_app_targets )
681
+
682
+ if existing_app_targets_set .issuperset (model_targets_set ):
683
+ self .__remove_app_from_deployment (model_apps , app )
684
+ else :
685
+ # Adjust the targets to only the new targets so that existing apps on
686
+ # already targeted servers are not impacted.
687
+ adjusted_set = model_targets_set .difference (existing_app_targets_set )
688
+ adjusted_targets = ',' .join (adjusted_set )
689
+ app_dict ['Target' ] = adjusted_targets
690
+
691
+ # For update case, the sparse model may be just changing targets, therefore without sourcepath
692
+
693
+ if app_dict ['SourcePath' ] is None and src_path is not None :
694
+ app_dict ['SourcePath' ] = src_path
681
695
else :
682
- # Adjust the targets to only the new targets so that existing apps on
683
- # already targeted servers are not impacted.
684
- adjusted_set = model_targets_set .difference (existing_app_targets_set )
685
- adjusted_targets = ',' .join (adjusted_set )
686
- app_dict ['Target' ] = adjusted_targets
687
-
688
- # For update case, the sparse model may be just changing targets, therefore without sourcepath
689
-
690
- if app_dict ['SourcePath' ] is None and src_path is not None :
691
- app_dict ['SourcePath' ] = src_path
696
+ self .logger .info ('WLSDPLY-09336' , src_path ,
697
+ class_name = self ._class_name , method_name = _method_name )
698
+ stop_and_undeploy_app_list .append (versioned_name )
692
699
else :
693
700
# updated deployment plan
694
701
stop_and_undeploy_app_list .append (versioned_name )
0 commit comments