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 URL is changed, update ecosystem value as well #764

Closed
eclipseo opened this issue Apr 6, 2019 · 2 comments · Fixed by #859
Closed

If URL is changed, update ecosystem value as well #764

eclipseo opened this issue Apr 6, 2019 · 2 comments · Fixed by #859
Assignees
Labels
Milestone

Comments

@eclipseo
Copy link

eclipseo commented Apr 6, 2019

Example
https://release-monitoring.org/project/13720/

I modified the .de into .com for the blogspot URL, but ecosystem stayed in .de.
This is problematic because the APIv2 search parameters is using ecosystem to match projects.

@eclipseo eclipseo changed the title If URL is changed, update ecosystem vajue as well If URL is changed, update ecosystem value as well Apr 7, 2019
@Zlopez Zlopez added the type.bug label Apr 8, 2019
@Zlopez
Copy link
Contributor

Zlopez commented Apr 8, 2019

This is definitely a bug. The ecosystem should be either backend related or homepage and if homepage is changed, the ecosystem should be changed too.

@Zlopez
Copy link
Contributor

Zlopez commented Apr 30, 2019

Implementations details

This should be implemented as a SQLAlchemy event in https://github.com/release-monitoring/anitya/blob/master/anitya/db/events.py

Right now we are only checking if the ecosystem is filled, if not we will fill it. This should be done differently, so every time there is a change to homepage or backend the ecosystem should be also changed.

@Zlopez Zlopez added this to the 0.18.0 milestone Oct 15, 2019
@Zlopez Zlopez self-assigned this Dec 12, 2019
Zlopez added a commit to Zlopez/anitya that referenced this issue Dec 12, 2019
Till now ecosystem was only set once, when project was created. With
this commit ecosystem is changed when homepage or backend change is
emitted. The ecosystem value is set as follows:
 - Ecosystem is set using backend if backend is associated with ecosystem
 - Ecosystem is set to homepage

Fixes fedora-infra#764

Signed-off-by: Michal Konečný <[email protected]>
Zlopez added a commit to Zlopez/anitya that referenced this issue Dec 16, 2019
Till now ecosystem was only set once, when project was created. With
this commit ecosystem is changed when homepage or backend change is
emitted. The ecosystem value is set as follows:
 - Ecosystem is set using backend if backend is associated with ecosystem
 - Ecosystem is set to homepage

Fixes fedora-infra#764

Signed-off-by: Michal Konečný <[email protected]>
Zlopez added a commit to Zlopez/anitya that referenced this issue Dec 17, 2019
Till now ecosystem was only set once, when project was created. With
this commit ecosystem is changed when homepage or backend change is
emitted. The ecosystem value is set as follows:
 - Ecosystem is set using backend if backend is associated with ecosystem
 - Ecosystem is set to homepage

Fixes fedora-infra#764

Signed-off-by: Michal Konečný <[email protected]>
Zlopez added a commit to Zlopez/anitya that referenced this issue Dec 17, 2019
Till now ecosystem was only set once, when project was created. With
this commit ecosystem is changed when homepage or backend change is
emitted. The ecosystem value is set as follows:
 - Ecosystem is set using backend if backend is associated with ecosystem
 - Ecosystem is set to homepage

Fixes fedora-infra#764

Signed-off-by: Michal Konečný <[email protected]>
@mergify mergify bot closed this as completed in #859 Dec 17, 2019
mergify bot pushed a commit that referenced this issue Dec 17, 2019
Till now ecosystem was only set once, when project was created. With
this commit ecosystem is changed when homepage or backend change is
emitted. The ecosystem value is set as follows:
 - Ecosystem is set using backend if backend is associated with ecosystem
 - Ecosystem is set to homepage

Fixes #764

Signed-off-by: Michal Konečný <[email protected]>
Zlopez added a commit to Zlopez/anitya that referenced this issue Dec 18, 2019
Till now ecosystem was only set once, when project was created. With
this commit ecosystem is changed when homepage or backend change is
emitted. The ecosystem value is set as follows:
 - Ecosystem is set using backend if backend is associated with ecosystem
 - Ecosystem is set to homepage

Fixes fedora-infra#764

Signed-off-by: Michal Konečný <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants