Subversion Repositories DevTools

Rev

Rev 7169 | Rev 7186 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7169 Rev 7176
Line 229... Line 229...
229
        //  Diagnostic output
229
        //  Diagnostic output
230
        //  Having issues with memory usage
230
        //  Having issues with memory usage
231
        //
231
        //
232
        long totalMem = Runtime.getRuntime().totalMemory();
232
        long totalMem = Runtime.getRuntime().totalMemory();
233
        long freeMem = Runtime.getRuntime().freeMemory();
233
        long freeMem = Runtime.getRuntime().freeMemory();
234
        mLogger.error("Memory Usage: Total: {}, Free: {}, Used: {}", totalMem, freeMem, totalMem - freeMem);
234
        mLogger.warn("Memory Usage: Total: {}, Free: {}, Used: {}", totalMem, freeMem, totalMem - freeMem);
235
        
235
        
236
        mBuildCollection.clear();
236
        mBuildCollection.clear();
237
        mPackageCollection.clear();
237
        mPackageCollection.clear();
238
        mPackageCollectionRipple.clear();
238
        mPackageCollectionRipple.clear();
239
        mPackageCollectionTest.clear();
239
        mPackageCollectionTest.clear();
Line 414... Line 414...
414
            // Process test builds - they are in their own collection
414
            // Process test builds - they are in their own collection
415
            phase.setPhase("TestBuilds");
415
            phase.setPhase("TestBuilds");
416
            for (Iterator<Package> it = mPackageCollectionTest.iterator(); it.hasNext(); )
416
            for (Iterator<Package> it = mPackageCollectionTest.iterator(); it.hasNext(); )
417
            {
417
            {
418
                Package p = it.next();
418
                Package p = it.next();
419
                mLogger.info("planRelease package test build {}", p.mAlias);
419
                mLogger.debug("planRelease package test build {}", p.mAlias);
420
 
420
 
421
                //
421
                //
422
                //    Cannot test build an SDK based package or a Pegged Package
422
                //    Cannot test build an SDK based package or a Pegged Package
423
                //        Remove the test build request from the database
423
                //        Remove the test build request from the database
424
                //        Send a warning email
424
                //        Send a warning email
Line 426... Line 426...
426
                if(p.mIsPegged || p.mIsSdk)
426
                if(p.mIsPegged || p.mIsSdk)
427
                {
427
                {
428
                    String reason;
428
                    String reason;
429
                    reason = (p.mIsPegged) ? "Pegged" : "SDK Based";
429
                    reason = (p.mIsPegged) ? "Pegged" : "SDK Based";
430
 
430
 
431
                    mLogger.error("planRelease Daemon Instruction (testBuild) of {} package deleted: {}", reason, p.mAlias);
431
                    mLogger.warn("planRelease Daemon Instruction (testBuild) of {} package deleted: {}", reason, p.mAlias);
432
                    mReleaseManager.markDaemonInstCompleted( p.mTestBuildInstruction );
432
                    mReleaseManager.markDaemonInstCompleted( p.mTestBuildInstruction );
433
                    emailRejectedDaemonInstruction("Cannot 'Test Build' a " + reason + " package",p);
433
                    emailRejectedDaemonInstruction("Cannot 'Test Build' a " + reason + " package",p);
434
                }
434
                }
435
 
435
 
436
                // force patch for test build numbering
436
                // force patch for test build numbering
Line 794... Line 794...
794
                    if(p.mIsPegged || p.mIsSdk)
794
                    if(p.mIsPegged || p.mIsSdk)
795
                    {
795
                    {
796
                        String reason;
796
                        String reason;
797
                        reason = (p.mIsPegged) ? "Pegged" : "SDK Based";
797
                        reason = (p.mIsPegged) ? "Pegged" : "SDK Based";
798
 
798
 
799
                        mLogger.error("planRelease Daemon Instruction of {} package deleted: {}", reason, p.mName);
799
                        mLogger.warn("planRelease Daemon Instruction of {} package deleted: {}", reason, p.mName);
800
                        mReleaseManager.markDaemonInstCompleted( p.mForcedRippleInstruction );
800
                        mReleaseManager.markDaemonInstCompleted( p.mForcedRippleInstruction );
801
                        emailRejectedDaemonInstruction("Cannot 'Ripple' a " + reason + " package",p);
801
                        emailRejectedDaemonInstruction("Cannot 'Ripple' a " + reason + " package",p);
802
 
802
 
803
                        p.mBuildFile = -8; 
803
                        p.mBuildFile = -8; 
804
                    }
804
                    }
Line 978... Line 978...
978
                    //
978
                    //
979
                    int buildImpact = 0;
979
                    int buildImpact = 0;
980
                    if (fullPlan.planTime != basicPlan.planTime &&  basicPlan.planTime  != 0) {
980
                    if (fullPlan.planTime != basicPlan.planTime &&  basicPlan.planTime  != 0) {
981
                        buildImpact = ((fullPlan.planTime - basicPlan.planTime) * 100) / (basicPlan.planTime);
981
                        buildImpact = ((fullPlan.planTime - basicPlan.planTime) * 100) / (basicPlan.planTime);
982
                    }
982
                    }
983
                    mLogger.error("Two plan selection: Basic:{} Full:{}, Impact:{}% Threshold:{}% Exceeded: {}", basicPlan.planTime,fullPlan.planTime, buildImpact, mPlanControl.mThreshold, buildImpact >= mPlanControl.mThreshold);
983
                    mLogger.warn("Two plan selection: Basic:{} Full:{}, Impact:{}% Threshold:{}% Exceeded: {}", basicPlan.planTime,fullPlan.planTime, buildImpact, mPlanControl.mThreshold, buildImpact >= mPlanControl.mThreshold);
984
 
984
 
985
                    if ( buildImpact >= mPlanControl.mThreshold )
985
                    if ( buildImpact >= mPlanControl.mThreshold )
986
                    {
986
                    {
987
                        //  BuildImpact too high
987
                        //  BuildImpact too high
988
                        //  Use the basic plan FOLLOWED by a plan that does not include
988
                        //  Use the basic plan FOLLOWED by a plan that does not include
989
                        //      Ripples done by the basic plan
989
                        //      Ripples done by the basic plan
990
                        //      WIPs/RIPPLES done in the course of doing the basic plan
990
                        //      WIPs/RIPPLES done in the course of doing the basic plan
991
                        mLogger.error("Use basic plan, then modified full plan");
991
                        mLogger.warn("Use basic plan, then modified full plan");
992
                        mBuildOrder.addAll(basicPlan.planCollection);
992
                        mBuildOrder.addAll(basicPlan.planCollection);
993
 
993
 
994
                        fullPlan = postRipplePlan("Full-Ripples", basicPlan, false);
994
                        fullPlan = postRipplePlan("Full-Ripples", basicPlan, false);
995
                        mBuildOrder.addAll(fullPlan.planCollection);
995
                        mBuildOrder.addAll(fullPlan.planCollection);
996
                        
996
                        
997
                    } else {
997
                    } else {
998
                        //  Use the full plan
998
                        //  Use the full plan
999
                        mLogger.error("Use full plan");
999
                        mLogger.warn("Use full plan");
1000
                        mBuildOrder.addAll(fullPlan.planCollection);
1000
                        mBuildOrder.addAll(fullPlan.planCollection);
1001
                    }
1001
                    }
1002
                } else if (!basicPlan.planCollection.isEmpty() ) {
1002
                } else if (!basicPlan.planCollection.isEmpty() ) {
1003
                    // Use the basic plan
1003
                    // Use the basic plan
1004
                    mLogger.error("Use basic plan");
1004
                    mLogger.warn("Use basic plan");
1005
                    mBuildOrder.addAll(basicPlan.planCollection);
1005
                    mBuildOrder.addAll(basicPlan.planCollection);
1006
                    
1006
                    
1007
                } else if ( !fullPlan.planCollection.isEmpty() ) {
1007
                } else if ( !fullPlan.planCollection.isEmpty() ) {
1008
                    // Use the full plan
1008
                    // Use the full plan
1009
                    mLogger.error("Use full plan");
1009
                    mLogger.warn("Use full plan");
1010
                    mBuildOrder.addAll(fullPlan.planCollection);
1010
                    mBuildOrder.addAll(fullPlan.planCollection);
1011
                    
1011
                    
1012
                } else {
1012
                } else {
1013
                    // Do not have a plan
1013
                    // Do not have a plan
1014
                    // May have tests requests
1014
                    // May have tests requests
1015
                    mLogger.error("Use NO plan");
1015
                    mLogger.warn("Use NO plan");
1016
                }
1016
                }
1017
                
1017
                
1018
                //
1018
                //
1019
                //  Now have a build order
1019
                //  Now have a build order
1020
                //  Allocate new version numbers
1020
                //  Allocate new version numbers
1021
                //      Examine packages with a buidLevel of zero
1021
                //      Examine packages with a buidLevel of zero
1022
                //  If we fail all of them then we can't build anything
1022
                //  If we fail all of them then we can't build anything
1023
                //
1023
                //
1024
                mLogger.error("Determine new version numbers");
1024
                mLogger.warn("Determine new version numbers");
1025
                Package build = ReleaseManager.NULL_PACKAGE;
1025
                Package build = ReleaseManager.NULL_PACKAGE;
1026
                for (Iterator<PlannedPackage> it = mBuildOrder.iterator(); it.hasNext(); )
1026
                for (Iterator<PlannedPackage> it = mBuildOrder.iterator(); it.hasNext(); )
1027
                {
1027
                {
1028
                    PlannedPackage pkg = it.next();
1028
                    PlannedPackage pkg = it.next();
1029
                    if (pkg.mBuildLevel != 0)
1029
                    if (pkg.mBuildLevel != 0)
Line 1094... Line 1094...
1094
                    mLogger.debug("Update mVersion: {}", build);
1094
                    mLogger.debug("Update mVersion: {}", build);
1095
                    if (build.mNextVersion != null)
1095
                    if (build.mNextVersion != null)
1096
                    {
1096
                    {
1097
                        mReleaseManager.claimVersion(build.mPid, build.mNextVersion + build.mExtension, mBaseline);
1097
                        mReleaseManager.claimVersion(build.mPid, build.mNextVersion + build.mExtension, mBaseline);
1098
                        build.mVersion = build.mNextVersion;
1098
                        build.mVersion = build.mNextVersion;
1099
                        mLogger.error("Update mVersion: {} to {}", build, build.mVersion);
1099
                        mLogger.warn("Update mVersion: {} to {}", build, build.mVersion);
1100
                    }
1100
                    }
1101
                
1101
                
1102
                    //
1102
                    //
1103
                    //  Ensure that the package we are about to build is present in the mPackageCollection as its
1103
                    //  Ensure that the package we are about to build is present in the mPackageCollection as its
1104
                    //  this list that is used to generate the build.xml file - that may be a bad way to do it , but ...
1104
                    //  this list that is used to generate the build.xml file - that may be a bad way to do it , but ...
Line 1121... Line 1121...
1121
                //  ie: They will not be built because one, or more, of their dependents is not buildable
1121
                //  ie: They will not be built because one, or more, of their dependents is not buildable
1122
                //
1122
                //
1123
                mLogger.warn("planBuildOrder process packages which are not ripple buildable");
1123
                mLogger.warn("planBuildOrder process packages which are not ripple buildable");
1124
 
1124
 
1125
                Package.resetCircularDependency (mPackageCollection);
1125
                Package.resetCircularDependency (mPackageCollection);
1126
                 for (ListIterator<BuildExclusion> it = mBuildExclusionCollection.listIterator(); it.hasNext(); )
1126
                for (ListIterator<BuildExclusion> it = mBuildExclusionCollection.listIterator(); it.hasNext(); )
1127
                 {
1127
                {
1128
                     BuildExclusion be = it.next();
1128
                    BuildExclusion be = it.next();
-
 
1129
                    
-
 
1130
                    //  Only process direct exclusions
-
 
1131
                    //      mBuildExclusionCollection is at this point based on relevant (direct and indirect) 
-
 
1132
                    //      excluded pv's in the database
-
 
1133
                    //
-
 
1134
                    if ( be.isARootCause() )
-
 
1135
                    {
1129
 
1136
 
1130
                     for (Iterator<Package> it1 = mPackageCollectionAll.iterator(); it1.hasNext(); )
1137
                        for (Iterator<Package> it1 = mPackageCollectionAll.iterator(); it1.hasNext(); )
1131
                     {
1138
                        {
1132
                         Package p = it1.next();
1139
                            Package p = it1.next();
1133
 
1140
 
1134
                         // ensure only root cause, non test build, build exclusions are excluded
-
 
1135
                         // mBuildExclusionCollection is at this point based on
-
 
1136
                         // relevant (direct and indirect) excluded pv's in the database
-
 
1137
                         
-
 
1138
                         // TODO - Do we need && p.mTestBuildInstruction == 0 && p.mForcedRippleInstruction == 0
1141
                            // TODO - Do we need && p.mTestBuildInstruction == 0 && p.mForcedRippleInstruction == 0
1139
                         
-
 
1140
                         if ( be.compare(p.mId) && be.isARootCause()  )
-
 
1141
                         {
-
 
1142
                             // package is not reproducible, discard it and its consumers
-
 
1143
                             //
-
 
1144
                             mLogger.warn("Excluded Package {}, {}", p.mAlias, be );                                     
-
 
1145
                             
-
 
1146
                             ArrayList<Package> toExclude = new ArrayList<Package>();
-
 
1147
                             toExclude.addAll(usedByAnyPackages(p, mPackageCollectionAll ));
-
 
1148
                             
-
 
1149
                             //  Process packages that we need to exclude indirectly
-
 
1150
                             //
-
 
1151
                             while ( ! toExclude.isEmpty())
-
 
1152
                             {
-
 
1153
                                 Package pkg = toExclude.remove(0);
-
 
1154
                                 
-
 
1155
                                 // If this package has not been excluded (for whatever reason), than add it
-
 
1156
                                 boolean found = false;
-
 
1157
                                 for (Iterator<BuildExclusion> it2 = mBuildExclusionCollection.iterator(); it2.hasNext(); )
-
 
1158
                                 {
-
 
1159
                                     BuildExclusion buildExclusion = it2.next();
-
 
1160
                                     if (buildExclusion.compare(pkg.mId) )
-
 
1161
                                     {
-
 
1162
                                         found = true;
-
 
1163
                                         if  ( buildExclusion.isImported() )
-
 
1164
                                         {
-
 
1165
                                             // An exclusion for this package already exists
-
 
1166
                                             // If it was 'imported' from the database then 
-
 
1167
                                             // mark it as processed so that it will be persisted
-
 
1168
                                             //
-
 
1169
                                             // Otherwise it will be a new one
-
 
1170
                                             //
-
 
1171
                                             buildExclusion.setProcessed();
-
 
1172
                                         }
-
 
1173
                                         break;
-
 
1174
                                     }
-
 
1175
                                 }
-
 
1176
                                 
-
 
1177
                                 if (!found)
-
 
1178
                                 {
-
 
1179
                                     BuildExclusion buildExclusion = new BuildExclusion(pkg.mId, p.mId, null, p.mTestBuildInstruction);
-
 
1180
                                     it.add(buildExclusion);
-
 
1181
                                     mLogger.warn("Indirectly Excluded Package {}", pkg.mAlias);
-
 
1182
                                     pkg.mBuildFile = -5; 
-
 
1183
                                 }
-
 
1184
                                 
-
 
1185
                                 // Determine all packages that use this excluded package
-
 
1186
                                 // THAT WE HAVE NOT ALREADY PROCESSED - circular dependencies are a killer
-
 
1187
                                 ArrayList<Package> usedBy = usedByAnyPackages(pkg, mPackageCollectionAll );
-
 
1188
                                 for (Iterator<Package> it2 = usedBy.iterator(); it2.hasNext(); )
-
 
1189
                                 {
-
 
1190
                                     Package uPkg = it2.next();
-
 
1191
                                     if (!uPkg.mCheckedCircularDependency)
-
 
1192
                                     {
-
 
1193
                                         toExclude.add(uPkg);
-
 
1194
                                         uPkg.mCheckedCircularDependency = true;
-
 
1195
                                     }
-
 
1196
                                 }
-
 
1197
 
1142
 
-
 
1143
                            if ( be.compare(p.mId)  )
-
 
1144
                            {
-
 
1145
                                // package is not reproducible, discard it and its consumers
-
 
1146
                                //
-
 
1147
                                mLogger.warn("Excluded Package {}, {}", p, be );                                     
-
 
1148
 
-
 
1149
                                ArrayList<Package> toExclude = new ArrayList<Package>();
-
 
1150
                                toExclude.addAll(usedByAnyPackages(p, mPackageCollectionAll ));
-
 
1151
 
-
 
1152
                                //  Process packages that we need to exclude indirectly
-
 
1153
                                //
-
 
1154
                                while ( ! toExclude.isEmpty())
-
 
1155
                                {
-
 
1156
                                    Package pkg = toExclude.remove(0);
-
 
1157
 
-
 
1158
                                    // If this package has not been excluded (for whatever reason), than add it
-
 
1159
                                    boolean found = false;
-
 
1160
                                    for (Iterator<BuildExclusion> it2 = mBuildExclusionCollection.iterator(); it2.hasNext(); )
-
 
1161
                                    {
-
 
1162
                                        BuildExclusion buildExclusion = it2.next();
-
 
1163
                                        if (buildExclusion.compare(pkg.mId) )
-
 
1164
                                        {
-
 
1165
                                            found = true;
-
 
1166
                                            if  ( buildExclusion.isImported() )
-
 
1167
                                            {
-
 
1168
                                                // An exclusion for this package already exists
-
 
1169
                                                // If it was 'imported' from the database then 
-
 
1170
                                                // mark it as processed so that it will be persisted
-
 
1171
                                                //
-
 
1172
                                                // Otherwise it will be a new one
-
 
1173
                                                //
-
 
1174
                                                buildExclusion.setProcessed();
-
 
1175
                                            }
-
 
1176
                                            break;
-
 
1177
                                        }
-
 
1178
                                    }
-
 
1179
 
-
 
1180
                                    if (!found)
-
 
1181
                                    {
-
 
1182
                                        BuildExclusion buildExclusion = new BuildExclusion(pkg.mId, p.mId, null, p.mTestBuildInstruction);
-
 
1183
                                        it.add(buildExclusion);
-
 
1184
                                        mLogger.warn("Indirectly Excluded Package {}", pkg.mAlias);
-
 
1185
                                        pkg.mBuildFile = -5; 
-
 
1186
                                    }
-
 
1187
 
-
 
1188
                                    // Determine all packages that use this excluded package
-
 
1189
                                    // THAT WE HAVE NOT ALREADY PROCESSED - circular dependencies are a killer
-
 
1190
                                    ArrayList<Package> usedBy = usedByAnyPackages(pkg, mPackageCollectionAll );
-
 
1191
                                    for (Iterator<Package> it2 = usedBy.iterator(); it2.hasNext(); )
-
 
1192
                                    {
-
 
1193
                                        Package uPkg = it2.next();
-
 
1194
                                        if (!uPkg.mCheckedCircularDependency)
-
 
1195
                                        {
-
 
1196
                                            toExclude.add(uPkg);
-
 
1197
                                            uPkg.mCheckedCircularDependency = true;
-
 
1198
                                        }
-
 
1199
                                    }
-
 
1200
 
-
 
1201
                                }
1198
                             }
1202
                            }
1199
                         }
1203
                        }
1200
                     }
1204
                    }
1201
                 }
1205
                }
1202
                 
1206
                 
1203
                 //
1207
                 //
1204
                 // Handle daemon Instructions that cannot be satisfied
1208
                 // Handle daemon Instructions that cannot be satisfied
1205
                 // Need to be rejected to prevent continuous planning
1209
                 // Need to be rejected to prevent continuous planning
1206
                 //
1210
                 //
Line 1221... Line 1225...
1221
                 {
1225
                 {
1222
                     PlannedPackage pkg = it.next();
1226
                     PlannedPackage pkg = it.next();
1223
                     if (pkg.mPkg.mBuildFile < 0)
1227
                     if (pkg.mPkg.mBuildFile < 0)
1224
                     {
1228
                     {
1225
                         it.remove();
1229
                         it.remove();
1226
                         mLogger.error("Purge mBuildOrder {}", pkg.mPkg);
1230
                         mLogger.warn("Purge mBuildOrder {}", pkg.mPkg);
1227
                         continue;
1231
                         continue;
1228
                     }
1232
                     }
1229
                     
1233
                     
1230
                     if ( pkg.mBuildLevel < lastLevel && insertMarker < 0)
1234
                     if ( pkg.mBuildLevel < lastLevel && insertMarker < 0)
1231
                     {
1235
                     {
Line 1346... Line 1350...
1346
            if ( p.mBuildFile == -8 ) {
1350
            if ( p.mBuildFile == -8 ) {
1347
 
1351
 
1348
                //  Mark SDK or Pegged so that we don't build them, but can build their dependents
1352
                //  Mark SDK or Pegged so that we don't build them, but can build their dependents
1349
                p.mProcessed = true;
1353
                p.mProcessed = true;
1350
                p.mIsProcessed = true;
1354
                p.mIsProcessed = true;
1351
                mLogger.error("SDK/Peg Exclude: {}", p);
1355
                mLogger.warn("SDK/Peg Exclude: {}", p);
1352
                
1356
                
1353
            } else if (p.mBuildFile < 0 ) {
1357
            } else if (p.mBuildFile < 0 ) {
1354
                exclude.add(p);
1358
                exclude.add(p);
1355
                mLogger.error("Direct Exclude: {}", p);
1359
                mLogger.warn("Direct Exclude: {}", p);
1356
                
1360
                
1357
            }
1361
            }
1358
        }
1362
        }
1359
        
1363
        
1360
        //  Exclude packages that have failed to be built
1364
        //  Exclude packages that have failed to be built
1361
        //      These are recorded in mBuildExclusionCollection
1365
        //      These are recorded in mBuildExclusionCollection
1362
        phase.setPhase("Exclude Build Failures");
1366
        phase.setPhase("Exclude Build Failures");
1363
        for (ListIterator<BuildExclusion> it = mBuildExclusionCollection.listIterator(); it.hasNext(); )
1367
        for (ListIterator<BuildExclusion> it = mBuildExclusionCollection.listIterator(); it.hasNext(); )
1364
        {
1368
        {
1365
            BuildExclusion be = it.next();
1369
            BuildExclusion be = it.next();
1366
            mLogger.error("BE: {}", be);
1370
            mLogger.warn("BE: {}", be);
1367
            if ( !be.isAIndirectError() )
1371
            if ( !be.isAIndirectError() )
1368
            {
1372
            {
1369
                for (Iterator<Package> it1 = packageCollection.iterator(); it1.hasNext(); )
1373
                for (Iterator<Package> it1 = packageCollection.iterator(); it1.hasNext(); )
1370
                {
1374
                {
1371
                    Package p = it1.next();
1375
                    Package p = it1.next();
1372
                    if (p.mBuildFile >= 0 && p.mId == be.mId) {
1376
                    if (p.mBuildFile >= 0 && p.mId == be.mId) {
1373
                        p.mBuildFile  = -3;
1377
                        p.mBuildFile  = -3;
1374
                        mLogger.error("AddExclude {}",p);
1378
                        mLogger.warn("AddExclude {}",p);
1375
                        exclude.add(p);
1379
                        exclude.add(p);
1376
                        break;
1380
                        break;
1377
                    }
1381
                    }
1378
                }
1382
                }
1379
            }
1383
            }
Line 1466... Line 1470...
1466
                    {
1470
                    {
1467
                        ripplePlan.add(pkg);
1471
                        ripplePlan.add(pkg);
1468
                        results.planTime += pkg.mPkg.mBuildTime;
1472
                        results.planTime += pkg.mPkg.mBuildTime;
1469
                        pkg.mPkg.mCheckedCircularDependency = true;
1473
                        pkg.mPkg.mCheckedCircularDependency = true;
1470
                        
1474
                        
1471
                        // TODO - Used the mUsedBy stuff
-
 
1472
                        // How do we handle duplicates ?
1475
                        // How do we handle duplicates ?
1473
                        ArrayList<PlannedPackage> usedBy = usedByPackages(pkg, results.planCollection);
1476
                        ArrayList<PlannedPackage> usedBy = usedByPackages(pkg, results.planCollection);
1474
                        toBuild.addAll(usedBy);
1477
                        toBuild.addAll(usedBy);
1475
                    }
1478
                    }
1476
                }
1479
                }
Line 1607... Line 1610...
1607
                        for (Iterator<PlannedPackage> it1 = basicPlan.planCollection.iterator(); it1.hasNext(); )
1610
                        for (Iterator<PlannedPackage> it1 = basicPlan.planCollection.iterator(); it1.hasNext(); )
1608
                        {
1611
                        {
1609
                            PlannedPackage pkg = it1.next();
1612
                            PlannedPackage pkg = it1.next();
1610
                            if (pkg.mPkg == p)
1613
                            if (pkg.mPkg == p)
1611
                            {
1614
                            {
1612
                                mLogger.error("Test Plan without {}", p.mAlias);
1615
                                mLogger.warn("Test Plan without {}", p);
1613
                                break;
1616
                                break;
1614
                            }
1617
                            }
1615
                        }
1618
                        }
1616
                    }
1619
                    }
1617
                    
1620
                    
1618
                    mLogger.error("Test Plan with {}", p.mAlias);
1621
                    mLogger.warn("Test Plan with {}", p);
1619
                    Package foundInRelease = mReleaseManager.findPackage(p.mAlias, fullPlanCollection);
1622
                    Package foundInRelease = mReleaseManager.findPackage(p.mAlias, fullPlanCollection);
1620
                    int foundIndex = mReleaseManager.findPackageLastIndex;
1623
                    int foundIndex = mReleaseManager.findPackageLastIndex;
1621
                    if (foundInRelease == ReleaseManager.NULL_PACKAGE)
1624
                    if (foundInRelease == ReleaseManager.NULL_PACKAGE)
1622
                    {
1625
                    {
1623
                        fullPlanCollection.add(p);
1626
                        fullPlanCollection.add(p);
Line 1628... Line 1631...
1628
                    }
1631
                    }
1629
                    
1632
                    
1630
                    Package.resetCircularDependency (fullPlanCollection);
1633
                    Package.resetCircularDependency (fullPlanCollection);
1631
                    if ( p.hasCircularDependency( fullPlanCollection ) )
1634
                    if ( p.hasCircularDependency( fullPlanCollection ) )
1632
                    {
1635
                    {
1633
                        mLogger.info("planRelease circular dependency detected {}", p.mAlias);
1636
                        mLogger.info("planRelease circular dependency detected {}", p);
1634
                        
1637
                        
1635
                        //  Force this package to be marked as having a circular dependency - even if its been excluded
1638
                        //  Force this package to be marked as having a circular dependency - even if its been excluded
1636
                        p.mBuildFile = 0;
1639
                        p.mBuildFile = 0;
1637
                        
1640
                        
1638
                        // Exclude the package
1641
                        // Exclude the package
Line 1786... Line 1789...
1786
                    mLogger.warn("planRelease Test Build of an unbuildable of package deleted: {}", p);
1789
                    mLogger.warn("planRelease Test Build of an unbuildable of package deleted: {}", p);
1787
    
1790
    
1788
                    int daemonInstruction = p.mTestBuildInstruction > 0  ? p.mTestBuildInstruction : p.mForcedRippleInstruction; 
1791
                    int daemonInstruction = p.mTestBuildInstruction > 0  ? p.mTestBuildInstruction : p.mForcedRippleInstruction; 
1789
                    if ( daemonInstruction <= 0)
1792
                    if ( daemonInstruction <= 0)
1790
                    {
1793
                    {
1791
                        mLogger.error("Daemon Instruction number not found for {}", p);
1794
                        mLogger.warn("Daemon Instruction number not found for {}", p);
1792
                    }
1795
                    }
1793
    
1796
    
1794
                    mReleaseManager.markDaemonInstCompleted( daemonInstruction );
1797
                    mReleaseManager.markDaemonInstCompleted( daemonInstruction );
1795
                    emailRejectedDaemonInstruction(reason,p);
1798
                    emailRejectedDaemonInstruction(reason,p);
1796
                }
1799
                }
Line 1857... Line 1860...
1857
                }
1860
                }
1858
            }
1861
            }
1859
            
1862
            
1860
            if (buildExclusion.isImported()) {
1863
            if (buildExclusion.isImported()) {
1861
                // Remove from the exclusion list
1864
                // Remove from the exclusion list
1862
                mLogger.error("reportChange remove unused exclusion: {}", buildExclusion );
1865
                mLogger.warn("reportChange remove unused exclusion: {}", buildExclusion );
1863
                buildExclusion.includeToBuild(mReleaseManager, mBaseline);
1866
                buildExclusion.includeToBuild(mReleaseManager, mBaseline);
1864
 
1867
 
1865
            } else {
1868
            } else {
1866
                // Exclude and notify
1869
                // Exclude and notify
1867
                mLogger.error("reportChange add new exclusion: {}", buildExclusion );
1870
                mLogger.warn("reportChange add new exclusion: {}", buildExclusion );
1868
                buildExclusion.excludeFromBuild(mReleaseManager, mBaseline);
1871
                buildExclusion.excludeFromBuild(mReleaseManager, mBaseline);
1869
                buildExclusion.email(this, mPackageCollectionAll);
1872
                buildExclusion.email(this, mPackageCollectionAll);
1870
                counter++;
1873
                counter++;
1871
            }
1874
            }
1872
        }
1875
        }
1873
        mLogger.error("reportChange exclusion count: {}", counter);
1876
        mLogger.warn("reportChange exclusion count: {}", counter);
1874
    }
1877
    }
1875
 
1878
 
1876
    /**reports the build plan
1879
    /**reports the build plan
1877
     */
1880
     */
1878
    public void reportPlan() throws SQLException, Exception
1881
    public void reportPlan() throws SQLException, Exception
Line 1990... Line 1993...
1990
    {
1993
    {
1991
        mLogger.debug("findPackage");
1994
        mLogger.debug("findPackage");
1992
 
1995
 
1993
        Package retVal = mReleaseManager.findPackage(alias, mPackageCollection);
1996
        Package retVal = mReleaseManager.findPackage(alias, mPackageCollection);
1994
 
1997
 
1995
        mLogger.info("findPackage returned {}", retVal.mName);
1998
        mLogger.debug("findPackage returned {}", retVal.mName);
1996
        return retVal;
1999
        return retVal;
1997
    }
2000
    }
1998
    
2001
    
1999
    /**
2002
    /**
2000
     * Sets the mBuildFile to the specified value for the package
2003
     * Sets the mBuildFile to the specified value for the package
Line 2941... Line 2944...
2941
                String info = bs.getBuildStandardText();
2944
                String info = bs.getBuildStandardText();
2942
                result.append(info);
2945
                result.append(info);
2943
            }
2946
            }
2944
        }
2947
        }
2945
 
2948
 
2946
        mLogger.info("buildInfoText returned {}", result);
2949
        mLogger.debug("buildInfoText returned {}", result);
2947
        return result.toString();
2950
        return result.toString();
2948
    }
2951
    }
2949
 
2952
 
2950
    /**prints to standard out in escrow mode only
2953
    /**prints to standard out in escrow mode only
2951
     * <br>Prints a title and information. The title is only printed once.
2954
     * <br>Prints a title and information. The title is only printed once.
Line 2992... Line 2995...
2992
 
2995
 
2993
        mailBody += "<p><hr>";
2996
        mailBody += "<p><hr>";
2994
 
2997
 
2995
        String target = p.emailInfoNonAntTask(this);
2998
        String target = p.emailInfoNonAntTask(this);
2996
 
2999
 
2997
        mLogger.error("emailRejectedDaemonInstruction Server: {}", getMailServer());
3000
        mLogger.info("emailRejectedDaemonInstruction Server: {}", getMailServer());
2998
        mLogger.error("emailRejectedDaemonInstruction Sender: {}", getMailSender());
3001
        mLogger.info("emailRejectedDaemonInstruction Sender: {}", getMailSender());
2999
        mLogger.error("emailRejectedDaemonInstruction Target: {}", target);
3002
        mLogger.warn("emailRejectedDaemonInstruction Target: {}", target);
3000
 
3003
 
3001
        try
3004
        try
3002
        {
3005
        {
3003
            //    
3006
            //    
3004
            Smtpsend.send(getMailServer(),  // mailServer
3007
            Smtpsend.send(getMailServer(),  // mailServer
Line 3037... Line 3040...
3037
 
3040
 
3038
        mailBody += "<p><hr>";
3041
        mailBody += "<p><hr>";
3039
 
3042
 
3040
        String target = p.emailInfoNonAntTask(this);
3043
        String target = p.emailInfoNonAntTask(this);
3041
 
3044
 
3042
        mLogger.warn("emailRippleStop Server: {}", getMailServer());
3045
        mLogger.info("emailRippleStop Server: {}", getMailServer());
3043
        mLogger.warn("emailRippleStop Sender: {}", getMailSender());
3046
        mLogger.info("emailRippleStop Sender: {}", getMailSender());
3044
        mLogger.warn("emailRippleStop Target: {}", target);
3047
        mLogger.warn("emailRippleStop Target: {}", target);
3045
 
3048
 
3046
        try
3049
        try
3047
        {
3050
        {
3048
            //    
3051
            //