Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: AMI versioning is broken. #13740

Merged
merged 3 commits into from
Jan 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions lib/versioning/aws-machine-image/index.spec.ts
Expand Up @@ -43,9 +43,12 @@ describe('versioning/aws-machine-image/index', () => {
});
});
describe('isGreaterThan(version1, version2)', () => {
it('should return false', () => {
expect(aws.isGreaterThan('ami-00', 'ami-99')).toBeFalse();
expect(aws.isGreaterThan('ami-99', 'ami-00')).toBeFalse();
it('should return true', () => {
// Since we can't compare AMI IDs directly, we consider any version
// greater than any other version so that updates will be generated.
// https://github.com/renovatebot/renovate/discussions/13739
expect(aws.isGreaterThan('ami-00', 'ami-99')).toBeTrue();
expect(aws.isGreaterThan('ami-99', 'ami-00')).toBeTrue();
});
});
});
2 changes: 1 addition & 1 deletion lib/versioning/aws-machine-image/index.ts
Expand Up @@ -24,7 +24,7 @@ class AwsMachineImageVersioningApi extends GenericVersioningApi {
}

protected override _compare(_version: string, _other: string): number {
return 0;
return 1;
}
}

Expand Down