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

openshift log output on exception #492

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

laDok8
Copy link
Contributor

@laDok8 laDok8 commented Jun 16, 2022

issue: issue
Adding optional Openshift pod/build and event logs into test failure message.

Please make sure your PR meets the following requirements:

  • Pull Request contains a description of the changes
  • Pull Request does not include fixes for multiple issues/topics
  • Code is formatted, imports ordered, code compiles and tests are passing
  • Code is self-descriptive and/or documented

@laDok8 laDok8 requested review from mnovak and istraka June 16, 2022 10:52
@laDok8 laDok8 force-pushed the add.junitOCPLogs branch from d347254 to 2421575 Compare June 16, 2022 10:58
@laDok8 laDok8 force-pushed the add.junitOCPLogs branch 2 times, most recently from cbedec8 to e72e801 Compare June 20, 2022 08:10
@mchoma
Copy link
Contributor

mchoma commented Jun 20, 2022

Have you considered Service Log Stream [1] for implementing this feature? Logic would be different to current implementation. Stream to some temporary place (e.g. into String) and once test failes flush that String to System.err.

  • Advantages:

    • cronological order
    • all log there. When storing on end some containers can be gone by restarts.
  • Disadvantage are:

    • there are no events.
    • maybe chronological order is not important so much for computer pattern searching

[1] https://github.com/xtf-cz/xtf/blob/master/README.md?plain=1#L160

@laDok8
Copy link
Contributor Author

laDok8 commented Jun 23, 2022

i think having having all logs is not as important as i'm already filtering only for warning/error messages and pod causing exception should be active at that time so we should have all important info. WDYT @istraka

@laDok8 laDok8 force-pushed the add.junitOCPLogs branch from e72e801 to 40dc540 Compare June 23, 2022 11:31
@laDok8 laDok8 force-pushed the add.junitOCPLogs branch from 40dc540 to e43ece0 Compare July 7, 2022 13:15
@laDok8 laDok8 force-pushed the add.junitOCPLogs branch from e43ece0 to d62d24c Compare July 14, 2022 11:04
@laDok8 laDok8 force-pushed the add.junitOCPLogs branch from d62d24c to 5e01bba Compare July 21, 2022 12:25
savePodLogs(context, getFilter(context, POD_FILTER_MASTER),
!isMasterAndBuildNamespaceSame() ? getFilter(context, POD_FILTER_BUILDS) : null, ps);
saveBuildLogs(context, getFilter(context, BUILD_FILTER_MASTER),
!isMasterAndBuildNamespaceSame() ? getFilter(context, BUILD_FILTER_MASTER) : null, ps);
Copy link
Contributor

Choose a reason for hiding this comment

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

please be aware of the same problem fixed in #521

@tommaso-borgato tommaso-borgato added this to the BACKLOG milestone Jun 22, 2023
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.

6 participants