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 to propose projects to be deleted #87
Comments
Project deleted but it is an interesting idea |
👍 for deletion feature |
Yeah, we don't want to let general users delete projects directly, but allowing them to click a button to 'propose' that one be deleted would be cool. Admins could then go through a queue later and either 'clear the flag' or 'delete the project' on all flagged projects. |
Ralph, a propose is a good idea. The maintainer of a project should be able to do that. Alternatively, there could be an option to disable an entry temporarily. A cron job for garbage collection could remove all those inactive entries from time to time (let's say once a month or so?), this should not happen too often though. |
One problem here .. anitya currently has no concept of a maintainer of a project. Anybody can edit anything (but only admins can delete.. and do a few other things), afaik. |
That is correct |
The restriction to admins for a deletion rule is okay for me. So the "propose for deletion" button could set an inactive flag of the project entry and let it wait for an admin (or monthly cron job) to collect the garbage, as described above. |
Please delete: https://release-monitoring.org/project/5769 |
On Thu, Mar 05, 2015 at 06:01:33AM -0800, Ralph Bean wrote:
One problem here .. anitya currently has no concept of a maintainer of
a project. Anybody can edit anything (but only admins can delete..
and do a few other things), afaik.
The advantage of the wiki page with cnucnu was that it allowed to keep
track of changes and revert things that should not have happened. There
was no notion of a maintainer as well. Maybe anitya can keep track of
changes as well to allow reverting them if unintended.
|
Sat, 07 Mar 2015 11:16:00 -0800 Till Maas:
Maybe anitya can keep track of changes as well to allow reverting
them if unintended.
There are "logs" available about your actions (in the top menu bar).
You've to login therefore. Besides that, all your activity goes as well
to fedmsg.
|
There are logs stored in anitya and accessible to administer but they do not offer an automated way of reverting a change. Might be a cool idea :) -------- Message d'origine -------- On Thu, Mar 05, 2015 at 06:01:33AM -0800, Ralph Bean wrote:
The advantage of the wiki page with cnucnu was that it allowed to keep |
I hope to have given this a push tonight, by adding some code at this branch:
I can add backend code for this tomorrow, add a view for admins to view flags, and see how it works out, but I figured I'd check in first. Any thoughts, worries, ideas? |
First thought. Here is a beautiful depiction: The flag button is currently down in the 'mappings' section. We use those mappings to say things like "this sqlachemy project? in Fedora it's called python-sqlalchemy. Furthermore, in ubuntu it's called pysqlalchemy and in debian it's called sqlalchemy-py" (those aren't the real names.. but you get the idea). The idea here is to create a database against which we can do all sorts of fantastic things one day (coordinate multi-distro updates, etc). So, we wanted this flagging feature not just for the mapping, but for the top-level project objects themselves. Sometimes, people add 'sqlalchemy' to the database multiple times.. and we want to be alerted to the duplicates so we can prune them every now and then. On reading the code, it looks like the implementation is actually correct even though the button placement could change. The code is trying to associate the new flag with the project model, not the mapping. 🍰 Furthermore (you alluded to this), but this copypasta stuff can go: diff --git a/anitya/ui.py b/anitya/ui.py
index 1ff224f..3025347 100644
--- a/anitya/ui.py
+++ b/anitya/ui.py
@@ -404,9 +404,6 @@ def flag_project(project_id):
if not project:
flask.abort(404)
- plugins = anitya.lib.plugins.load_plugins(SESSION)
- plg_names = [plugin.name for plugin in plugins]
-
form = anitya.forms.FlagProjectForm(
obj=project) And This is all going in the right direction. Thanks for working on it! |
@oddshocks any progress on this? |
I really let this get away. About to try to kill it right now. Will update in a bit. |
I've added an attempt at backend code at https://github.com/fedora-infra/anitya/tree/feature/flag-project, including the lib and model code. I'm sure it could be improved. On the front end, I'm still having that odd issue with the project template. I was able to easily add the Flag Project view and template, but attempting to add a Flag button to the Project view isn't working. In fact, I can't seem to make any changes to that template. I even tried changing some text on the project template to a nonsense word, and I couldn't get the change to show in-browser, even with ctrl-f5. Any thoughts? Hopefully I went in the right direction, here. I was sort of confused about getting the impression that there already existed a Flag button for mappings, because a grep for |
@ralphbean I just got what you were trying to say with that diagram. It just clicked. I thought you were saying that button already existed down there. I didn't realize until tonight that I had mistakenly put the button in the Mappings section. Explains my template "issue". 🐫 |
Made more progress on this on feature/flag-project. Still needs a better admin view for flags (as I copied the current one from the Logs view), including a "delete" button of some sort for each reported flag. Related to this, I also need to add a "state" attribute to |
Rather than a |
I would like to be able to propose projects to be deleted for example after I accidently created a duplicate:
https://release-monitoring.org/project/5582/
The text was updated successfully, but these errors were encountered: