-
Notifications
You must be signed in to change notification settings - Fork 6
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
Config validator fails to validate on non-essential differences #165
Comments
Hmmm. I wonder if this code is actually working as intended: if (!is_array($configJson) || $configJson !== []) {
$this->say($drushOutput);
if ($setPrStatus) {
$this->setGitHubStatusError(
gitHubCheckName: self::GITHUB_STATUS_CHECK_NAME,
gitHubCheckDescription: 'Drupal config validation failed!'
);
}
throw new TaskException(
$this,
'Drupal database configuration does not match the tracked file system configuration.'
);
} Because Tugboat is still saying the build was successful, even though the build log has the error and the build stops. Looking at this more in-depth, I see that the options are set right, so perhaps |
@apotek We have typically set this up as a check that is separate from the Tugboat build itself. So the Tugboat build is successful and shows as such in the PR status and then this check runs and sets its own status. |
@apotek and I chatted about this some earlier today. The summary is:
tl;dr this is a feature not a bug. However.... there are times were we want to allow a diff potentially. There are two ways we could do this:
Given that the former option seems not feasible, I think things are pretty straightforward since we only have one options. 😂 @apotek thoughts? |
It's not possible to send a warning or info status, but we could opt to send a
This works too, and is, it seems, the supported path. I just prefer a "temporary" flag for overriding the build error when things are in a known unstable state as opposed to reconfiguring the repo (which one might likely forget to ever switch back) Nevertheless, let's do what you suggest. We'll make it supported that one can override the error. |
You are correct. I didn't think of that. I could see that being glossed right over and it would be more complex to configure too IMO.
I share your concern with forgotten "temporary" flags, but I could say the same thing about changing the configuration of the check. One change is done via GitHub admin and one requires a code change. So I guess this is a case of needing to pick your poison. 🙁
This was just shared this with us this morning, which only reinforces the importance of the developer experience this check seeks to address. |
Description
The config validation check that we run post config:import can in some cases report a configuration mismatch due Drupal not always matching what is in yaml (and vice a versa).
The example I am experiencing right now is that the migration configuration files in JFK have comments in them, as well as some pretty advanced yaml merging functionality that Drupal tends to resolve and throw away on import.
So, in tugboat, I get these errors:
The deployment does seem to complete successfully (Tugboat appears to think it was successful) so it is not breaking anything, but it's not great to see red error text at the bottom of the build log.
Can we either: 1) Drop this from error level to warning level (yellow) since it is not actually failing the build? OR 2) Provide a way to report the diff informationally?
I can't think of a way to do the config check/validation in a way that won't flag these differences, so maybe we just provide a lower level of reporting by default, or possibly also a way to set a lower level via a flag, something like so:
The text was updated successfully, but these errors were encountered: