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

Backend implementation of "detect bugs with similar domain names" #865

Closed
3 of 4 tasks
hallvors opened this issue Dec 15, 2015 · 13 comments
Closed
3 of 4 tasks

Backend implementation of "detect bugs with similar domain names" #865

hallvors opened this issue Dec 15, 2015 · 13 comments

Comments

@hallvors
Copy link
Contributor

hallvors commented Dec 15, 2015

This issue is about coding a backend for the feature described in #307
This work can probably start before the design in #307 is ready. It will most likely depend on the issues database created in #788

  • Use tldextract to get domain name in webhooks/helpers.py
  • Update db/init.py to add domain name field
  • Create new endpoint 'domainsearch' in api/endpoints.py
  • Dependency on Migration script for database. See Issue database needs a migration script. #968
@dshgna
Copy link
Contributor

dshgna commented Mar 14, 2016

Hi @hallvors: as discussed on IRC, I'll start work from here:

  • Use tldextract to get domain name in webhooks/helpers.py
  • Update db/init.py to add domain name field
  • Create new endpoint 'domainsearch' in api/endpoints.py

Afterwards, how should I continue? Perhaps work on the frontend to check realtime for matches on the domain name?

@hallvors
Copy link
Contributor Author

Sounds good! I'd suggest as a next step (on the backend - to complete this bug) creating a new endpoint in api/endpoints.py called domainsearch or something like that, accepting one argument - let's call it q. So webcompat.com/api/domainsearch?q=goog will do a lookup in the DB and return

[{"domain": "google.com", "issue":2323, "summary": "apps.google.com - wrong standard gradient syntax "}, {"domain":"google.co.uk", "issue":000, "summary": "foo" } ]

etc.

@hallvors
Copy link
Contributor Author

(maybe add url too..limit the hits to 10 or something and make sure in the clientside JS to only start searching when 3-4 letters are entered to avoid a "download the internet" torrent..)

@karlcow
Copy link
Member

karlcow commented Mar 16, 2016

In the list above I would add a reference to a separate issue on migrating the database for backups, restart of the server, and updating the schema.

@karlcow
Copy link
Member

karlcow commented Mar 16, 2016

@dshgna do not forget to commit your code modifications in a branch and reference this issue. I see you have already ticked two boxes but I don't see any commits.

@karlcow
Copy link
Member

karlcow commented Mar 16, 2016

I added the list of tasks to the first comment so We can keep track of completed tasks in cross bugs.

dshgna pushed a commit to dshgna/webcompat.com that referenced this issue Mar 16, 2016
@dshgna
Copy link
Contributor

dshgna commented Mar 16, 2016

@karlcow: Committed the tasks I've done so far :)

@karlcow
Copy link
Member

karlcow commented Mar 16, 2016

@dshgna Same comments than the previous PR. Could you avoid large commits with very long commit messages. And do atomic commits. You do not have to push them right away but I would recommend to work on your code in small bits addressing specific section. You will see it's a lot clearer in the future.

See for example what I'm doing in
master...karlcow:710/3

@dshgna
Copy link
Contributor

dshgna commented Mar 17, 2016

@karlcow Thanks so much. I will commit so in future commits. I agree it's much more clearer.

dshgna pushed a commit to dshgna/webcompat.com that referenced this issue Mar 17, 2016
dshgna pushed a commit to dshgna/webcompat.com that referenced this issue Mar 18, 2016
dshgna pushed a commit to dshgna/webcompat.com that referenced this issue Mar 18, 2016
@dshgna
Copy link
Contributor

dshgna commented Mar 18, 2016

@hallvors @karlcow Just wanted to clarify on the columns returned:

[{domain: "wordpress", issue_id: "11", summary: "wordpress.com - mobile site is not usable"}, {domain: "wordpress", issue_id: "12", summary: "in.wordpress.com - layout is messed up"}]

dshgna pushed a commit to dshgna/webcompat.com that referenced this issue Mar 18, 2016
@karlcow
Copy link
Member

karlcow commented Mar 21, 2016

@dshgna said on IRC:

[15:12] karlcow: I created a new branch for the changes in domain search as you suggested. Okay to close the existing pull request when making the new pulls request for this branch?

I said yes. So hold on for new comments.

@miketaylr
Copy link
Member

As mentioned in the PR for this issue, we want to hold off on any more work towards this feature. It's intended to be one of the projects for the Outreachy intern -- thanks.

@miketaylr
Copy link
Member

Closing for now, please see: #307 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants