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

fix!: configuration improvements #58

Conversation

gentlementlegen
Copy link
Member

Resolves #46

@gentlementlegen gentlementlegen changed the base branch from development to main July 17, 2024 07:27
@gentlementlegen gentlementlegen changed the base branch from main to development July 17, 2024 07:27
@gentlementlegen gentlementlegen changed the title fix: configuration improvements fix!: configuration improvements Jul 18, 2024
@gentlementlegen
Copy link
Member Author

gentlementlegen commented Jul 18, 2024

Breaking changes

The configuration has been changed to facilitate user's understanding of the values. The new possible values for the reward multipliers are as follow:

  • PULL_AUTHOR
  • ISSUE_AUTHOR
  • PULL_SPECIFICATION
  • ISSUE_SPECIFICATION
  • ISSUE_CONTRIBUTOR
  • ISSUE_COLLABORATOR
  • PULL_CONTRIBUTOR
  • PULL_COLLABORATOR
  • PULL_ASSIGNEE
  • ISSUE_ASSIGNEE

QA run with the new configuration

Meniole#6 (comment) (comments are not evaluated because I burst through the API limits of ChatGpt)

@gentlementlegen gentlementlegen marked this pull request as ready for review July 18, 2024 10:10
@rndquu
Copy link
Member

rndquu commented Jul 18, 2024

@gentlementlegen Could you provide a full bot's config? Can't make it run with this one (some config validation errors).

@gentlementlegen
Copy link
Member Author

@rndquu I think the main issue is that the yaml is invalid, it seems the items under with are too indented.

@rndquu rndquu self-requested a review July 18, 2024 15:29
@rndquu
Copy link
Member

rndquu commented Jul 18, 2024

@gentlementlegen Check this config and this CI run which outputs these errors:

Invalid incentives configuration detected, will revert to defaults.
{
  type: 46,
  schema: { type: 'object', properties: {}, [Symbol(TypeBox.Kind)]: 'Object' },
  path: '/incentives/contentEvaluator',
  value: null,
  message: 'Expected object'
}
{
  type: 46,
  schema: { type: 'object', properties: {}, [Symbol(TypeBox.Kind)]: 'Object' },
  path: '/incentives/dataPurge',
  value: null,
  message: 'Expected object'
}
{
  type: 46,
  schema: { type: 'object', properties: {}, [Symbol(TypeBox.Kind)]: 'Object' },
  path: '/incentives/permitGeneration',
  value: null,
  message: 'Expected object'
}

The config is from the readme file. Are those errors expected?

@gentlementlegen
Copy link
Member Author

@rndquu No these errors are not expected. I provided a fix, that hopefully works because my GitHub Actions have been stuck for the past hour, so I cannot test in a real-world use case.

@rndquu
Copy link
Member

rndquu commented Jul 19, 2024

@rndquu No these errors are not expected. I provided a fix, that hopefully works because my GitHub Actions have been stuck for the past hour, so I cannot test in a real-world use case.

The Invalid incentives configuration detected, will revert to defaults. error is gone. Check this CI run which outputs:

Invalid configuration detected for DataPurgeModule, disabling.
Invalid configuration detected for ContentEvaluatorModule, disabling.
Invalid configuration detected for PermitGenerationModule, disabling.

Is it expected for this config?

@gentlementlegen
Copy link
Member Author

gentlementlegen commented Jul 19, 2024

@rndquu Yes it is expected because these modules seem to be missing from the configuration, so they are disabled, which is in check with this comment. Maybe the message is misleading.

Edit: they seem to be present in the configuration so it is not expected. I think because they are empty they get de-serialized as undefined values when they should be treated as empty objects, will investigate.

@rndquu
Copy link
Member

rndquu commented Jul 19, 2024

@rndquu Yes it is expected because these modules seem to be missing from the configuration, so they are disabled, which is in check with this comment. Maybe the message is misleading.

Edit: they seem to be present in the configuration so it is not expected. I think because they are empty they get de-serialized as undefined values when they should be treated as empty objects, will investigate.

I'm concerned about the above errors because they are caused by the default config provided in the readme file. It is somewhat expected that if you copy a config from the readme file then the plugin should run without any errors.

Copy link
Member

@rndquu rndquu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine

The errors mentioned here are actually present in the development branch so they are not caused by this PR. @gentlementlegen perhaps it makes sense to fix those errors in a separate PR.

@gentlementlegen
Copy link
Member Author

@rndquu Thank you, opened a ticket for this here.

@gentlementlegen gentlementlegen requested a review from 0x4007 July 26, 2024 02:48
@gentlementlegen gentlementlegen merged commit d862d53 into ubiquity-os-marketplace:development Jul 26, 2024
3 checks passed
@gentlementlegen gentlementlegen deleted the fix/configuration-improvements branch July 26, 2024 02:56
@ubiquibot ubiquibot bot mentioned this pull request Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configuration Fixes
4 participants