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

Ensure test suite and file rotation work on Windows #509

Merged
merged 36 commits into from
Aug 10, 2019
Merged

Ensure test suite and file rotation work on Windows #509

merged 36 commits into from
Aug 10, 2019

Conversation

lukebakken
Copy link
Contributor

Follow-up to #493

@jadeallenx
Copy link
Member

Thanks for taking this on

@lukebakken lukebakken marked this pull request as ready for review August 5, 2019 21:23
@lukebakken
Copy link
Contributor Author

Hi @mrallen1!

I have confirmed today that these changes do address the file rotation issues in RabbitMQ on win32. I'm continuing to test but I figure getting a review started would be nice.

There is a breaking API change in lager_rotator_behaviour in that a file's creation time is passed as an argument. I suppose we could get clever in working around that breaking change if you'd like, or use this as an opportunity to release Lager 4.0.0.

What do you think?

@jadeallenx
Copy link
Member

Looks like solid work but tbh I'm not a huge fan of so many whitespace changes - all the noise makes it hard to trace what "real" changes have been made. As far as breaking the lager_rotator_behaviour I think we can tag a new release as 3.8.0 with appropriate warnings in the README.

It would be great to get a blurb in the README as part of this PR.

@lukebakken
Copy link
Contributor Author

lukebakken commented Aug 6, 2019

@mrallen1 there was one file formatted with 2-space indentation (test/lager_test_function_transform.erl). Can you give the "ignore whitespace" review link a try before I revert that?

https://github.com/erlang-lager/lager/pull/509/files?w=1

I'll add a README update today. Still testing!

throw:{test,exception}",
?assertNotEqual(0, string:str(Result, ExpectedPart)).

Want = "pr_stacktrace_test:pr_stacktrace_throw_test/0 line 26\n pr_stacktrace_test:make_throw/0 line 16\nthrow:{test,exception}",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When I clone this repo on win32, my git settings check out files with \r\n endings, which makes this test fail due to embedded \r characters in the long string. This is why these expected strings are on a single line now.

@lukebakken
Copy link
Contributor Author

Well, it looks like even the master branch has a heisen-bug in the test suite, but only on Travis CI. Everything runs fine on my OS X laptop, Linux and Windows workstations. I'll continue to investigate.

@michaelklishin
Copy link

Yay, Travis is green 💚

@jadeallenx jadeallenx merged commit 6825530 into erlang-lager:master Aug 10, 2019
@jadeallenx
Copy link
Member

Thanks again for getting win32 on a good level, Luke. Your contributions are much appreciated!

@jadeallenx
Copy link
Member

Incidentally, I tagged and pushed 3.8.0 to hex just now.

@lukebakken lukebakken deleted the lrb-windows-file-rotation branch August 11, 2019 18:00
@lukebakken
Copy link
Contributor Author

Thanks @mrallen1 👍

@lukebakken
Copy link
Contributor Author

@mrallen1 if you get a chance, could you enable the lager build on AppVeyor?

https://ci.appveyor.com/project/erlang-lager

@jadeallenx
Copy link
Member

It says "not found" for some reason

@jadeallenx
Copy link
Member

OK, seems to be going now.

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