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

Add container and buildpack start commands to app status #936

Merged
merged 7 commits into from
Sep 29, 2022

Conversation

lildann
Copy link
Contributor

@lildann lildann commented Sep 21, 2022

Proposed Changes

  • Add a new start command struct to the app status and update the OpenAPIspec
  • Populate start command fields in app reconciler
  • Update Tekton pipeline to output app start command

@google-cla
Copy link

google-cla bot commented Sep 21, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@lildann lildann marked this pull request as ready for review September 21, 2022 20:26
@lildann lildann marked this pull request as draft September 21, 2022 20:28
@lildann lildann marked this pull request as ready for review September 21, 2022 20:30

startCommands := app.Status.StartCommands

containerConfig, err := r.fetchContainerCommand(app)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make sure this only happens when the image that will be running changes? (assuming the customer uses SHA based imaging rather than labels that don't change)

This code is on a hot path and will be executed each time a child object changes, several times through app startup, and also every 15ish minutes for every app which could lead to a lot of load on the container registry.


containerConfig, err := r.fetchContainerCommand(app)
if err != nil {
return err
Copy link
Contributor

@josephlewis42 josephlewis42 Sep 22, 2022

Choose a reason for hiding this comment

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

It is probably worth reflecting this error onto the app status instead so the developer can understand why the pull failed.

DeeAjayi and others added 2 commits September 26, 2022 15:09
…status

Signed-off-by: Oladipupo Ajayi <ajayidipo@ymail.com>
Co-authored-by: Lilly Daniell <lilly.daniell@engineerbetter.com>
Co-authored-by: Adrienne Galloway <adrienne.galloway@engineerbetter.com>
Signed-off-by: Oladipupo Ajayi <ajayidipo@ymail.com>
Co-authored-by: Lilly Daniell <lilly.daniell@engineerbetter.com>
Co-authored-by: Adrienne Galloway <adrienne.galloway@engineerbetter.com>
@DeeAjayi
Copy link
Contributor

We had an issue when pushing an app on the step-run-lifecycle stage. Do you have any ideas as to how to resolve it? I attached a copy of the error. This needs to work for us to test properly @josephlewis42

image

image

@josephlewis42
Copy link
Contributor

My guess is that this is coming from a missing or bad file in the lifecycle step:

Name: "run-lifecycle",

It gets the CF lifecycle binaries from the earlier steps, if the ko images were built incorrectly or the binaries were missing/had bad permissions you might see this. I'd double check the binaries in the local checked-out version to see if they've been modified.

@josephlewis42
Copy link
Contributor

My guess is that this is coming from a missing or bad file in the lifecycle step:

Name: "run-lifecycle",

It gets the CF lifecycle binaries from the earlier steps, if the ko images were built incorrectly or the binaries were missing/had bad permissions you might see this. I'd double check the binaries in the local checked-out version to see if they've been modified.

Alternatively, maybe the new jq command in this PR isn't available or correctly set up in the build image? start_cmd=$(cat /tmp/result.json | jq .process_types.web)

@DeeAjayi
Copy link
Contributor

The step-run-lifecycle was failing because we were running apply-kf-with-operator script on an M1 mac, we eventually used a linux vm to run it and it works fine.

All feedback has been implemented and tested.

startCommands:
description: StartCommands defines the container and buildpack start commands for the App.
type: object
properties:
Copy link
Contributor

Choose a reason for hiding this comment

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

This will likely need to be updated with the two new properties

Copy link
Contributor

Choose a reason for hiding this comment

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

The new properties have already been added

@josephlewis42 josephlewis42 merged commit 465770c into google:main Sep 29, 2022
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.

4 participants