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: Build and run e2e executable #1723

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

Conversation

nirs
Copy link
Member

@nirs nirs commented Dec 12, 2024

Change the run.sh script to build the e2e executable and run the tests
using the executable.

This has several advantages:

  • Document how the build an executable
  • Test the built executable for every test run
  • When running the executable the default -test.timeout is disable, so
    we don't need to specify it. This makes running the tests directly
    easier.

The new ramen-e2e.log is also collected in the build archive.

Example content of the build archive:

% tree e2e.12932857944-1 -L3
e2e.12932857944-1
├── e2e
│   └── ramen-e2e.log
└── test
    └── gather.rdr
        ├── dr1
        ├── dr2
        ├── gather.log
        └── hub

Finally we gather data and upload the archive for all builds, not only for failures.

New artifacts:

Screenshot 2025-01-23 at 18 49 30

Fixes #1743

e2e/run.sh Outdated Show resolved Hide resolved
e2e/run.sh Outdated Show resolved Hide resolved
@nirs

This comment was marked as outdated.

@nirs nirs mentioned this pull request Dec 12, 2024
5 tasks
Change the run.sh script to build the e2e executable and run the tests
using the executable.

This has several advantages:
- Document how the build an executable
- Test the built executable for every test run
- When running the executable the default -test.timeout is disable, so
  we don't need to specify it. This makes running the tests directly
  easier.

Signed-off-by: Nir Soffer <[email protected]>
@nirs nirs requested a review from parikshithb January 23, 2025 14:57
@nirs

This comment was marked as outdated.

To make it easier to inspect the log after failures. This is a quick
hack until we create the log properly (RamenDR#1722).

Signed-off-by: Nir Soffer <[email protected]>
@nirs nirs marked this pull request as ready for review January 23, 2025 15:54
nirs added 2 commits January 23, 2025 18:40
Previously we uploaded only the gathered environment, but we really want
all data from the test when we try to debug a failure. Add the
e2e/ramen-e2e.log to the archive, and rename the archive to reflect the
new content.

Example content of the archive:

    % tree e2e.12932857944-1 -L3
    e2e.12932857944-1
    ├── e2e
    │   └── ramen-e2e.log
    └── test
        └── gather.rdr
            ├── dr1
            ├── dr2
            ├── gather.log
            └── hub

Signed-off-by: Nir Soffer <[email protected]>
Mainly for testing the previous changes, but this may be useful to keep
so we can debug "successful" build, or compare successful build with
failed build.

Gathering data is quick (~10 seconds), and the compressed tarball is
relatively small (7 MiB) and is automatically deleted after 15 days, so
always collecting data does not cost a lot.

Signed-off-by: Nir Soffer <[email protected]>
@nirs nirs requested a review from rakeshgm January 23, 2025 16:41
Copy link
Member

@parikshithb parikshithb left a comment

Choose a reason for hiding this comment

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

lgtm

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: Build and use e2e executable in CI
3 participants