-
Notifications
You must be signed in to change notification settings - Fork 9
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
Npm and Python bug fixes #224
Conversation
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.
the method IsInternalNpmComponent still checks by the old way, it also needs to be updated to use the new way
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.
UT does not look to be updated
@ragavareddychalapala : Please also provide a screen shot of all the UT and IT passing |
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.
IsInternalPythonComponent not updated to the latest logic
string nameVerison = string.Empty; | ||
string jfrogcomponentName = $"{name}-{version}"; | ||
nameVerison = aqlResultList.FirstOrDefault(x => x.Name.Contains( | ||
jfrogcomponentName, StringComparison.OrdinalIgnoreCase))?.Name ?? string.Empty; | ||
nameVerison = aqlResultList.FirstOrDefault(x => x.properties.Any(p => p.key == "pypi.normalized.name" && p.value == name) && x.properties.Any(p => p.key == "pypi.version" && p.value == version))?.Name ?? string.Empty; | ||
if (string.IsNullOrEmpty(nameVerison)) | ||
{ | ||
jfrogcomponentName = $"{name}_{version}"; |
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 this required as the search is now done on the name and not a combination of both
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.
do we need to do this twice
if (string.IsNullOrEmpty(nameVerison))
{
jfrogcomponentName = $"{name}_{version}";
nameVerison = aqlResultList.FirstOrDefault(x => x.properties.Any(p => p.key == "pypi.normalized.name" && p.value == name) && x.properties.Any(p => p.key == "pypi.version" && p.value == version))?.Name ?? string.Empty;
}
Property projectType = new() { Name = Dataconstant.Cdx_ProjectType, Value = appSettings.ProjectType }; | ||
List<Component> modifiedBOM = new List<Component>(); | ||
|
||
foreach (var component in componentsForBOM) | ||
{ | ||
string jfrogPackageNameWhlExten = Dataconstant.PackageNameNotFoundInJfrog; | ||
string jfrogRepoPath = Dataconstant.JfrogRepoPathNotFound; | ||
string jfrogRepoPath = Dataconstant.JfrogRepoPathNotFound; | ||
string repoName = GetArtifactoryRepoName(aqlResultList, component, bomhelper, out jfrogPackageNameWhlExten, out jfrogRepoPath); | ||
string jfrogpackageName = $"{component.Name}-{component.Version}"; | ||
var hashes = aqlResultList.FirstOrDefault(x => x.Name.Contains( |
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.
search still done in the old way
@@ -27,13 +27,38 @@ public void GetJfrogArtifactoryRepoDetials_RepoPathFound_ReturnsAqlResultWithRep | |||
{ | |||
// Arrange | |||
Mock<ICycloneDXBomParser> cycloneDXBomParser = new Mock<ICycloneDXBomParser>(); | |||
AqlProperty property1 = new AqlProperty |
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.
please give valid variable names
@@ -52,13 +77,38 @@ public void GetJfrogArtifactoryRepoDetials_RepoPathNotFound_ReturnsAqlResultWith | |||
{ | |||
// Arrange | |||
Mock<ICycloneDXBomParser> cycloneDXBomParser = new Mock<ICycloneDXBomParser>(); | |||
AqlProperty property1 = new AqlProperty |
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.
please provide a valid variable data name
Bug fixes:
CATool not able to Identify few Python packages which are already present in the JFROG.
CATool not able to Identify few Npm packages which are already present in the JFROG.
CATool not able to Identify few of the NPM packages exact names