Uh oh!
There was an error while loading. Please reload this page.
ApiServer: signature v3 to accept more formats - #2893
Conversation
It does it by reusing the DateUtil helpers. DateUtil uses java.time.* as that one knows how to deal with timezones correctly. Signed-off-by: Yoan Blanc <yoan.blanc@exoscale.ch>
yadvr
commented
Oct 16, 2018
@blueorangutan package |
blueorangutan
commented
Oct 16, 2018
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Oct 16, 2018
Packaging result: ✔centos6 ✔centos7 ✖debian. JID-2347 |
rafaelweingartner
commented
Oct 17, 2018
@blueorangutan package |
blueorangutan
commented
Oct 17, 2018
@rafaelweingartner a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Oct 17, 2018
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2352 |
yadvr
commented
Oct 18, 2018
@blueorangutan test |
blueorangutan
commented
Oct 18, 2018
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Oct 18, 2018
Trillian test result (tid-3082)
|
yadvr
commented
Oct 18, 2018
@blueorangutan test |
blueorangutan
commented
Oct 18, 2018
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
yadvr
commented
Oct 20, 2018
@blueorangutan test |
blueorangutan
commented
Oct 20, 2018
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
yadvr
commented
Oct 25, 2018
@blueorangutan package |
blueorangutan
commented
Oct 25, 2018
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Oct 25, 2018
Packaging result: ✔centos6 ✖centos7 ✖debian. JID-2382 |
DaanHoogland
commented
Oct 29, 2018
@blueorangutan package |
yadvr
commented
Oct 29, 2018
@DaanHoogland sorry lab's down, BO queue will be stuck for a while. |
yadvr
commented
Oct 30, 2018
@blueorangutan package |
blueorangutan
commented
Oct 30, 2018
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Oct 30, 2018
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-2395 |
yadvr
commented
Oct 30, 2018
@blueorangutan package |
blueorangutan
commented
Oct 30, 2018
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Oct 30, 2018
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2396 |
yadvr
commented
Oct 30, 2018
@blueorangutan test |
blueorangutan
commented
Oct 30, 2018
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Oct 30, 2018
Trillian test result (tid-3135)
|
bwsw
commented
Nov 5, 2018
@DaanHoogland @rhtyd @greut @TestpublicvoidzonedTimeFormatIsoNoColonZMs() throwsParseException {
Datetime = newDate();
DateTimeFormatterformatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSSSSZ");
Stringstr = OffsetDateTime.now().format(formatter);
DatedtParsed = DateUtil.parseTZDateString(str);
assertEquals(str, time.toString(), dtParsed.toString());
}This unittest is obviously buggy. Because there are two times when objects are used to get current DT, as a result, sometimes it fails. https://travis-ci.org/apache/cloudstack/jobs/450628551#L1047 Need a codefix or PR reverted and fixed. PR was merged recently. Now CS fails to build sometimes. |
bwsw
commented
Nov 5, 2018
Other tests in this PR also must be revised on similar behaviors. |
DaanHoogland
commented
Nov 5, 2018
@bwsw You are right that these tests depend on hwclocktime and are not reliable. Any sugestions on how to fix without losing test-validity? |
@bwsw a quick hack of mine: ugly quick hack but should almost do what is intended without losing test quality or time skew bug as you reported. not sure how the nanoseconds must be handled yet. |
bwsw
commented
Nov 5, 2018
@DaanHoogland Looks good to me. May be imperfect, but should work, at least. |
DaanHoogland
commented
Nov 5, 2018
well @bwsw the code needs debugging still. |
DaanHoogland
commented
Nov 5, 2018
strangely this works: not sure if it is valid in all cases though, can you test @bwsw |
nvazquez
commented
Nov 5, 2018
Tested on latest master: first tested running every test and passed successfully. Then replaced the last one for the code @DaanHoogland provided above and also succeeded |
bwsw
commented
Nov 5, 2018
@DaanHoogland |
Description
The format expected by
signatureVersion=3&expires=....is quite limited.It should accepts the following formats that are containing a timezone and/or milliseconds.
afaik only
2018-10-01T08:12:14+0100is accepted by the current codebase.This PR echoes another pull requests I made earlier this year. #2392 and #2867
Types of changes
GitHub Issue/PRs
n/a
Screenshots (if appropriate):
n/a
How Has This Been Tested?
the Java unit tests. If anyone want to help with the marvin work... cs does it already.
Checklist:
Testing