Closed zepumph closed 1 year ago
I feel there is a problem in this code:
async getStatus( getBranchMapAsyncCallback = getBranchMap ) {
const results = [];
const dependencies = await this.getDependencies();
const dependencyNames = Object.keys( dependencies ).filter( key => {
return key !== 'comment' && key !== this.repo;
} );
// Check our own dependency
if ( dependencies[ this.repo ] ) {
try {
const currentCommit = await gitRevParse( this.repo, 'HEAD' );
const previousCommit = await gitRevParse( this.repo, 'HEAD^' );
if ( dependencies[ this.repo ].sha !== previousCommit ) {
results.push( '[INFO] Potential changes (dependency is not previous commit)' );
results.push( `[INFO] ${currentCommit} ${previousCommit} ${dependencies[ this.repo ].sha}` );
}
The report from @zepumph's log above is showing currentCommit
and previousCommit
from master, not from the branch. That's why it is saying there is a discrepancy. So maybe we need to handle the main sim repo differently?
Fixed a big I created with the above patch. @samreid can you confirm this is fixed?
Looks fixed, thanks! Do you want to revert or revise @zepumph commit above, which is https://github.com/phetsims/perennial/commit/2166859d92aa78f80c3ba62e12ac6d0d4ea433e0
Reverted above. All good here?
Perfect! And I also confirmed that it is fixed after the commit. Thanks.
@samreid and @matthew-blackman and I were working on a maintenance release, and after pulling all release branches and running
Maintenance.checkBranchStatus()
, we had a log that looked kinda like:We were confused, and so we investigated, and think we understand that this is because each tip of a release branch is out of date with its dependencies.json because of the commit sha that actually changed the dependencies.json. We updated doc, will you please have a look?