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

Adding procfile_structure on app api #2

Merged
merged 5 commits into from
Nov 13, 2017

Conversation

Cryptophobia
Copy link
Member

The /app route should expose the procfile_structure of the app release. Since the structure on the /app route is not indicative of the actual deployable processes of the application, there should be another json structure that can tell us what the procfile is actually set to for the latest release. When using procfile_structure we can tell which of the processes exist in our procfile at this particular release:

The idea is that we can use procfile_structure for scaling and validating which processes we can actually scale through the /scale route. This is so because a call to .../app/{app_name}/scale with a payload {"worker": 1} would actually fail with 404 Not Found and this return from the api:

{
    "detail": "Container type worker does not exist in application"
}

Our app structure is below:

    "uuid": "db58126d-a76b-428c-9741-1b8d09bed2b7",
    "id": "testing-application-procfile",
    "owner": "admin",
    "structure": {
        "worker": 0,
        "newone": 0,
        "scheduler": 0,
        "web": 1,
        "testing": 0
    },
    "procfile_structure": {
        "web": "node server.js",
        "test": "node server.js"
    },
    "created": "2017-08-15T15:32:27Z",
    "updated": "2017-08-15T17:12:12Z"
}

But a call for each of the processes in procfile_structure would not fail the scale call.

This has been tested extensively with git remote application deployments and Docker image pull deployments.

The tests are not written yet.
Code in deis-cli has not been written yet.

@Cryptophobia
Copy link
Member Author

Cryptophobia commented Sep 21, 2017

This PR is related to this upstream PR:

deis/controller#1321

@Cryptophobia Cryptophobia force-pushed the feature/procfile-structure-on-app branch from a38bb88 to ae3740f Compare November 13, 2017 02:36
@Cryptophobia Cryptophobia merged commit 73f7e9e into master Nov 13, 2017
Cryptophobia added a commit that referenced this pull request Oct 1, 2020
chore(controller): permit umbrella override api group #2
duanhongyi added a commit to duanhongyi/controller that referenced this pull request Jan 3, 2021
…o-1.11.22

chore(deps): bump django from 1.11.21 to 1.11.22 in /rootfs
Cryptophobia added a commit that referenced this pull request Feb 13, 2022
…2.2.25

chore(deps): bump django from 2.2.24 to 2.2.25 in /rootfs
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