-
-
Notifications
You must be signed in to change notification settings - Fork 28
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 filtering out deleted ports and loop over all ports to identify deleted ports #122
Conversation
Codecov Report
@@ Coverage Diff @@
## master #122 +/- ##
=========================================
- Coverage 73.9% 73.9% -0.01%
=========================================
Files 45 45
Lines 1330 1341 +11
=========================================
+ Hits 983 991 +8
- Misses 347 350 +3
Continue to review full report at Codecov.
|
This has been deployed on the test site: |
This PR contains three somewhat unrelated commits. I'll try to shortly comment on each one of them.
|
I felt that too when I tried to check and but eventually felt asleep looking for deleted ports in macports-ports repository but I tried thinking about it in a different way. If he would have given an example of a deleted port, we might have just checked that and merged and would not be able to catch any potential bugs (any slightly complicated example like
Yes, "Include" is certainly better than "show". I wanted to go for something like: But it seemed too much for now. And I am sure people who are using it will find it very inconvenient to go through the huge number of results the search returns.
Completely agree. Or search bar can support queries with tags like |
No way. Already the checkbox for deleted ports might be too much. Also note that our list of deleted ports is very incomplete (almost semi-random). If I search for deleted ports, I might eventually expect to find them all.
Maybe, but that's still quite far down the road of all other features that we might want to have. |
So you are suggesting that we go for the old method?
I did not want to change any information we picked from the Portfile. And I feel that we should not, but maybe I am wrong.
Oh, sorry, my bad.
Maybe yellow for obsolete ports?
Port discovery is one of the most important part of the app, why not convert the homepage to a full fledged search page? The box that contains the search box could become more advanced? I am just saying. |
What was the old method? I'm trying to brainstorm here, pointing out some concerns (reasons why doing this too often might not be the best idea). What would you or @umeshksingla consider the best solution here?
It might be ok to show Keeping deleted ports around is useful to some extent (if users want to create a new port it could help to know that such a port existed in the past; external links to that port would not break etc.). But the exact information about that port is of very limited use. If the port was first obsoleted, most of the information was gone at that point anyway. There is definitely no maintainer (even if one was present before the deletion, the port is de-facto no longer maintainer), dependencies are bogus, website might be broken, ... You could certainly keep the information about dependencies, but I'm afraid this will needlessly complicate proper handling at the other end, where you really don't want to show deleted dependents / dependencies.
Sounds fine. (Or basically any other way, I don't really care.)
What if we start by creating a dedicated What we could do on the first/main page is then add a |
We were taking all the ports under the updated portdirs and checking if they were available in the latest JSON.
Initially, even I did not like the idea of running this every time. But seeing the speed and simplicity of the code, I got inclined towards this. However, as you mentioned, running this every time might not be a good idea.
In any case, we will have to run it at least once. Maybe, we can merge this and later switch back to the old method?
Okay.
Seems good! |
One thing I am realising is, I need to break it into several different Pull Requests, otherwise one thing is just getting delayed due to other. |
Yes, breaking into smaller chunks probably makes sense. Also one random thought. I provided some feedback about the imperfection of importing the new builders, but on the other hand ... it will do less harm to have suboptimal queries (but complete build history in the database) than not show any builds at all. After all it's just about displaying data, so we could easily go with your initial approach, just import data, and work on improving the sql queries later. |
Yes, that was what I also though initially, but now I have both things in place: #119 . However, if we quickly just want to add those new builders, I can create a new PR. |
The newer update and search mechanism handles everything out-of-the-box. This PR is obsolete. |
I ran the tests on EC2 instance and the process was really fast, finished within 10-15 seconds.
So, I believe we can run it with every update and get rid of the old confusing method to detect deleted ports altogether.