codecov / engineering-team

This is a general repo to use with GH Projects
2 stars 1 forks source link

Add license logging back to startup #2000

Open drazisil-codecov opened 6 days ago

drazisil-codecov commented 6 days ago

Please add


        # Check Enterprise License
        # ------------------------
        if config.get(('setup', 'enterprise_license'), None):
            write('==> Checking License')
            from app import enterprise
            license_res = enterprise.license.validate(con)

            write('    License is %s' %
                  ('valid' if license_res['valid'] else 'INVALID'))
            if license_res['warning']:
                write('    Warning: ' + license_res['warning'])

            if license_res.get('expires'):
                write('    License expires '+str(license_res['expires']))```
back to service setup. It will make troubleshooting license issues much easier.

[Slack Message](https://sentry.slack.com/archives/C04MDUBCPHU/p1719248831087029)
eliatcodecov commented 4 days ago

Preference is for API and Worker to make this check since the license was required by both to function properly. Could we potentially put this check in shared and just use it in both?