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

FileCache: rebuild cache file before touch when different file owner #16120

Merged
merged 4 commits into from
Apr 22, 2018

Conversation

Slamdunk
Copy link
Contributor

@Slamdunk Slamdunk commented Apr 18, 2018

Q A
Is bugfix? yes
New feature? no
Breaks BC? no
Tests pass? yes
Fixed issues #16050

@Slamdunk Slamdunk changed the title Test Travis envs FileCache: rebuild cache file before touch when different file owner Apr 18, 2018
// If ownership differs the touch call will fail, so we try to
// rebuild the file from scratch by deleting it first
// https://github.com/yiisoft/yii2/pull/16120
if (is_file($cacheFile) && fileowner($cacheFile) !== posix_geteuid()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

posix_geteuid() may not be available. For example, it's not available under Windows.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If so this library needs an AppVeyor build.

It would be easy to add a function_exists('posix_geteuid') here, but I don't like making changes that aren't tested.

Copy link
Member

@samdark samdark Apr 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged AppVeyor. It fails in some tests: https://ci.appveyor.com/project/samdark/yii2/build/dev-1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need to merge with master in order for build to be triggered...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://ci.appveyor.com/project/samdark/yii2/build/dev-6#L274

Now that I have a failing test, I'll fix the code

@samdark samdark added the type:bug Bug label Apr 18, 2018
@samdark samdark added this to the 2.0.16 milestone Apr 18, 2018
@Slamdunk Slamdunk mentioned this pull request Apr 18, 2018
@Slamdunk Slamdunk force-pushed the fix_16050_different_cache_users branch from 7f4a171 to b8f4b71 Compare April 19, 2018 06:23
Copy link
Member

@samdark samdark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Please add changelog and we'll merge it.

@Slamdunk Slamdunk force-pushed the fix_16050_different_cache_users branch from 2eefef2 to 5597f02 Compare April 20, 2018 06:11
@SilverFire SilverFire merged commit 4f41d11 into yiisoft:master Apr 22, 2018
@Slamdunk Slamdunk deleted the fix_16050_different_cache_users branch April 22, 2018 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants