- Issue created by @borisson_
- ๐ง๐ชBelgium borisson_ Mechelen, ๐ง๐ช
This is a bit tricky, because it is actually currently not a correct date type.
This is the current schema:
revision: type: integer label: 'Create new revision'
The same thing happens on node types, and that looks a bit different:
new_revision: type: boolean label: 'Whether a new revision should be created by default
As far as I understand it, these actually do the same thing, and they are validatable, because they are booleans.
We can't just make it the boolean type, because it might be the same in the database (0/1), but in the schema it is written as true/false instead of the integer, so I think this one needs an upgrade path as well?
I don't think we should update the key to
new_revision
, because while that would be more consistent; and easier to understand, that will probably be more difficult to land? I'm curious to see what the block content maintainers think.I'll add a Merge request that changes the data type and let's see what breaks.
- Merge request !5170Update revision type to be a boolean, because it is โ (Closed) created by borisson_
- Status changed to Needs review
about 1 year ago 12:12pm 29 October 2023 - Status changed to Needs work
about 1 year ago 1:31pm 30 October 2023 - ๐บ๐ธUnited States smustgrave
Seems to have some test failures in the pipeline
- Status changed to Needs review
about 1 year ago 7:18pm 16 December 2023 - ๐ง๐ชBelgium borisson_ Mechelen, ๐ง๐ช
I think I fixed all the broken tests, also merged 11.x back into this.
- Status changed to RTBC
about 1 year ago 5:59pm 17 December 2023 - ๐บ๐ธUnited States smustgrave
Ran locally and update hook ran fine. And change to boolean makes sense. LGTM.
- Status changed to Needs work
about 1 year ago 8:12am 18 December 2023 - First commit to issue fork.
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
@sourabhjain You applied my suggestion locally and then pushed it. But you added a trailing blank line, which is now causing a
phpcs
failure. More tests will fail too. Can you address those things too? ๐๐ - ๐ฎ๐ณIndia sourabhjain
Yes @wim-leers. I saw your suggestion on PR and after that applied it manually on local and pushed it.
And sorry for trailing blank line issue. I have pushed it again. Thanks - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Good! ๐
Now there are 114 kernel test failures, 77 functional test failures and 17 functional JS test failures. Can you push those forward too? ๐
- ๐ฎ๐ณIndia sourabhjain
I apologize for any inconvenience, @wim-leers. I misunderstood the suggestion, thinking it was a provided task that anyone could work on. I will be more careful in the future and ensure that such misunderstandings don't happen again. Rest assured, everyone at Valuebound will be mindful of this.
- ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Causing test failures is fine of course! ๐ I make a hundred mistakes every day. You're right that anybody can work on this. But โฆ only applying a suggestion that takes a single click to apply is not quite helpful. A suggestion is meant to make it easier for whichever person is working on the merge request, to speed up addressing the feedback in a review. IOW: blindly applying suggestions is not helpful; it causes confusion about the state of a merge request.
Looking forward to our next interaction! ๐
- ๐ง๐ชBelgium borisson_ Mechelen, ๐ง๐ช
Addressed most of Wim's suggestions. We will need to:
1. Fix all the tests, the test failures are caused by the configuration not matching the schema, so we will need to add `'revision' => FALSE,` in a whole bunch of places.
2. Add an upgrade path test, I haven't done that before and I'm not sure where I'll find the time to learn how to write one.Both of these can definitely be picked up by someone else.
- ๐ง๐ชBelgium borisson_ Mechelen, ๐ง๐ช
I started changed some of the tests to improve the state of the pr, but I think I need to make a lot of changes like this in tests:
@@ -37,6 +37,7 @@ public function testReusableBlocksOnlyAreDerived() { 'id' => 'spiffy', 'label' => 'Mucho spiffy', 'description' => "Provides a block type that increases your site's spiffiness by up to 11%", + 'revision' => FALSE, ]);
This doesn't make sense to me, is there a better way to do this?
- Assigned to phenaproxima
- ๐บ๐ธUnited States phenaproxima Massachusetts
Self-assigning for update path tests.
- Issue was unassigned.
- Status changed to Needs review
12 months ago 7:45pm 4 January 2024 - Status changed to Needs work
12 months ago 8:45pm 4 January 2024 - Status changed to Needs review
12 months ago 10:16pm 4 January 2024 - Status changed to RTBC
12 months ago 1:02am 5 January 2024 - ๐บ๐ธUnited States smustgrave
Sweet! Seems validation for revision is good and didnโt break anything. Excited to see these improvements
- Status changed to Needs work
12 months ago 9:39am 5 January 2024 - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Found 2 actual bugs, 1 question.
- Assigned to wim leers
- Status changed to Needs review
12 months ago 1:42pm 5 January 2024 - ๐ง๐ชBelgium borisson_ Mechelen, ๐ง๐ช
I'm not sure if i can rtbc the latest changes since I've worked on this issue a lot as well, but I agree with @phenaproxima that this is committable as is.
- Issue was unassigned.
- Status changed to RTBC
12 months ago 11:48am 8 January 2024 - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
The last commit (aka my suggestion) introduced a small regression, sorry:
Exception: Deprecated function: trim(): Passing null to parameter #1 ($string) of type string is deprecated
Easy fix though: add
?? ''
โ applied this trivial change ๐P.S.: one of my remarks on the MR was indeed wrong, as @phenaproxima pointed out. Opened an issue for that (which does not block this one): ๐ Improve NotBlank DX in config (schema) validation Needs review ๐
-
larowlan โ
committed 4b5138e6 on 11.x
Issue #3397493 by borisson_, phenaproxima, Wim Leers: Add validation...
-
larowlan โ
committed 4b5138e6 on 11.x
- Status changed to Fixed
12 months ago 5:36am 15 January 2024 - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Yay, this brought us to 0.9 โ 1.1% of all types being fully validatable, and bumped the Standard install profile from 4.4 to 4.9%! https://project.pages.drupalcode.org/config_inspector/ ๐
Automatically closed - issue fixed for 2 weeks with no activity.