-
Notifications
You must be signed in to change notification settings - Fork 48
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
Support local deployment's param version matching #404
Conversation
// TODO packageConfig.getResolvedVersion() should be strongly typed when created | ||
&& Requirement.buildNPM(packageConfig.getResolvedVersion()) | ||
.isSatisfiedBy(new Semver(packageVersion, Semver.SemverType.NPM))) | ||
.findAny(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is findAny() still correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question. findAny
and findFirst
might both be correct, as a deployment doc could have multiple entries that satisfy the resolved version (which might change). Let's keep it for now I guess.
Unit Tests Coverage Report
Minimum allowed coverage is Generated by 🐒 cobertura-action against a4170b1 |
Integration Tests Coverage Report
Minimum allowed coverage is Generated by 🐒 cobertura-action against a4170b1 |
@@ -406,7 +406,7 @@ void GIVEN_deployment_with_artifact_WHEN_config_resolution_requested_THEN_artifa | |||
}}, Collections.emptyList(), Collections.emptyMap(), null); | |||
|
|||
DeploymentPackageConfiguration rootPackageDeploymentConfig = | |||
new DeploymentPackageConfiguration(TEST_INPUT_PACKAGE_A, true, "1.2", Collections.emptyMap()); | |||
new DeploymentPackageConfiguration(TEST_INPUT_PACKAGE_A, true, "=1.2", Collections.emptyMap()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the customer isn't specifying requirements? What if it is just 1.2
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it needs to be a version range, then we need to make this clear in the cloud
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.2
should also work but it doesn't now. But 1.2.0
works. Took me some time to debug and found a werid error from Semver lib... I opened an issue with them: vdurmont/semver4j#46
But in reality, right now cloud and local will send a valid "x.y.z" with patch version specified, so we should be good.
Issue #, if available:
Description of changes:
Also found a weird error/potential bug with Semver lib. I opened an issue vdurmont/semver4j#46 for them.
Why is this change necessary:
How was this change tested:
Any additional information or context required to review the change:
Checklist:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.