Skip to content

Npm and Python bug fixes#224

Merged
adityanarayanp merged 14 commits intodevelopmentfrom
Bugfixes12/16/24
Jan 10, 2025
Merged

Npm and Python bug fixes#224
adityanarayanp merged 14 commits intodevelopmentfrom
Bugfixes12/16/24

Conversation

@crvreddy
Copy link
Collaborator

@crvreddy crvreddy commented Jan 2, 2025

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

Copy link
Collaborator

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

Copy link
Collaborator

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

@adityanarayanp
Copy link
Collaborator

@ragavareddychalapala : Please also provide a screen shot of all the UT and IT passing

Copy link
Collaborator

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

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}";
Copy link
Collaborator

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

Copy link
Collaborator

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;

}

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(
Copy link
Collaborator

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

{
// Arrange
Mock<ICycloneDXBomParser> cycloneDXBomParser = new Mock<ICycloneDXBomParser>();
AqlProperty property1 = new AqlProperty
Copy link
Collaborator

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

{
// Arrange
Mock<ICycloneDXBomParser> cycloneDXBomParser = new Mock<ICycloneDXBomParser>();
AqlProperty property1 = new AqlProperty
Copy link
Collaborator

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

@adityanarayanp adityanarayanp merged commit 11bcece into development Jan 10, 2025
6 checks passed
@crvreddy crvreddy deleted the Bugfixes12/16/24 branch May 19, 2025 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants