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

Forcing release workers by default might not suit every use case #24

Closed
tobalsan opened this issue Feb 14, 2023 · 7 comments · Fixed by #56 · May be fixed by deprecated-packages/symplify-kernel#4
Closed

Forcing release workers by default might not suit every use case #24

tobalsan opened this issue Feb 14, 2023 · 7 comments · Fixed by #56 · May be fixed by deprecated-packages/symplify-kernel#4

Comments

@tobalsan
Copy link

Hi Tomas

in a recent update, the PushTagReleaseWorker and TagVersionReleaseWorker release workers are now always included by default in the release process.

In our company, we have a custom release process which requires us to create custom release workers, two of them that fill the role of the default release workers, amongst other things.
It was working well prior the update, but now the two default release worker try to do their thing, which causes some conflict (one of our release workers takes care of creating the local tag, which the TagVersionReleaseWorker also tries to do).

What would be the most elegant way to disable this behavior?

Thanks for your help.

@ambroisemaupate
Copy link

Hi

I have a similar issue. I'm using git-flow to create releases and I need to perform all release workers except Push and Tag, which are actually handled by git flow release finish xxxx command.

Thanks

@ambroisemaupate
Copy link

I think main issue is that default config.php is appended to MonorepoKernel configFiles instead of being preprended:

https://github.com/symplify/monorepo-builder/blob/main/src/Kernel/MonorepoBuilderKernel.php#L20

Then all config found in use monorepo-builder.php is overriden by https://github.com/symplify/monorepo-builder/blob/main/config/config.php. So this is the same issue if you need to use $mbConfig->packageDirectoriesExcludes(); method in your project.

@TomasVotruba
Copy link
Member

Thank you for feedback, this makes sense to revert then 👍

Could you send PR?

@ambroisemaupate
Copy link

It is the same issue on https://github.com/symplify/symplify-kernel package.

# src/Kernel/MonorepoBuilderKernel.php
// Always prepend default config files
$configFiles = array_merge(
    [
        ConsoleColorDiffConfig::FILE_PATH,
        __DIR__ . '/../../config/config.php',
    ],
    $configFiles,
);
# vendor/symplify/symplify-kernel/src/HttpKernel/AbstractSymplifyKernel.php
// Always prepend default config files
$configFiles = array_merge(
  [
      SymplifyKernelConfig::FILE_PATH,
  ],
  $configFiles,
);

ambroisemaupate added a commit to ambroisemaupate/monorepo-builder that referenced this issue Apr 20, 2023
ambroisemaupate added a commit to ambroisemaupate/symplify-kernel that referenced this issue Apr 20, 2023
…ilder#24 and must be merged along with symplify/monorepo-builder!32
@TomasVotruba
Copy link
Member

That seems like playing with Symfony magic.
Instead, those default workes should be removed.

@ambroisemaupate
Copy link

@TomasVotruba I don't understand what do you mean by

those default workes should be removed

For the moment, configuration order does matter because we cannot override default release workers or excluded folders defined in https://github.com/symplify/monorepo-builder/blob/main/config/config.php

@TomasVotruba
Copy link
Member

Then it seems there are 2 separate issues. This one is about default registered workers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants