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

Allow multiple apps in manifests #2118

Merged
merged 2 commits into from
Jan 31, 2023
Merged

Allow multiple apps in manifests #2118

merged 2 commits into from
Jan 31, 2023

Conversation

kieron-dev
Copy link
Contributor

Is there a related GitHub Issue?

#1661

What is this change about?

Allow the list of apps in a space manifest to have more than 1 entry.

Also fix the behaviour of creating a web process during manifest application or app creation to match cf on VMs. I.e. the web process is created at the same time as the app.

Does this PR introduce a breaking change?

Note that the web app is created earlier now, rather than when starting the app.

Acceptance Steps

See story

Tag your pair, your PM, and/or team

@gcapizzi

Kieron Browne and others added 2 commits January 30, 2023 12:15
And fix the behaviour of creating a web process during manifest
application or app creation to match cf on VMs

Issue: #1661
Co-authored-by: Giuseppe Capizzi <gcapizzi@vmware.com>
Test for e.g. app memory > 0 were failing for the wrong reason. 0 fails
to be parsed as an amount with a unit by the bytefmt library as it
doesn't contain a byte unit.

Adding tests for missing units showed the errors message could be
improved by splitting validation into that for having a unit and that
for being a positive amount.

go-playground/validator doesn't allow us to give the true path to the
erroneous value unfortunately. E.g. the cf on vms errors would be along
the lines of `For application 'test-app': Process "web": Disk quota must
use a supported unit: B, K, KB, M, MB, G, GB, T, or TB`. So best effort
on field identification for now, until we can rethink the validation
code.
@@ -45,20 +45,25 @@ func NewManifest(domainRepo shared.CFDomainRepository, defaultDomainName string,
}
}

func (a *Manifest) Apply(ctx context.Context, authInfo authorization.Info, spaceGUID string, manifest payloads.Manifest) error {
func (a *Manifest) Apply(ctx context.Context, authInfo authorization.Info, spaceGUID string, manifesto payloads.Manifest) error {
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, was that intentional? Not a big deal, just curious.

@georgethebeatle georgethebeatle merged commit ada80e4 into main Jan 31, 2023
@georgethebeatle georgethebeatle deleted the multi-app-manifests branch January 31, 2023 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants