Skip to content

Conversation

@gireesh-naidu
Copy link
Contributor

@gireesh-naidu gireesh-naidu commented May 18, 2023

Description

Fixes #3398

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

Does this PR introduce a user-facing change?


@gireesh-naidu gireesh-naidu marked this pull request as ready for review May 18, 2023 08:07
buildContextGitMaterial := 0
if len(gitMaterials) == 1 {
dockerfileGitMaterial = gitMaterials[0].Id
buildContextGitMaterial = gitMaterials[0].Id
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reuse vars here

buildContextGitMaterial = gitMaterials[0].Id
} else {
refGitmaterial, err := impl.materialRepository.FindById(refCiConf.CiBuildConfig.GitMaterialId)
refBuildContextGitMaterial, err := impl.materialRepository.FindById(refCiConf.CiBuildConfig.BuildContextGitMaterialId)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compare refCiConf.CiBuildConfig.BuildContextGitMaterialId with refCiConf.CiBuildConfig.GitMaterialId if same then we can avoid db call.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@gireesh-naidu gireesh-naidu merged commit 0c07299 into main May 18, 2023
@gireesh-naidu gireesh-naidu deleted the app-clone-build-context-fix branch May 18, 2023 11:12
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.

Bug: Build configurations page and CI pipeline in workflow editor is breaking for cloned apps

3 participants