Skip to content
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

Rebuild changed components only #965

Merged
merged 24 commits into from
Nov 8, 2023

Conversation

nilsgstrabo
Copy link
Contributor

@nilsgstrabo nilsgstrabo commented Oct 27, 2023

Rebuild changed components

A component is build if:

  • One or more environments does not have an active RadixDeployment.
  • RadixApplication.Spec sha256 does not match the value stored in active RadixDeployment annotation for environment to build
  • BuildSecrets is defined in RadixApplication and sha256 of Secret.Data does not match the value stored in active RadixDeployment annotation for environment to build
  • The component is listed in PrepareBuildContext.EnvironmentsToBuild returned from the prepare-pipeline step.

If a component does not need to be rebuilt, the image is taken from previous RadixDeployment for the environment.

Misc other changes

  • Moved utils package to internal
  • Reactored and moved unit tests

@nilsgstrabo nilsgstrabo self-assigned this Oct 27, 2023
@nilsgstrabo nilsgstrabo requested review from satr and Richard87 November 6, 2023 15:18
@nilsgstrabo nilsgstrabo marked this pull request as ready for review November 6, 2023 15:29
@@ -217,145 +198,6 @@ func (info *PipelineInfo) SetGitAttributes(gitCommitHash, gitTags string) {
}

// IsDeployOnlyPipeline Determines if the pipeline is deploy-only
Copy link
Contributor

@satr satr Nov 7, 2023

Choose a reason for hiding this comment

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

Inconsistent comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Comment on lines 108 to 109
if pipelineInfo.IsPipelineType(radixv1.Deploy) {
if len(pipelineInfo.BuildComponentImages) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

One "if"?

if pipelineInfo.IsPipelineType(radixv1.Deploy) && 
len(pipelineInfo.BuildComponentImages) > 0 {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Richard87
Richard87 previously approved these changes Nov 7, 2023
Copy link
Contributor

@Richard87 Richard87 left a comment

Choose a reason for hiding this comment

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

Ett par spørsmål :)

pipeline-runner/model/pipelineInfo.go Outdated Show resolved Hide resolved
pkg/apis/deployment/deployment.go Outdated Show resolved Hide resolved
@nilsgstrabo nilsgstrabo requested a review from Richard87 November 7, 2023 11:25
@nilsgstrabo nilsgstrabo requested a review from satr November 7, 2023 11:25
Richard87
Richard87 previously approved these changes Nov 7, 2023
Copy link
Contributor

@Richard87 Richard87 left a comment

Choose a reason for hiding this comment

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

godkjent

@nilsgstrabo nilsgstrabo merged commit f4d0062 into master Nov 8, 2023
2 checks passed
@nilsgstrabo nilsgstrabo deleted the rebuild-changed-components-only-2 branch November 9, 2023 07:58
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