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

Plan: Make Task Runner Drupal agnostic #130

Open
1 of 4 tasks
claudiu-cristea opened this issue May 28, 2020 · 3 comments
Open
1 of 4 tasks

Plan: Make Task Runner Drupal agnostic #130

claudiu-cristea opened this issue May 28, 2020 · 3 comments
Milestone

Comments

@claudiu-cristea
Copy link
Contributor

claudiu-cristea commented May 28, 2020

Problem

Task Runner provides default commands but some of them are Drupal-specific commands. In fact Task Runner it's not supposed to be a "Drupal tool" but a generic command runner. For this reason, the Drupal specific commands should be moved outside, in their own repo, i.e. openeuropa/task-runner-drupal.

However, this might impact some projects that are using Task Runner, mainly the Toolkit project. Currently, Toolkit uses or overrides some of the Task Runner default commands as follows:

  • drupal:settings-setup: Overridden,
  • drupal:permissions-setup: Used,
  • drupal:site-install: Used,

The problem is with the current drupal:settings-setup command. This can be overridden by Toolkit because the Task Runner version is registered before the namespace discovered commands. If we move the Task Runner version in a 3rd party library, we cannot guarantee which version will be discovered first and the Toolkit override might not work. But we want to guarantee that Toolkit is able to override the Task Runner version.

Proposal

For this reason, we propose the following strategy:

  • Move all Drupal commands in a new project: openeuropa/task-runner-drupal.
  • In openeuropa/task-runner-drupal, rename drupal:settings-setup as drupal:setup-settings (or drupal:build-settings, drupal:settings?).
  • Add openeuropa/task-runner-drupal as Composer dependency to openeuropa/task-runner, so that third-party that are updating their Task Runner version will continue to have available the Drupal commands.
  • Keep the drupal:settings-setup as default command, so that is guaranteed that Toolkit can override it as it does now but remove the command body and replace it with a call to the openeuropa/task-runner-drupal method.
  • Add a [deprecated] prefix to the drupal:settings-setup command description.
  • Trigger a muted user deprecation error from the Task Runner's drupal:settings-setup command:
    The 'drupal:settings-setup' command is deprecated in openeuropa/task-runner:1.0.0 and will be removed in openeuropa/task-runner:2.0.0. Use the 'drupal:setup-settings' command instead.
    
  • Move all other default commands under a normal namespace, but inside openeuropa/task-runner.
  • Move changelog:generate in a new openeuropa/task-runner-changelog repository.
  • Depend on openeuropa/task-runner-changelog for BC reasons.
  • Move release:create-archive in a new openeuropa/task-runner-artifact repository.
  • Depend on openeuropa/task-runner-artifact for BC reasons.
  • Remove the dependencies to openeuropa/task-runner-drupal, openeuropa/task-runner-changelog and openeuropa/task-runner-artifact from openeuropa/task-runner. Third party, such as Toolkit, will have to explicitly add these dependencies if they requires them.
  • Remove the drupal:settings-setup command together with the concept of default commands.
@ademarco
Copy link
Member

Proposal look good, only we need to make sure that whatever we do in 1.x does not require any manual fix on libraries that depends on it, such as the Toolkit, but I guess that's what you meant by:

Keep the drupal:settings-setup as default command, so that is guaranteed that Toolkit can override it as it does now but remove the command body and replace it with a call to the openeuropa/task-runner-drupal method.

About:

Are changelog:generate and release:create-archive Task Runner core commands or we should move them out, somewhere (where?)?

We could create two new repos:

  • openeuropa/task-runner-changelog
  • openeuropa/task-runner-artifact (archive actually refers to that, as in: to the possibility to create artifacts)

@claudiu-cristea
Copy link
Contributor Author

we need to make sure that whatever we do in 1.x does not require any manual fix on libraries that depends on it, such as the Toolkit, but I guess that's what you meant by:

Yes, the Toolkit will not be affected.

We could create two new repos:

Great! This add more clarity to the whole ecosystem. I will create 2 new tickets.

@ademarco Could you, please, create the 3 new repos with the same perms as this one?

@ademarco
Copy link
Member

ademarco commented May 29, 2020

Yep, will do!

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

3 participants