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

drush hook:deploy not reflected in the schema #23

Open
penyaskito opened this issue Jan 8, 2025 · 3 comments
Open

drush hook:deploy not reflected in the schema #23

penyaskito opened this issue Jan 8, 2025 · 3 comments

Comments

@penyaskito
Copy link

drush hook:deploy is not reflected in the schema.
As it works as hook_post_update and hook_update_N, wonder if we should track that in the site-schema too.

@eiriksm
Copy link
Owner

eiriksm commented Jan 8, 2025

I have been thinking the same actually

My initial reasoning was that I never saw a contrib module have that, and that it probably would belong to a project, and therefore to the very pr you introduced it in. Not in a for example an automated update (which is my personal use case)

What are your thoughts?

@penyaskito
Copy link
Author

I found https://www.drupal.org/project/drupal/issues/3206497 today just minutes after creating this issue.

The deploy hook is meant to be used by sites and not by core or contrib, so 100% agree with you.

I'm not totally sure if we want to track this, for the same reason you mention. But I missed seeing this discussion anywhere :-)

I'm happy with a won't fix, but we might want to document why we aren't tracking it.

Reasons for not tracking it:

  • Contrib won't use it, and the main reason most people use site-schema is tracking changes for automatic updates.
  • As potentially automating comparisons on CI would fail in the very same PR you are introducing the change, it's just noise.

Reasons for tracking it:

  • For a given site, you might want to see (or automate) if an environment is up-to-date. Which can be done with several other ways, but this could be an additional one.
  • Automatic checks on CI would trigger the reviewer to pay attention to the upgrade.

@eiriksm
Copy link
Owner

eiriksm commented Jan 9, 2025

Great summary!

I am also happy to accept a PR with an opt in option. As an option to the command that is

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

No branches or pull requests

2 participants