ubiquity-os-marketplace / daemon-pricing

0 stars 12 forks source link

feat: global label change via config #18

Open Keyrxng opened 2 months ago

Keyrxng commented 2 months ago

Resolves https://github.com/ubiquibot/plugins-wishlist/issues/8


excludeRepos will have many uses but the reason that spurred me to include it was that in my QA devpool-directory was being updated with a green Price: $10 label when it should have a grey Pricing: $10 so that would likely be a default for us to include

gentlementlegen commented 3 weeks ago

@Keyrxng Can you please resolve the conflicts?

Keyrxng commented 2 weeks ago

QA: https://github.com/ubq-testing/assistive-pricing/actions/runs/11088257095/job/30807939009

I use the worker for local testing but this is now an action plugin after this PR.

Auth:

image

Pre: 3x image

Post: 3x image

Pre: 10x image

Post: 10x image


The logic right now is like this:

  1. with globalConfigUpdate omitted, we simply update the repo labels and we do not update or remove labels from tasks.
  2. enabled, we delete any incorrect price label from issues according to the new reward bracket and then update all issues with time and priority labels with new pricing.

About number one, with it omitted, should this feature update currently priced tasks to the new bracket?

About two, should all time and priority labeled tasks have a price label applied to them? Or should they remain unpriced if they were unpriced before the run?

gentlementlegen commented 1 week ago

@Keyrxng I tested in my org and it seems to work fine, I have a few questions however:

Keyrxng commented 1 week ago

Couldn't we parallelize this more to get it running faster?

Can it be addressed in another task because it'll take some time to work out how best exactly to optimize for speed while trying to avoid both this plugin hitting the secondary and also allowing enough room for other plugins that are operating on the same token to operate effectively.

you mentioned that it should be an Action, but this is currently a Worker, so how do we set this up?

It uses the same env vars so just update the - plugin: <url> to point at the repo instead.

gentlementlegen commented 1 week ago

Can it be addressed in another task because it'll take some time to work out how best exactly to optimize for speed while trying to avoid both this plugin hitting the secondary and also allowing enough room for other plugins that are operating on the same token to operate effectively.

Sure thing.

It uses the same env vars so just update the - plugin: to point at the repo instead.

What about the commands and the change of labels that have to respond instantly?

Keyrxng commented 1 week ago

What about the commands and the change of labels that have to respond instantly?

You want to split this like telegram-bridge then and have workflow and worker proxy callbacks and we can have the best of both worlds? There's no way we can optimize things enough that we can run a global update like this on one worker request, I don't see that happening, although I haven't tried it deployed but very unlikely.

gentlementlegen commented 1 week ago

If it is no deal breaker that /allow and label changes take long to respond then no I do not mind, @0x4007 @whilefoo what do you think?

gentlementlegen commented 1 week ago

@Keyrxng Can you resolve the conflicts thank you.

0x4007 commented 1 week ago

If it is no deal breaker that /allow and label changes take long to respond then no I do not mind, @0x4007 @whilefoo what do you think?

I already have a solution in the works for ~3 second typescript GitHub action, cold start response time, so I don't think the lag will be an issue in the near future.