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

CI: Orama cloud sync based on environment #6824

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

canerakdas
Copy link
Member

Description

In the previous PRs opened (#6814, #6806), we ensured that the Orama cloud sync script updates the preview environment on push and pull_request_target events.

With this PR, we aim to update the production indexes using this script on the push event instead of manually updating it and to update the preview environment on pull_request_target events.

Additionally, to prevent these scripts from running twice, we ensure they only run on ubuntu-latest runners. Since we are currently running it on windows-latest in the preview environment, the facets are currently not displayed correctly, likely due to differences in paths on Windows (You can check it in a sample preview build)

Before merging this development, the ORAMA_PRODUCTION_INDEX_ID and ORAMA_PRODUCTION_SECRET_KEY secrets need to be defined. I believe we should get support from @ovflowd or @bmuenzenmeyer for this 👀 I think we should first set these two values to point to the preview environment to ensure everything is working correctly, and then replace them with the production ones

Additionally, it would be helpful to ask the Orama team if indexing on every pull_request_target and push events would cause any issues on their side

Related Issues

Related to #6719

@canerakdas canerakdas requested a review from a team as a code owner June 9, 2024 20:35
Copy link

vercel bot commented Jun 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Jun 9, 2024 8:37pm

@ovflowd
Copy link
Member

ovflowd commented Jun 9, 2024

Before merging this development, the ORAMA_PRODUCTION_INDEX_ID and ORAMA_PRODUCTION_SECRET_KEY secrets need to be defined. I believe we should get support from @ovflowd or @bmuenzenmeyer for this 👀 I think we should first set these two values to point to the preview environment to ensure everything is working correctly, and then replace them with the production ones

Secrets Added 🖖

@ovflowd
Copy link
Member

ovflowd commented Jun 9, 2024

Additionally, it would be helpful to ask the Orama team if indexing on every pull_request_target and push events would cause any issues on their side

cc @micheleriva

@micheleriva
Copy link
Contributor

@ovflowd that looks good to me!

@bmuenzenmeyer
Copy link
Collaborator

hmm - comparing experiences, the proposed search has odd headers

image

@ovflowd
Copy link
Member

ovflowd commented Jun 11, 2024

Not sue why the discrepancies, this PR doesn't affect the website at all...

@canerakdas
Copy link
Member Author

hmm - comparing experiences, the proposed search has odd headers

As far as I understand; the current script works for windows-latest and ubuntu-latest. However, since windows-latest runs later and the paths in the file located at this path come as shown in the image below;

image

The split in this line does not work correctly. Therefore, the script that runs later overwrites the index created in ubuntu-latest, corrupting the existing indexes

Since we will only run this script on ubuntu-latest, I think there won't be such an issue after merging this PR. Since the current production secrets are replaced with the preview ones, it would be beneficial to run pull_request_target event in a different PR after this PR is merged and recheck the preview to ensure everything is working correctly 👀

@bmuenzenmeyer
Copy link
Collaborator

Good analysis @canerakdas - I'm willing to get it a go today if we're all around to watch

Copy link

github-actions bot commented Jun 14, 2024

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟠 87 🟢 100 🟢 100 🟢 91 🔗
/en/about 🟢 100 🟢 100 🟢 96 🟢 91 🔗
/en/about/previous-releases 🟢 96 🟢 100 🟢 100 🟢 92 🔗
/en/download 🟢 99 🟢 100 🟢 100 🟢 91 🔗
/en/blog 🟢 99 🟢 100 🟢 96 🟢 92 🔗

Copy link

Unit Test Coverage Report

Lines Statements Branches Functions
Coverage: 92%
90.67% (593/654) 76.08% (175/230) 94.57% (122/129)

Unit Test Report

Tests Skipped Failures Errors Time
131 0 💤 0 ❌ 0 🔥 5.244s ⏱️

@bmuenzenmeyer bmuenzenmeyer added this pull request to the merge queue Jun 14, 2024
Merged via the queue into nodejs:main with commit 3202897 Jun 14, 2024
15 checks passed
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.

5 participants