Skip to content

Conversation

@vishwarajanand
Copy link
Contributor

Script ran to migrate configurations is below
#!/bin/bash

php_samples_path="$HOME/github/php-docs-samples/"
products=(
        "testing"
        "bigquery"
        "bigtable"
        "spanner"
        "firestore"
        "datastore"
        "storage"
        "pubsub"
    )
for phpunit_config in $(find * -name 'phpunit.xml*' -not -path '*vendor/*' );
do
    dir=$(dirname $phpunit_config)
    # echo -e "\n Checking => $dir\n " "${products[@]}"
    # echo "${dir%/%%/*}"
    if [[ "${products[@]}" != *"${dir%%/*}"* ]]; then
        # echo -e "\n Skiping => $dir\n"
        continue
    fi
    echo -e "\n RUNNING for => $phpunit_config\n"
    $php_samples_path/testing/vendor/bin/phpunit  -c $phpunit_config --migrate-configuration && git add "${phpunit_config}"
done

Log file showing no failure

Context: #1863 was giving failures when the phpunit configs were run. Hence, limiting the scope so that this work can be brought to concluson.

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jul 18, 2023
@vishwarajanand
Copy link
Contributor Author

vishwarajanand commented Jul 19, 2023

The failing test (log) runs fine on my local:

pubsub/app % ../../testing/vendor/bin/phpunit -c phpunit.xml.dist
PHPUnit 9.6.10 by Sebastian Bergmann and contributors.

Warning:       XDEBUG_MODE=coverage or xdebug.mode=coverage has to be set

...                                                                 3 / 3 (100%)

Time: 00:04.422, Memory: 12.00 MB

OK (3 tests, 4 assertions)
pubsub/app %

So, it seems to be missing a subscription name which is hardcoded in pubsub/app/index.php and it already exists. I am re-running the tests, if it fails I will revert the pubsub/app/* changes.

@vishwarajanand vishwarajanand added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 19, 2023
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 19, 2023
@vishwarajanand vishwarajanand added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 19, 2023
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 19, 2023
@vishwarajanand vishwarajanand marked this pull request as ready for review July 19, 2023 10:26
@vishwarajanand vishwarajanand requested review from a team as code owners July 19, 2023 10:26
@vishwarajanand vishwarajanand merged commit 9fce584 into GoogleCloudPlatform:main Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants