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

flake: Test_parseInsightsStartAndEndTime #10600

Closed
sreya opened this issue Nov 9, 2023 · 2 comments · Fixed by #11023 or #12377
Closed

flake: Test_parseInsightsStartAndEndTime #10600

sreya opened this issue Nov 9, 2023 · 2 comments · Fixed by #11023 or #12377
Assignees
Labels
bug Used to filter all bug issues flake Flaky tests s4 Internal bugs (e.g. test flakes), extreme edge cases, and bug risks

Comments

@sreya
Copy link
Collaborator

sreya commented Nov 9, 2023

=== FAIL: coderd Test_parseInsightsInterval_week/9_days_(7_+_2)_are_not_acceptable (0.00s)
    insights_internal_test.go:239: Status:  400
    insights_internal_test.go:240: Body:  {
        	"message": "Query parameter has invalid value.",
        	"validations": [
        		{
        			"field": "end_time",
        			"detail": "Query param \"end_time\" must have the clock set to 00:00:00"
        		}
        	]
        }
        
    insights_internal_test.go:242: 
        	Error Trace:	/Users/runner/work/coder/coder/coderd/insights_internal_test.go:242
        	Error:      	Should be true
        	Test:       	Test_parseInsightsInterval_week/9_days_(7_+_2)_are_not_acceptable
        	Messages:   	start_time and end_time must be valid

=== FAIL: coderd Test_parseInsightsInterval_week/6_days_are_acceptable (0.00s)
    insights_internal_test.go:239: Status:  400
    insights_internal_test.go:240: Body:  {
        	"message": "Query parameter has invalid value.",
        	"validations": [
        		{
        			"field": "end_time",
        			"detail": "Query param \"end_time\" must have the clock set to 00:00:00"
        		}
        	]
        }
        
    insights_internal_test.go:242: 
        	Error Trace:	/Users/runner/work/coder/coder/coderd/insights_internal_test.go:242
        	Error:      	Should be true
        	Test:       	Test_parseInsightsInterval_week/6_days_are_acceptable
        	Messages:   	start_time and end_time must be valid

=== FAIL: coderd Test_parseInsightsInterval_week (0.00s)
    insights_internal_test.go:162: now: 2023-11-08 23:59:56.781794 +0000 UTC m=+7.293516543
    insights_internal_test.go:166: today: 2023-11-08 00:00:00 +1100 AEDT
    insights_internal_test.go:169: thisHour: 2023-11-08 23:00:00 +1100 AEDT
    insights_internal_test.go:171: twoHoursAgo: 2023-11-08 21:00:00 +1100 AEDT
    insights_internal_test.go:173: thirteenDaysAgo: 2023-10-26 00:00:00 +1100 AEDT
    insights_internal_test.go:176: sixDaysAgo: 2023-11-02 00:00:00 +1100 AEDT
    insights_internal_test.go:178: nineDaysAgo: 2023-10-30 00:00:00 +1100 AEDT

