Skip to content

Instantly share code, notes, and snippets.

View yasserhussain1110's full-sized avatar

Yasser Hussain yasserhussain1110

View GitHub Profile
def parse_natural(input) do
try do
{:ok, data_with_comma} = Timex.parse(input, "{Mfull} {D}, {YYYY}")
catch
:error, _ -> Timex.parse(input, "{Mfull} {D} {YYYY}")
end
end
def parse_natural(input) do
with {:error, _} <- Timex.parse(input, "{Mfull} {D}, {YYYY}"),
{:error, _} <- Timex.parse(input, "{Mfull} {D} {YYYY}") do
{:error, "Failed to parse date"}
else
{:ok, date_time} -> {:ok, date_time}
end
end
@yasserhussain1110
yasserhussain1110 / solution.md
Last active January 3, 2019 11:49
Solutions

Issue - Unintented Code Cloberring

The problem was the code written by Team A was updated (or clobbered) by Team B during a merge conflict resolution.

This is common problem which can easily be identified and fixed during QA phase. But this problem was not identified during QA and made its way to production.

Reasons for issue not getting identified -

  • Large amount of untracked differences between repository's branches (namely - master, staging, production). In this particular scenario code deployed in dev1 environment had the required property (ctladmin_endpoint) because the branch that was deployed had that value but in production that property had been removed during merge conflict resolution.