Skip to content

fix/ignore regex material ids #21

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkg/RepoManages.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ func (impl RepoManagerImpl) SavePipelineMaterial(materials []*sql.CiPipelineMate
newMaterial = append(newMaterial, material)
}
}
impl.logger.Infow("Testing ", "old length ", len(old), "new length", len(newMaterial))
impl.logger.Infow("Testing ", "old materials ", old)
if len(old) > 0 {
err := impl.InactivateWebhookDataMappingForPipelineMaterials(old)
if err != nil {
Expand All @@ -119,6 +121,7 @@ func (impl RepoManagerImpl) SavePipelineMaterial(materials []*sql.CiPipelineMate
return nil, err
}
}
impl.logger.Infow("Testing ", "new materials ", newMaterial)
if len(newMaterial) > 0 {
_, err := impl.ciPipelineMaterialRepository.Save(newMaterial)
if err != nil {
Expand All @@ -132,6 +135,7 @@ func (impl RepoManagerImpl) SavePipelineMaterial(materials []*sql.CiPipelineMate
oldNotDeleted = append(oldNotDeleted, material)
}
}
impl.logger.Infow("Testing ", "oldNotDeleted materials ", oldNotDeleted)
err := impl.updatePipelineMaterialCommit(append(newMaterial, oldNotDeleted...))
if err != nil {
return nil, err
Expand Down Expand Up @@ -177,7 +181,7 @@ func (impl RepoManagerImpl) updatePipelineMaterialCommit(materials []*sql.CiPipe
pipelineMaterial, err := impl.ciPipelineMaterialRepository.FindById(pipelineMaterial.Id)
if err != nil {
impl.logger.Errorw("material not found", "material", pipelineMaterial)
return err
continue
}

material, err := impl.materialRepository.FindById(pipelineMaterial.GitMaterialId)
Expand Down