=== FAIL: coderd Test_parseInsightsStartAndEndTime/Today (0.00s)
    insights_internal_test.go:138: 
        	Error Trace:	/Users/runner/work/coder/coder/coderd/insights_internal_test.go:138
        	Error:      	Not equal: 
        	            	expected: true
        	            	actual  : false
        	Test:       	Test_parseInsightsStartAndEndTime/Today
    insights_internal_test.go:140: Status:  [400](https://github.com/coder/coder/actions/runs/6805426561/job/18504925666#step:5:401)
    insights_internal_test.go:141: Body:  {
        	"message": "Query parameter has invalid value.",
        	"validations": [
        		{
        			"field": "end_time",
        			"detail": "Query param \"end_time\" must have the clock set to 00:00:00"
        		}
        	]
        }
        
    insights_internal_test.go:146: 
        	Error Trace:	/Users/runner/work/coder/coder/coderd/insights_internal_test.go:146
        	Error:      	Max difference between 2023-11-08 00:00:00 +0000 UTC and 0001-01-01 00:00:00 +0000 UTC allowed is 0s, but difference was 2562047h47m16.854775807s
        	Test:       	Test_parseInsightsStartAndEndTime/Today
    insights_internal_test.go:147: 
        	Error Trace:	/Users/runner/work/coder/coder/coderd/insights_internal_test.go:147
        	Error:      	Should be true
        	Test:       	Test_parseInsightsStartAndEndTime/Today
    insights_internal_test.go:148: 
        	Error Trace:	/Users/runner/work/coder/coder/coderd/insights_internal_test.go:148
        	Error:      	Max difference between 2023-11-08 23:00:00 +0000 UTC and 0001-01-01 00:00:00 +0000 UTC allowed is 0s, but difference was 2562047h47m16.854775807s
        	Test:       	Test_parseInsightsStartAndEndTime/Today
    insights_internal_test.go:149: 
        	Error Trace:	/Users/runner/work/coder/coder/coderd/insights_internal_test.go:149
        	Error:      	Should be true
        	Test:       	Test_parseInsightsStartAndEndTime/Today

=== FAIL: coderd Test_parseInsightsStartAndEndTime (0.00s)

Seen here

@sreya sreya added flake Flaky tests bug Used to filter all bug issues labels Nov 9, 2023
@matifali matifali added the s4 Internal bugs (e.g. test flakes), extreme edge cases, and bug risks label Nov 9, 2023
@sreya
Copy link
Collaborator Author

sreya commented Nov 30, 2023

Seen here as well

=== Failed
=== FAIL: coderd Test_parseInsightsStartAndEndTime/Today_(hour_round_up) (0.00s)
    insights_internal_test.go:148: 
        	Error Trace:	/home/runner/actions-runner/_work/coder/coder/coderd/insights_internal_test.go:148
        	Error:      	Max difference between 2023-11-01 00:00:00 +0000 UTC and 2023-12-01 00:00:00 +0000 UTC allowed is 0s, but difference was -720h0m0s
        	Test:       	Test_parseInsightsStartAndEndTime/Today_(hour_round_up)
    insights_internal_test.go:149: 
        	Error Trace:	/home/runner/actions-runner/_work/coder/coder/coderd/insights_internal_test.go:149
        	Error:      	Should be true
        	Test:       	Test_parseInsightsStartAndEndTime/Today_(hour_round_up)

=== FAIL: coderd Test_parseInsightsStartAndEndTime (0.00s)

@coadler
Copy link
Member

coadler commented Feb 29, 2024

This doesn't seem to be fixed, just ran into this again. It seems to only happen between 23:00 - 00:00 UTC on the last day of the month.

=== FAIL: coderd Test_parseInsightsStartAndEndTime/Today_(hour_round_up) (0.00s)
    insights_internal_test.go:151: startTime:  2024-02-29T00:00:00Z
    insights_internal_test.go:152: endTime:  2024-03-01T00:00:00Z
    insights_internal_test.go:154: wantStartTime:  2024-02-29 00:00:00 +0000 UTC
    insights_internal_test.go:155: wantEndTime:  2024-02-01 00:00:00 +0000 UTC
    insights_internal_test.go:172: 
        	Error Trace:	/home/runner/actions-runner/_work/coder/coder/coderd/insights_internal_test.go:172
        	Error:      	Max difference between 2024-02-01 00:00:00 +0000 UTC and 2024-03-01 00:00:00 +0000 UTC allowed is 0s, but difference was -696h0m0s
        	Test:       	Test_parseInsightsStartAndEndTime/Today_(hour_round_up)
    insights_internal_test.go:173: 
        	Error Trace:	/home/runner/actions-runner/_work/coder/coder/coderd/insights_internal_test.go:173
        	Error:      	Should be true
        	Test:       	Test_parseInsightsStartAndEndTime/Today_(hour_round_up)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to filter all bug issues flake Flaky tests s4 Internal bugs (e.g. test flakes), extreme edge cases, and bug risks
Projects
None yet
4 participants