Skip to content
This repository was archived by the owner on Apr 23, 2026. It is now read-only.

feat: Add end to end tests for RAG-enabled chat using user-supplied documents - #2948

Closed
anastasds wants to merge 5 commits into
instructlab:mainfrom
anastasds:rag-e2e
Closed

feat: Add end to end tests for RAG-enabled chat using user-supplied documents#2948
anastasds wants to merge 5 commits into
instructlab:mainfrom
anastasds:rag-e2e

Conversation

@anastasds

@anastasds anastasds commented Jan 21, 2025

Copy link
Copy Markdown
Contributor

#2947
Depends on #2903, #2886

Run as e2e-custom.sh -dm

  • Adds a PDF document into a new test-data/raw_documents repo
  • Adds end to end test of converting and ingesting a document, then RAG-enabled chat
  • Expands e2e-custom.sh to accommodate dev preview functionality

@mergify mergify Bot added testing Relates to testing ci-failure PR has at least one CI failure labels Jan 21, 2025

@dmartinol dmartinol left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How to set this up as an optional CI check?

What do you mean?

Comment thread scripts/e2e-experimental.sh Outdated
Comment thread scripts/e2e-experimental.sh Outdated
Comment thread scripts/e2e-experimental.sh Outdated
@anastasds

Copy link
Copy Markdown
Contributor Author

How to set this up as an optional CI check?

What do you mean?

The goal is for this set of tests to be able to be triggered on a PR involving changes to experimental features and then be required for merge - but to not run automatically for PRs so that experimental feature work never blocks other work. I'm not clear on what needs to be done to set that up.

@mergify mergify Bot removed the ci-failure PR has at least one CI failure label Jan 21, 2025
@dmartinol

Copy link
Copy Markdown
Contributor

The goal is for this set of tests to be able to be triggered on a PR involving changes to experimental features and then be required for merge - but to not run automatically for PRs so that experimental feature work never blocks other work. I'm not clear on what needs to be done to set that up.

check if there is a linked issue with an 'experimental' label? (there are actions to get the linked issues, like https://github.com/kin/gh-action-get-linked-issues)

@mergify mergify Bot added the ci-failure PR has at least one CI failure label Jan 21, 2025
@nathan-weinberg

Copy link
Copy Markdown
Contributor

There's an existing e2e-custom.sh script - rather than adding a third script, why not just use that?

@anastasds

Copy link
Copy Markdown
Contributor Author

@nathan-weinberg I wasn't sure what all uses it and wanted to keep experimental features totally cordoned off, at least to start with, in order to avoid issues with experimental features from potentially blocking anything else. Happy to merge them in; I was being risk avoidant since this whole experimental features pattern seems to be net new.

@mergify

mergify Bot commented Jan 21, 2025

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. @anastasds please rebase it. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase This Pull Request needs to be rebased label Jan 21, 2025
@nathan-weinberg

Copy link
Copy Markdown
Contributor

@anastasds yes please use that script, it should mesh well with the mission of us keeping it: https://github.com/instructlab/instructlab/blob/main/docs/ci.md#end-to-end-e2e-tests

Only e2e-ci.sh is used for the regular CI, so no worries about breaking anything by modifying e2e-custom.sh - it's also already hooked up to a custom job you can use

@anastasds

Copy link
Copy Markdown
Contributor Author

@nathan-weinberg will do today

@mergify mergify Bot added ci-failure PR has at least one CI failure and removed ci-failure PR has at least one CI failure labels Jan 21, 2025
@mergify mergify Bot removed the needs-rebase This Pull Request needs to be rebased label Jan 22, 2025
@anastasds
anastasds force-pushed the rag-e2e branch 2 times, most recently from 9864450 to d26735b Compare January 22, 2025 17:49
@mergify mergify Bot removed the ci-failure PR has at least one CI failure label Jan 22, 2025

@nathan-weinberg nathan-weinberg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking good to me overall - when this is out of draft are you able to trigger a test custom job @anastasds so we can see it in action?

@anastasds
anastasds force-pushed the rag-e2e branch 2 times, most recently from 1c5428e to 0e93434 Compare January 22, 2025 20:14
@mergify mergify Bot added the ci-failure PR has at least one CI failure label Jan 22, 2025
Comment thread scripts/e2e-custom.sh
mkdir -p "${E2E_LOG_DIR}"

# set appropriate feature gating flag
if [ "$DEV_PREVIEW_FEATURE_GATING" -eq 1 ]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note: you probably have these env vars in your shell, so you're not seeing the DEV_PREVIEW_FEATURE_GATING: unbound variable error.
Since we have set -u at the beginning, we have to ensure that the env variables are defined.
We can use either -n or provide a default as in:

    if [ ${DEV_PREVIEW_FEATURE_GATING:-} -eq 1 ]; then

Explanation of set -u:

Treat unset variables and parameters other than the special parameters ‘@’ or ‘*’, or array variables subscripted with ‘@’ or ‘*’, as an error when performing parameter expansion. An error message will be written to the standard error, and a non-interactive shell will exit.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I see now there are multiple references, so we can initialize the defaults after the getops loop or anywhere you prefer:

DEV_PREVIEW_FEATURE_GATING=${DEV_PREVIEW_FEATURE_GATING:-}
TECH_PREVIEW_FEATURE_GATING=${TECH_PREVIEW_FEATURE_GATING:-}
CUSTOM_FEATURE_GATING=${CUSTOM_FEATURE_GATING:-}

@mergify

mergify Bot commented Jan 23, 2025

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. @anastasds please rebase it. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase This Pull Request needs to be rebased label Jan 23, 2025
Comment thread scripts/e2e-custom.sh
@github-actions

Copy link
Copy Markdown

E2E (Custom) (instance-type: g6e.24xlarge, e2e_script_args: -dm) workflow launched on this PR: View run

@github-actions

Copy link
Copy Markdown

e2e workflow failed on this PR: View run, please investigate.

@mergify mergify Bot removed the ci-failure PR has at least one CI failure label Jan 23, 2025
@github-actions

Copy link
Copy Markdown

E2E (Custom) (instance-type: g6e.12xlarge, e2e_script_args: -dm) workflow launched on this PR: View run

@github-actions

Copy link
Copy Markdown

e2e workflow failed on this PR: View run, please investigate.

Comment thread scripts/e2e-custom.sh
@cdoern

cdoern commented Jan 24, 2025

Copy link
Copy Markdown
Contributor

@Mergifyio rebase

@cdoern

cdoern commented Jan 24, 2025

Copy link
Copy Markdown
Contributor

to be safe ^

anastasds and others added 2 commits January 24, 2025 19:42
Signed-off-by: Anastas Stoyanovsky <astoyano@redhat.com>
Signed-off-by: Daniele Martinoli <dmartino@redhat.com>
@mergify

mergify Bot commented Jan 24, 2025

Copy link
Copy Markdown
Contributor

rebase

✅ Branch has been successfully rebased

@github-actions

Copy link
Copy Markdown

E2E (Custom) (instance-type: g6e.12xlarge, e2e_script_args: -dm) workflow launched on this PR: View run

@github-actions

Copy link
Copy Markdown

e2e workflow failed on this PR: View run, please investigate.

Signed-off-by: Anastas Stoyanovsky <astoyano@redhat.com>
Signed-off-by: Anastas Stoyanovsky <astoyano@redhat.com>
@github-actions

Copy link
Copy Markdown

E2E (Custom) (instance-type: g6e.12xlarge, e2e_script_args: -dm) workflow launched on this PR: View run

@github-actions

Copy link
Copy Markdown

e2e workflow failed on this PR: View run, please investigate.

Comment thread scripts/e2e-custom.sh
@mergify mergify Bot added the ci-failure PR has at least one CI failure label Jan 30, 2025
Signed-off-by: Anastas Stoyanovsky <astoyano@redhat.com>
@mergify mergify Bot added ci-failure PR has at least one CI failure and removed ci-failure PR has at least one CI failure labels Jan 30, 2025
@github-actions

github-actions Bot commented Apr 1, 2025

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had activity within 60 days. It will be automatically closed if no further activity occurs within 30 days.

@github-actions github-actions Bot added the stale label Apr 1, 2025
@github-actions

Copy link
Copy Markdown

This pull request has been automatically closed due to inactivity. Please feel free to reopen if you intend to continue working on it!

@github-actions github-actions Bot closed this May 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ci-failure PR has at least one CI failure stale testing Relates to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants