ChromaticHQ / usher

Custom Robo commands for use on PHP projects.
https://packagist.org/packages/chromatic/usher
11 stars 6 forks source link

Fix invocation of Alternatives task #166

Closed apotek closed 11 months ago

apotek commented 11 months ago

Last minute refactor didn't get tested adequately. Second argument to alternatives task must be array.

Currently tugboat deployments with latest Usher will break. This merge request fixes the issue I introduced.

ghost commented 11 months ago
👇 Click on the image for a new way to code review #### [![Review these changes using an interactive CodeSee Map](https://s3.us-east-2.amazonaws.com/maps.codesee.io/images/github/ChromaticHQ/usher/166/9436ce43/82ca8a27ec105cdb2b53e5761867dbb69e6bcd52.svg)](https://app.codesee.io/r/reviews?pr=166&src=https%3A%2F%2Fgithub.com%2FChromaticHQ%2Fusher) #### Legend CodeSee Map legend
apotek commented 11 months ago

@adamzimmermann Once this is approved are you able to cut a new release that I can then update JFK code to use?

adamzimmermann commented 11 months ago

@apotek the 8.1 test isn't passing. Can you take a look at that?

apotek commented 11 months ago

@apotek the 8.1 test isn't passing. Can you take a look at that?

Yes, I saw that last night but have no idea how to fix. The error is

/home/runner/work/usher/usher/tests" does not exist.

But there is no usher/tests directory in the repo and I don't see any evidence of them having been there.

The CI call is:

      - name: PHP rector
        run: composer rector

Composer rector resolves to:

"vendor/bin/rector process --dry-run",

Nothing in there is creating any directories or files.

When I run it locally, it works

% lando composer rector vendor/bin/rector process --dry-run 1/1 [â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“] 100%

[OK] Rector is done!

adamzimmermann commented 11 months ago

@markdorison I think we need to tag you in here to help us out.

apotek commented 11 months ago

I can't reproduce the error locally. I'm going to guess this was a temporary github error and I am re-running the job.

apotek commented 11 months ago

I can't reproduce the error locally. I'm going to guess this was a temporary github error and I am re-running the job.

Nope. It failed again.

So it looks like the command rector process --dry-run is unable to create some working directories it needs.

However, when I run it in my container, I don't see any directories being created. I do see some tmp files being made.

I have run all the CI commands locally in lando and they all work.

This PR introduces no changes to composer.json or composer.lock so the tooling should be the same. Does github "cache" its worker containers in some way? Could it be that one was initialized poorly and is there a way to start from scratch?