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

[ST] Use real test execution instead of milis from epoch in collecting logs from CO #9628

Merged
merged 6 commits into from
Feb 6, 2024

Conversation

Frawless
Copy link
Member

@Frawless Frawless commented Feb 1, 2024

Type of change

  • Bugfix

Description

assertNoCoErrorsLogged() got miliseconds since eponch instead of real test execution time in seconds. This resulted in something like that:

2024-02-01 08:06:05 INFO  [AbstractST:437] Search in strimzi-cluster-operator log for errors in last 1706774095840 second(s)
2024-02-01 08:07:46 DEBUG [Exec:418] Failed to exec command: 'bash -c kubectl --namespace co-namespace logs Deployment/strimzi-cluster-operator --since=1706774095840s | grep  -e Exception -e Error -e Throwable -e OOM -B 1' (return code: 1)
2024-02-01 08:07:46 DEBUG [Exec:418] ======STDERR START=======
2024-02-01 08:07:46 DEBUG [Exec:418] error: invalid argument "1706774095840s" for "--since" flag: time: invalid duration "1706774095840s"
See 'kubectl logs --help' for usage.
2024-02-01 08:07:46 DEBUG [Exec:418] ======STDERR END======
2024-02-01 08:07:46 INFO  [BaseCmdKubeClient:501] Exception not found

which is obviously wrong. This PR resolves that.

Checklist

  • Make sure all tests pass

@Frawless
Copy link
Member Author

Frawless commented Feb 1, 2024

/azp run acceptance

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Jakub Stejskal <[email protected]>
@Frawless
Copy link
Member Author

Frawless commented Feb 1, 2024

/azp run acceptance

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Frawless
Copy link
Member Author

Frawless commented Feb 1, 2024

Current log from azure:

2024-02-01 10:14:41 [main] INFO  [AbstractST:437] Search in strimzi-cluster-operator log for errors in last 144 second(s)
2024-02-01 10:14:41 [main] INFO  [BaseCmdKubeClient:501] Exception not found

The value for log collector is correct.

@Frawless
Copy link
Member Author

Frawless commented Feb 1, 2024

/azp run regression

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Frawless
Copy link
Member Author

Frawless commented Feb 1, 2024

/azp run upgrade

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Frawless Frawless added this to the 0.40.0 milestone Feb 1, 2024
@Frawless
Copy link
Member Author

Frawless commented Feb 2, 2024

/azp run regression

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Frawless
Copy link
Member Author

Frawless commented Feb 2, 2024

/azp run regression

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Frawless Frawless marked this pull request as ready for review February 5, 2024 08:00
Copy link
Member

@im-konge im-konge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks :)

@see-quick see-quick changed the title ST: Use real test execution instead of milis from epoch in collecting logs from CO [ST] Use real test execution instead of milis from epoch in collecting logs from CO Feb 5, 2024
@Frawless Frawless merged commit 03594af into strimzi:main Feb 6, 2024
21 checks passed
@Frawless Frawless deleted the fix-operator-logs-verification branch February 6, 2024 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants