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

e2e: add logfile for e2e tests #1775

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

parikshithb
Copy link
Member

@parikshithb parikshithb commented Jan 28, 2025

  • Creates a log file (ramen-e2e.log) in the current directory by default.
  • Log DEBUG level messages to the file and INFO level messages to the console.
  • Remove caller (file:lineno) from console logs for cleaner output.
  • Added ramen-e2e and ramen-e2e.log to gitignore
  • Reverted 2cd063a

Fixes: #1722

@parikshithb parikshithb marked this pull request as draft January 28, 2025 12:15
@nirs
Copy link
Member

nirs commented Jan 28, 2025

Fixes: #1722

Good to link the issue, but we should start a PR with a commit message describing the change. We can describe what was done and what will be done later. This helps people to review the change.

e2e/main_test.go Outdated Show resolved Hide resolved
e2e/main_test.go Outdated Show resolved Hide resolved
e2e/main_test.go Outdated Show resolved Hide resolved
e2e/main_test.go Outdated Show resolved Hide resolved
e2e/util/logger.go Outdated Show resolved Hide resolved
e2e/util/logger.go Outdated Show resolved Hide resolved
e2e/util/logger.go Outdated Show resolved Hide resolved
e2e/util/logger.go Outdated Show resolved Hide resolved
e2e/util/logger.go Outdated Show resolved Hide resolved
@nirs
Copy link
Member

nirs commented Jan 28, 2025

#1723 was merged, so you need to revert 2cd063a as part of your pr.

e2e/main_test.go Show resolved Hide resolved
e2e/util/logger.go Outdated Show resolved Hide resolved
@parikshithb parikshithb force-pushed the e2e_logger branch 2 times, most recently from 13a1f0c to f242964 Compare January 30, 2025 05:34
e2e/main_test.go Outdated Show resolved Hide resolved
Copy link
Member

@nirs nirs left a comment

Choose a reason for hiding this comment

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

Looks good! just minor comments about comments.

e2e/test/log.go Outdated Show resolved Hide resolved
e2e/test/log.go Outdated Show resolved Hide resolved
@parikshithb parikshithb force-pushed the e2e_logger branch 2 times, most recently from 3238d2a to 5fea441 Compare January 30, 2025 18:02
This commit introduces a dedicated log file for e2e tests:

* Creates a log file (ramen-e2e.log) in the current directory by default.
* Log DEBUG level messages to the file and INFO level messages to the console.
* Remove caller (file:lineno) from console logs for cleaner output.
* Added ramen-e2e and ramen-e2e.log to gitignore

Signed-off-by: Parikshith <[email protected]>
This reverts commit 2cd063a.

The original commit redirected e2e test logs to ramen-e2e.log using tee.
The new logger writes to ramen-e2e.log by default

Signed-off-by: Parikshith <[email protected]>
@parikshithb parikshithb marked this pull request as ready for review January 30, 2025 18:38
@parikshithb parikshithb requested a review from nirs January 30, 2025 18:38
Copy link
Member

@nirs nirs left a comment

Choose a reason for hiding this comment

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

Looks good, minor comment about .gitignore

e2e/ramen-e2e

# e2e log
e2e/ramen-e2e.log
Copy link
Member

Choose a reason for hiding this comment

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

Better group both, and add / to match only the files from the root of the project:

# e2e generated files
/e2e/ramen-e2e
/e2e/ramen-e2e.log

@nirs
Copy link
Member

nirs commented Jan 30, 2025

This is clear when you look at the commits, it will help to explain int the commit/pr message why we revert the previous logging hack.

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.

e2e: Add logfile
2 participants