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

Check common.licenseInformation, common.tier, common.automaticUpgrade #157

Merged
merged 6 commits into from
Mar 24, 2024

Conversation

klein0r
Copy link
Contributor

@klein0r klein0r commented Feb 20, 2024

  • Added check for licenseInformation
  • Added check for required attribute common.tier
  • Added check for required attribute common.automaticUpgrade

@mcm1957
Copy link
Collaborator

mcm1957 commented Feb 20, 2024

Line 2021 (

let repoUrl = 'https://github.com/klein0r/ioBroker.luftdaten';
)
seems to be corrupt:

let repoUrl = 'https://github.com/klein0r/ioBroker.luftdaten';

Repo Checker MIUST not check anything not yet provided by adapter creator - at least not at level ERROR.

@mcm1957
Copy link
Collaborator

mcm1957 commented Feb 20, 2024

Additional question:
Where are the new attributes documented ?
How is it planned to inform developers ?

@klein0r
Copy link
Contributor Author

klein0r commented Feb 20, 2024

Where are the new attributes documented ?

Just in the schema - so your IDE should help you to remove those warnings:

Repo Checker MIUST not check anything not yet provided by adapter creator

Okay, but those attributes (like licenseInformation) are marked as required in the official schema. So my IDE complains about missing tier or licenseInformation.

@klein0r
Copy link
Contributor Author

klein0r commented Feb 20, 2024

licenseInformation is already included in create-adapter: ioBroker/create-adapter#1092

@Apollon77
Copy link
Collaborator

mybwe lets use warnings for now? in fact repo is built in a backward compatible way

@klein0r
Copy link
Contributor Author

klein0r commented Feb 20, 2024

I've just updated the existing error message for the new attribute (which was also an error):

if (!context.ioPackageJson.common.license) {
context.errors.push('[E115] No license found in io-package.json');
} else {

@mcm1957
Copy link
Collaborator

mcm1957 commented Feb 20, 2024

licenseInformation is already included in create-adapter: ioBroker/create-adapter#1092

What about [common.automaticUpgrade] ?
I think this attribute is not even useful at the moment.

@klein0r
Copy link
Contributor Author

klein0r commented Feb 20, 2024

What about tier and

https://github.com/ioBroker/ioBroker.js-controller/blob/master/README.md#tiers-start-instances-in-an-ordered-manner

tier defaults to 3 in create-adapter: https://github.com/ioBroker/create-adapter/blob/985c68b54ab530476687c755d5d5fc775de48b10/templates/io-package.json.ts#L99

What about [common.automaticUpgrade] ?

See PR. It's a js-controller 5.1 feature and just validated. There is no error or warning if nothing is defined.

@Apollon77
Copy link
Collaborator

@klein0r We discussed today in Dev Meeting: automaticUpgrade should be validated as "not included" from developer side. This field is just set by the User via Admin ... So yes it is formally part of the schema, but irrelevant for the developer.

Default tier schould be 2 in my eyes

@mcm1957 mcm1957 merged commit 35630f9 into ioBroker:master Mar 24, 2024
4 checks passed
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.

3 participants