Galaxypedia-Wiki / ketchupbot-updater

epic galxy pedia updator
MIT License
1 stars 0 forks source link

Bot does not remove info not returned by Galaxy Info API #37

Closed CornHusker89 closed 1 month ago

CornHusker89 commented 6 months ago

I get that this behavior is intentional, but this can also cause problems.

An example of this is when permits got removed for limited ships, so the Galaxy Info API stopped returning permit information (bc those ships didn't require permits anymore), however because of this behavior, limited ship infoboxes reported that these ships still required permits, which was false.

I think that we should implement a system where if the api dosen't return anything for an infobox parameter, the bot then checks if the api ever did return a result. If it never did return something, the bot will leave it as it is (for example, the ship creator section of the infobox). If the api did return something in the past, it will remove it from the infobox (ex. limited ship permits).

This is the affected code segment https://github.com/smallketchup82/ketchupbot-updater/blob/f0af630db0788a47e052bf4a69f718722e2c9648/src/index.ts#L367-L374

CornHusker89 commented 6 months ago

as a side note, i still dont have the galaxy api token or endpoint so i cant really test any changes here resolved

smallketchup82 commented 5 months ago

this seems like more of an issue with direction than a bug, so im removing the bug. also this probably still applies to ketchupbot v3 so im keeping it opened.

will begin discussion on this soon

smallketchup82 commented 2 months ago

@CornHusker89 okay i saw this issue again and i'll give you my response (sorry for how long it took)

essentially, this is unfeasible from a technical standpoint. how do you efficiently differentiate between what ketchupbot put on the page, and what other people put down? say a user adds a misc parameter, like manufacturing fee. but since ketchupbot doesnt get that information from the api, it'll delete it. this can EASILY become invasive and annoying. you do provide a solution:

I think that we should implement a system where if the api dosen't return anything for an infobox parameter, the bot then checks if the api ever did return a result. If it never did return something, the bot will leave it as it is (for example, the ship creator section of the infobox). If the api did return something in the past, it will remove it from the infobox (ex. limited ship permits).

but my question now is, how do you plan on persisting this for EVERY installation of ketchupbot? and would this really justify making ketchupbot stateful, and the overhead that comes with that?

if we really care about deleting stale parameters—where devs suddenly drop a parameter and now we want to remove it from every infobox—we can either delete that parameter from the infobox template to make it not display, or use something like https://www.mediawiki.org/wiki/Extension:Replace_Text/en#Usage to delete the parameter off of every ship page.

though, in my c# version of ketchupbot, i already provided a method of excluding certain parameters from the end result (albeit in a GlobalConfig object which i should probably make user accessible), which essentially "deletes" the parameter. i think this is a good compromise for this issue

smallketchup82 commented 1 month ago

@CornHusker89 do you have anything else to add on here or should i close this issue as wontfix?

CornHusker89 commented 1 month ago

all g from me