Skip to content

Commit

Permalink
Fix patchFile-based manifest generation
Browse files Browse the repository at this point in the history
The problem was introduced at fluxcd#2565

Also, re-enable the manifest generation e2e test, which was disabled
because of the bug fixed here.
  • Loading branch information
Alfonso Acosta committed Nov 12, 2019
1 parent ab0bdfe commit cd85ecc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/manifests/configfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (cf *ConfigFile) RelativeConfigPath() (string, error) {
// necessary) according to the config file.
func (cf *ConfigFile) GenerateManifests(ctx context.Context, manifests Manifests) ([]byte, error) {
if cf.PatchUpdated != nil {
finalBytes, _, _, err := cf.getGeneratedAndPatchedManifests(ctx, manifests)
_, finalBytes, _, err := cf.getGeneratedAndPatchedManifests(ctx, manifests)
return finalBytes, err
}
return cf.getGeneratedManifests(ctx, manifests, cf.CommandUpdated.Generators)
Expand Down Expand Up @@ -212,7 +212,7 @@ type ConfigFileCombinedExecResult struct {

// -- these are helpers to support the entry points above

// getGeneratedAndPatchedManifests is used to generated manifests when
// getGeneratedAndPatchedManifests is used to generate manifests when
// the config is patchUpdated.
func (cf *ConfigFile) getGeneratedAndPatchedManifests(ctx context.Context, manifests Manifests) ([]byte, []byte, string, error) {
generatedManifests, err := cf.getGeneratedManifests(ctx, manifests, cf.PatchUpdated.Generators)
Expand Down
1 change: 0 additions & 1 deletion test/e2e/22_manifest_generation.bats
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ function setup() {
}

@test "Basic sync and editing" {
skip # needed until https://github.com/fluxcd/flux/issues/2602 is fixed
# Wait until flux deploys the workloads
poll_until_true 'workload podinfo' 'kubectl -n demo describe deployment/podinfo'

Expand Down

0 comments on commit cd85ecc

Please sign in to comment.