Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Config validation error #684

Merged

Conversation

whilefoo
Copy link
Collaborator

@whilefoo whilefoo commented Aug 28, 2023

Resolves #680

Example:
ubiquity-whilefoo@b74601f#comments
ubiquity-whilefoo@c8e02c0#comments

It was kinda hard to log config errors because if the config was invalid, I also didn't have Supabase keys which the logger needs to write logs to database, so I had to write additional fallbacks

@netlify
Copy link

netlify bot commented Aug 28, 2023

Deploy Preview for ubiquibot-staging ready!

Name Link
🔨 Latest commit 3914532
🔍 Latest deploy log https://app.netlify.com/sites/ubiquibot-staging/deploys/65001875ab123800087f6c8c
😎 Deploy Preview https://deploy-preview-684--ubiquibot-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@whilefoo whilefoo marked this pull request as ready for review August 28, 2023 08:55
@0x4007
Copy link
Member

0x4007 commented Aug 28, 2023

First one is great. Second one is vague is there anything you can do to improve that type of message?

@whilefoo
Copy link
Collaborator Author

I improved the message:
ubiquity-whilefoo@386a772#comments

@0x4007 0x4007 added ping and removed ping labels Aug 29, 2023
src/adapters/index.ts Show resolved Hide resolved
src/bindings/event.ts Outdated Show resolved Hide resolved
src/handlers/push/index.ts Outdated Show resolved Hide resolved
src/utils/private.ts Outdated Show resolved Hide resolved
src/utils/private.ts Outdated Show resolved Hide resolved
src/utils/private.ts Outdated Show resolved Hide resolved
@web4er
Copy link
Contributor

web4er commented Aug 30, 2023

It would be nice to get the name additional properties in console logs and supabase logs.

biquiBot Error: Invalid repo config: data must NOT have additional properties undefined error ubiquibot web4erOrg undefined undefined

The bot didn't add comment here on wrong config.
web4erOrg@e556157

I have only price-multiplier and issue-creator-multiplier in my org config. If I add only price-multiplier in repo config, this shows up in console log and supabase log, but nothing in commit comments.

UbiquiBot Error: Invalid repo config: data must have required property 'issue-creator-multiplier' undefined error ubiquibot web4erOrg undefined undefined

@whilefoo
Copy link
Collaborator Author

It would be nice to get the name additional properties in console logs and supabase logs.

Added

The bot didn't add comment here on wrong config.
web4erOrg@e556157

This happened because the config on development was invalid, so you pushed the change, the bot tried to load the current config but it's invalid so it stops. I modified the code to run validateConfigChange even if config load fails.

@whilefoo whilefoo mentioned this pull request Sep 3, 2023
src/adapters/index.ts Show resolved Hide resolved
src/adapters/index.ts Show resolved Hide resolved
0xcodercrane
0xcodercrane previously approved these changes Sep 11, 2023
@0xcodercrane
Copy link
Contributor

It looks like you should merge the development branch into your local config-validation-error branch @whilefoo

@whilefoo whilefoo disabled auto-merge September 12, 2023 07:55
@whilefoo whilefoo merged commit b3667b8 into ubiquity:development Sep 12, 2023
8 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clear Logging Error for broken ubiquibot-config.yml
4 participants