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

Update documentation to reflect environment variables removed from config.php #1715

Closed

Conversation

solo-wanderer
Copy link

After upgrading CDash from v3.0.3 to v3.2.0-rc1, I have realized that some of the environment variables defined in config.php have migrated to the .env file. Therefore using php artisan config:migrate doesn't migrate some of the old settings from v3.0.3 or earlier.

This documentation update would help users upgrading from earlier versions and won't affect new installs.

Otherwise some additional tests need to be created to make sure all previous environment variables from config.php migrate properly to the .env file.

@josephsnyder
Copy link
Member

@solo-wanderer, the updates here look more than reasonable.

Do you have any examples of variables that didn't make the transition? I'll be looking into adding a test for this capability and would appreciate more information on your use case. Thanks in advance!

@solo-wanderer
Copy link
Author

The two variables that didn't make the transition on my use case were $CDASH_BASE_URL and $CDASH_DB_PASS.

Thank you kindly @josephsnyder

josephsnyder added a commit that referenced this pull request Sep 19, 2023
Recreate the variables used in the older method of building the submit
site for a CDash submission.  Hide these variables behind a proper
version check, as the new style of "CTEST_SUBMIT_URL" was introduced in
version 3.14

Fixes #1715
@josephsnyder
Copy link
Member

@solo-wanderer, I've updated the test a bit to cover the mapping from config.php in addition to the values found in config.local.php. Most things seem to transfer over okay. I'll get a merge request up for it soon.

The one thing we want to be clear about is that the migration script doesn't overwrite the values that are already found in the .env file. Were there values for APP_URL and DB_PASSWORD in the file that you were writing to?

At the same time, were there duplicate entries in both of the PHP files? The config.local.php is loaded for processing after the config.php, so if you set $CDASH_DB_PASS in both, you might only see the value in config.local.php.

@solo-wanderer
Copy link
Author

@josephsnyder, I followed documentation and used .env.example as a starting point, e.g.:

cp .env.example .env

I inspected the example file and both variables, APP_URL and DB_PASSWORD, are not commented and are assigned to "https://localhost" and "secret" respectively. Thus preventing the migration script from overwriting those values with the ones defined in config.local.php.

Upon commenting those variables, the script properly migrated those two from config.local.php.

@williamjallen
Copy link
Collaborator

CDash 3.3 will drop support for migration from CDash 2.x. See #1801.

I believe this PR is now unnecessary

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

Successfully merging this pull request may close these issues.

3 participants