Skip to content

Conversation

@sagor999
Copy link
Contributor

This fixes regex for timestamp in clone section. Postgres doesn't know how to parse timestamp that has 'Z' at the end, you need to explicitly provide timezone instead +00:00.
It throws this error when cloning is complete and it attempts to start up:
invalid value for parameter "recovery_target_time": "2020-10-15T14:47:00Z"

@FxKu
Copy link
Member

FxKu commented Oct 27, 2020

ok, but this is about CRD validation. So if there is a manifest with a Zulu time timestamp this would then be rejected, tight? I see that we already have a | there. Can we make the regex also cover your case then?

@sagor999
Copy link
Contributor Author

@FxKu it doesn't seem like postgres itself understands Zulu timestamps. So this change will reject manifest if it has zulu timestamp in it.

Can we make the regex also cover your case then?

I am not sure I understand what you are asking. Existing regex allows to specify Zulu timestamp and my change removes it.

@FxKu
Copy link
Member

FxKu commented Oct 28, 2020

Ok, so maybe then the operator should make sure to set the env variable correctly. Simply forbidding things in CRD validation that were allowed before can break deployments. Will double check what timestamps we use. Maybe it's only with +00:00 as Z produces the error you mentioned.

@FxKu
Copy link
Member

FxKu commented Dec 16, 2020

@sagor999 can you resolve the conflicts? we want to merge this one

EDIT: Turns out I was able to resolve them myself.

@FxKu FxKu added this to the 1.6 milestone Dec 16, 2020
@Jan-M
Copy link
Member

Jan-M commented Dec 16, 2020

Seems good. Existing deployments do not matter, they already cloned and can be adjusted to be valid against new pattern.

This prevents user error early on.

@FxKu
Copy link
Member

FxKu commented Dec 16, 2020

👍

1 similar comment
@Jan-M
Copy link
Member

Jan-M commented Dec 16, 2020

👍

@Jan-M Jan-M merged commit 5076e66 into zalando:master Dec 16, 2020
@sagor999 sagor999 deleted the fix_timestamp branch December 16, 2020 12:34
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