{"action":"created","issue":{"url":"https://api.github.com/repos/cfengine/core/issues/3296","repository_url":"https://api.github.com/repos/cfengine/core","labels_url":"https://api.github.com/repos/cfengine/core/issues/3296/labels{/name}","comments_url":"https://api.github.com/repos/cfengine/core/issues/3296/comments","events_url":"https://api.github.com/repos/cfengine/core/issues/3296/events","html_url":"https://github.com/cfengine/core/pull/3296","id":365433638,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5MzU0MjUx","number":3296,"title":"[3.12.x] Read mustache-rendered files in text mode when comparing digest","user":{"login":"vpodzime","id":1044278,"node_id":"MDQ6VXNlcjEwNDQyNzg=","avatar_url":"https://avatars1.githubusercontent.com/u/1044278?v=4","gravatar_id":"","url":"https://api.github.com/users/vpodzime","html_url":"https://github.com/vpodzime","followers_url":"https://api.github.com/users/vpodzime/followers","following_url":"https://api.github.com/users/vpodzime/following{/other_user}","gists_url":"https://api.github.com/users/vpodzime/gists{/gist_id}","starred_url":"https://api.github.com/users/vpodzime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpodzime/subscriptions","organizations_url":"https://api.github.com/users/vpodzime/orgs","repos_url":"https://api.github.com/users/vpodzime/repos","events_url":"https://api.github.com/users/vpodzime/events{/privacy}","received_events_url":"https://api.github.com/users/vpodzime/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-01T12:15:38Z","updated_at":"2018-10-01T12:41:58Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/cfengine/core/pulls/3296","html_url":"https://github.com/cfengine/core/pull/3296","diff_url":"https://github.com/cfengine/core/pull/3296.diff","patch_url":"https://github.com/cfengine/core/pull/3296.patch"},"body":"On Windows writing a file in text mode means Unix newlines (\"\\n\")\r\nare transparently replaced by Windows newlines (\"\\r\\n\") and wise\r\nversa for reading. We are using the text mode when writing\r\nmustache-rendered contents into files and thus they end up having\r\nWindows newlines. So in order to get comparable results for\r\ndigests of a file (Windows newlines) and in-memory string\r\nrepresentation (Unix newlines) we need to use the text mode when\r\nreading the file and calculating the digest.\r\n\r\nOther uses of the HashFile() function don't seem to be restricted\r\nto working with text files and don't compare in-memory string\r\nrepresentations with file contents so we should use binary mode\r\nthere.\r\n\r\nChangelog: Title\r\nTicket: ENT-2526\r\n(cherry picked from commit 1f26996fe7526d58afe046a5a79bb5253697c026)"},"comment":{"url":"https://api.github.com/repos/cfengine/core/issues/comments/425892966","html_url":"https://github.com/cfengine/core/pull/3296#issuecomment-425892966","issue_url":"https://api.github.com/repos/cfengine/core/issues/3296","id":425892966,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTg5Mjk2Ng==","user":{"login":"codecov[bot]","id":22429695,"node_id":"MDM6Qm90MjI0Mjk2OTU=","avatar_url":"https://avatars2.githubusercontent.com/in/254?v=4","gravatar_id":"","url":"https://api.github.com/users/codecov%5Bbot%5D","html_url":"https://github.com/apps/codecov","followers_url":"https://api.github.com/users/codecov%5Bbot%5D/followers","following_url":"https://api.github.com/users/codecov%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/codecov%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/codecov%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecov%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/codecov%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/codecov%5Bbot%5D/repos","events_url":"https://api.github.com/users/codecov%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/codecov%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-10-01T12:41:58Z","updated_at":"2018-10-01T12:41:58Z","author_association":"NONE","body":"# [Codecov](https://codecov.io/gh/cfengine/core/pull/3296?src=pr&el=h1) Report\n> Merging [#3296](https://codecov.io/gh/cfengine/core/pull/3296?src=pr&el=desc) into [3.12.x](https://codecov.io/gh/cfengine/core/commit/5c07b795c973ec423b2069f09701bc3efc98030a?src=pr&el=desc) will **increase** coverage by `<.01%`.\n> The diff coverage is `87.5%`.\n\n\n```diff\n@@            Coverage Diff             @@\n##           3.12.x    #3296      +/-   ##\n==========================================\n+ Coverage   61.98%   61.98%   +<.01%     \n==========================================\n  Files         210      210              \n  Lines       46249    46253       +4     \n==========================================\n+ Hits        28668    28671       +3     \n- Misses      17581    17582       +1\n```\n\n| [Impacted Files](https://codecov.io/gh/cfengine/core/pull/3296?src=pr&el=tree) | Coverage Δ | |\n|---|---|---|\n| [cf-serverd/server\\_common.c](https://codecov.io/gh/cfengine/core/pull/3296/diff?src=pr&el=tree#diff-Y2Ytc2VydmVyZC9zZXJ2ZXJfY29tbW9uLmM=) | `0.72% <0%> (ø)` | :arrow_up: |\n| [cf-agent/verify\\_files\\_utils.c](https://codecov.io/gh/cfengine/core/pull/3296/diff?src=pr&el=tree#diff-Y2YtYWdlbnQvdmVyaWZ5X2ZpbGVzX3V0aWxzLmM=) | `58.57% <100%> (ø)` | :arrow_up: |\n| [cf-agent/verify\\_files.c](https://codecov.io/gh/cfengine/core/pull/3296/diff?src=pr&el=tree#diff-Y2YtYWdlbnQvdmVyaWZ5X2ZpbGVzLmM=) | `79.94% <100%> (+0.05%)` | :arrow_up: |\n| [cf-agent/verify\\_files\\_hashes.c](https://codecov.io/gh/cfengine/core/pull/3296/diff?src=pr&el=tree#diff-Y2YtYWdlbnQvdmVyaWZ5X2ZpbGVzX2hhc2hlcy5j) | `52.77% <100%> (ø)` | :arrow_up: |\n| [libpromises/loading.c](https://codecov.io/gh/cfengine/core/pull/3296/diff?src=pr&el=tree#diff-bGlicHJvbWlzZXMvbG9hZGluZy5j) | `84.15% <100%> (ø)` | :arrow_up: |\n| [libpromises/evalfunction.c](https://codecov.io/gh/cfengine/core/pull/3296/diff?src=pr&el=tree#diff-bGlicHJvbWlzZXMvZXZhbGZ1bmN0aW9uLmM=) | `81.37% <100%> (ø)` | :arrow_up: |\n| [libcfnet/client\\_code.c](https://codecov.io/gh/cfengine/core/pull/3296/diff?src=pr&el=tree#diff-bGliY2ZuZXQvY2xpZW50X2NvZGUuYw==) | `51.87% <100%> (ø)` | :arrow_up: |\n| [libpromises/files\\_hashes.c](https://codecov.io/gh/cfengine/core/pull/3296/diff?src=pr&el=tree#diff-bGlicHJvbWlzZXMvZmlsZXNfaGFzaGVzLmM=) | `81.9% <75%> (-0.45%)` | :arrow_down: |\n\n\n[![Impacted file tree graph](https://codecov.io/gh/cfengine/core/pull/3296/graphs/tree.svg?width=650&token=FXh9vPbmbQ&height=150&src=pr)](https://codecov.io/gh/cfengine/core/pull/3296?src=pr&el=tree)\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/cfengine/core/pull/3296?src=pr&el=continue).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)\n> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/cfengine/core/pull/3296?src=pr&el=footer). Last update [5c07b79...34f1190](https://codecov.io/gh/cfengine/core/pull/3296?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).\n"}}
{"actor":{"display_login":"codecov"}}