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

If the incarnation status is "failed", and get-incarnation-by-id, then the template-data should not null #77

Open
feiyunzhou opened this issue Aug 29, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@feiyunzhou
Copy link
Contributor

If the incarnation status is "failed", and get-incarnation-by-id, then the template-data should not null

@timofurrer
Copy link
Collaborator

The reason for this is that the template information like template_repository, template_repository_version and template_data is not cached in foxops database, but is queried from the .fengine.yaml file of the incarnation repository. I assume that this file doesn't even exist or doesn't contain that information ...

or the incarnation wasn't yet persisted in the database at all - but then you'd get a 404 when querying the incarnation details.

@feiyunzhou any more insights to what the error situation was?

@defreng I think this one more issue we'll have if foxops is not the single source of truth .. we may be able to mitigate this though by writing the .fengine.yaml file not only on success - but currently we kinda use that fact to indicate a success incarnation.

@timofurrer timofurrer added the bug Something isn't working label Aug 29, 2022
@feiyunzhou
Copy link
Contributor Author

I got a 200 status, but the field template_data is null. I think I have put the incarnation with the template_data successfully, so whatever the status is "failed"/"pending", the template_data should populated when querying the incarnation details.

@defreng
Copy link
Contributor

defreng commented Aug 29, 2022

@timofurrer yeah I more and more agree that the foxops DB itself should become the source-of-truth for all the information...

There are many other good reasons to have that info in the DB, like:

  • Quick queries for all incarnations with some template
  • proper relations to other Template or Hoster entities in the DB, as soon as we add that feature to foxops

@defreng
Copy link
Contributor

defreng commented Sep 1, 2022

Now I'm wondering, though:

In that case (incarnation initialization fails). Should that incarnation even be added to the database? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants