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
Store StagingWorkflow in the backend #6206
Store StagingWorkflow in the backend #6206
Conversation
4477ed5
to
b7bb289
Compare
src/api/app/controllers/webui/staging_workflows/staging_projects_controller.rb
Outdated
Show resolved
Hide resolved
1a82493
to
9fd9e36
Compare
0f90425
to
fe1d1a3
Compare
fe1d1a3
to
fdc7547
Compare
You should also implement the read and update from the file to the database in the same commit/pull request if you use a source file here. Otherwise data can run out of sync easily. |
writing to that file outside of the model should be plainly forbidden IMO. |
how about?
|
That would be just one out of many ways to work on it. And why should it be forbidden, if you add it here it is obvious that it is also the API to create/modify it, no? |
But it's not. Creating a staging project requires more than adding it to a xml file. |
So possibly the _staging_workflow shouldn't be a file in _project after all - where else to store it to make it obvious that it can't be edited at free will? |
This is how we forbid other underscore files. An API for creating/changing this is not what we are going to do now. |
@hennevogel this is on package name level and not on file level. The api it needs also be writeable anyway in the end, it is bad idea to add cruel hacks to workaround some situations (and for sure not all). It shows that the design should have been documented first before hacking .... |
does |
using a file to create staging projects is a bad API anyway. So let's talk about an API to modify staging workflows independent of _project |
_attribute is a very special case, because it can not be bind to the package model container of "_project" (since it is project model). reading works different there anyway. But this not true for a regular source file. dunno if a file in _project makes sense for this, but it must be configurable via api anyway and there should not be two ways for same content. So, yes, better define first how to create/modify/delete it via api first before defining the place. |
We will do that for sure, I don't like having UI or API only features either. But not now, in a later iteration. |
@hennevogel fine if you don't want to do it now, but then don't store this file either now. It only cries for problems, stuff will be out of sync, people may use it already because they can see it.... I was only against to it partly and creating all these problems. |
We can also just "forbid" writing to this file like we do for _attribute for now. |
fdc7547
to
d1fe4d5
Compare
d1fe4d5
to
297b378
Compare
c1ec051
to
00f0731
Compare
StagingWorkflow is stored in the backend under `_project` directory with the name `_staging_workflow`. In this special file, we store a minimal info of the staging_workflow.
00f0731
to
a621342
Compare
@hennevogel and @bgeuken could you review it again? |
code* and hakiri hang. Coverage is fine, see coveralls and there are no security warnings on hakiri for this commit. Merging... |
StagingWorkflow is stored in the backend under
_project
directory withthe name
_staging_workflow
. In this special file, we store a minimalinfo of the staging_workflow.