This is a sub-issue of #1910624: [META] Introduce and complete configuration schemas in all of core.
Problem/motivation
#1866610: Introduce Kwalify-inspired schema format for configuration introduced the idea of config schema. The changelog leads to (hopefully extensive) documentation on the format at http://drupal.org/node/1905070. While there are little cleanups planned for the format overall, the current format is a result of months of back and forths, so it should be perfectly fine to apply it more widely to core.
Proposed solution
Create a configuration schema for update module.
Schema in place
Schema not yet in place
update.settings.yml
Comment | File | Size | Author |
---|---|---|---|
#24 | 1919218-update-schema-24.patch | 1.38 KB | vijaycs85 |
#19 | 1919218-update-schema-19.patch | 834 bytes | sandipmkhairnar |
#19 | 1919218-diff-17-19.txt | 834 bytes | sandipmkhairnar |
#17 | 1919218-update-schema-17.patch | 825 bytes | sandipmkhairnar |
#17 | 1919218-diff-12-16.txt | 825 bytes | sandipmkhairnar |
Comments
Comment #1
vijaycs85Adding schema file.
Comment #2
sandipmkhairnar CreditAttribution: sandipmkhairnar commentedupdating schema as per code style in http://drupal.org/node/1905070#codestyle and verified in config_inspector
Comment #3
Gábor HojtsyAre these the labels used on the forms where forms exist to edit these values? Eg. "Check for updates" looks odd for a day interval value. My initial reaction was if its an on/off switch it should be a boolean. Now seeing from the schema it is an interval. What about other labels?
Comment #4
sandipmkhairnar CreditAttribution: sandipmkhairnar commentedI checked the module and updated the same label whichever available. Updated my own for remaining.
Comment #5
pfrenssenAssigning for review.
Comment #6
pfrenssen@Gabor, yeah that is how it is presented in the config forms. These are actually radio buttons which have labels that clarify the meaning:
Would it be better to use 'Update check frequency' here?
Comment #7
pfrenssenGot an answer from alexpott on #6. For the moment the best practice is to use the existing strings.
Comment #8
pfrenssen+ label: 'E-mail addresses to nofity when updates are available'
nofity -> notify
notification.threshold
should not be an integer but a string containing 'all' or 'security' according to the form:This should be type 'email' instead of type 'string'.
Comment #9
vijaycs85Thank @pfrenssen for the review. Updated all changes mentioned in #8.
Comment #10
sandipmkhairnar CreditAttribution: sandipmkhairnar commentedsmall changed in label. patch is working fine for me.
Comment #11
joates CreditAttribution: joates commented...
Comment #12
joates CreditAttribution: joates commentedthis notice / error showed up in config-inspector..
Comment #13
joates CreditAttribution: joates commentedComment #14
sandipmkhairnar CreditAttribution: sandipmkhairnar commentedI have reverted and again apply same patch. Its working fine for me.
Comment #15
joates CreditAttribution: joates commented@sandipmkhairnar my sincere apologies,
i had disabled the 'Update Manager' during the initial install (which is my normal workflow for a dev environment) and then re-enabled it to review your patch, this caused the site default email to somehow be excluded from the config (but that's obviously outside the scope of this issue -- i will raise that as a separate CMI tagged bug report)
your patch applies cleanly, i will follow up with a review..
Comment #16
joates CreditAttribution: joates commentedtaken from the coding style guide..
this label doesn't mention that it is how many "days" have passed since the last check.. it should specify number of days since last check
Timeout? Timeout (ms) might be better, without an interval measurement being specified i don't know what this value represents. (i assume milliseconds but 5ms seems a ridiculously low threshold for a HTTP request.. is it 500ms?)
this 'string' contains a zero.. is there a reason this needs to be a string? (to contain a threshold value?)
Comment #17
sandipmkhairnar CreditAttribution: sandipmkhairnar commented@joates Thanks for comment. Updated labels as per comment.
As per @pfrenssen comment in #8 notification.threshold should not be an integer but a string containing 'all' or 'security' according to the form.
Comment #18
joates CreditAttribution: joates commentedthis is a good improvement for this label but i think it could be equally good as just
'Days since last check'
there should be a single space between like this..
'Timeout (ms)'
Comment #19
sandipmkhairnar CreditAttribution: sandipmkhairnar commentedThanks @joates. Updated labels as per comment.
Comment #20
vijaycs85Comment #22
joates CreditAttribution: joates commented@sandipmkhairnar..
just a friendly tip, looks like you are having some problems with yr patch uploading and creating an interdiff workflow, i would suggest uploading a complete and working patch at this stage (so that it can pass the tests and be applied by a reviewer) -- the interdiff part is basically optional (although some argue it's "best practice") the documentation here states:
(i added the bold) i don't mean that your patch is insignificant in this context 'significant' means large and/or complex.
the .patch file is really whats needed :))
thanks for your great work on this issue sandipmkhairnar.
Comment #23
joates CreditAttribution: joates commentedsmall change to 'Timeout' label..
core/modules/update/update.fetch.inc: $end = time() + config('update.settings')->get('fetch.timeout');
its actually seconds not milliseconds (ms)
'Timeout in seconds'
seems to be the most appropriate label.. your thoughts ?Comment #24
vijaycs85Updating patch with changes...
reg
in #16, as per UI,
as options and by default, we don't want to select any of this.
Comment #26
vijaycs85#24: 1919218-update-schema-24.patch queued for re-testing.
Comment #27
joates CreditAttribution: joates commentedpatch looks great to me !
thanks @vijaycs85 and @sandipmkhairnar for your work on this issue.
Comment #28
joates CreditAttribution: joates commentedscreenshot..
Comment #29
Dries CreditAttribution: Dries commentedCommitted to 8.x.