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

Improvement: Setting Up The Project #9543

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

Conversation

leoeuclids
Copy link

Description

This PR aims to improve the setting-up-the-project.md file, based on our findings during the setup of the project on my local environment.

  1. Moves to recommending the usage of pnpx instead of npx
    . Since the project relies on pnpm, recommend running scripts with pnpm commands
    . The only script affected is the holodeck ensure-cert
  2. It adds steps related to holodeck certificates
    . Install mkcert and nss (as needed)
    . Run the ensure-cert script to create the certificates
  3. Remove the env manipulation from the holodeck index.js file
    . Rely on running the ensure-cert script instead
  4. Add more granular log and error messages

Copy link
Contributor

@runspired runspired left a comment

Choose a reason for hiding this comment

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

Thank so much! ❤️

@runspired runspired added 🎯 canary PR is targeting canary (default) 🏷️ chore This PR primarily refactors code or updates dependencies labels Oct 5, 2024
if (!CERT_PATH) {
CERT_PATH = path.join(homedir(), 'holodeck-localhost.pem');
process.env.HOLODECK_SSL_CERT_PATH = CERT_PATH;
execSync(`echo '\nexport HOLODECK_SSL_CERT_PATH="${CERT_PATH}"' >> ${configFilePath}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC the setup here exists for CI environments.

We should probably gate it with process.env.CI instead of removing it (this is the reason for the failing test scenarios in this PR), though there may be some other nuance that allows us to still remove this but make CI work.

I think the issue is that we don't re-source the ENV after running ensure-cert (see

if: ${{ inputs.with-cert }}
) so the paths aren't seen even though they are already present

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎯 canary PR is targeting canary (default) 🏷️ chore This PR primarily refactors code or updates dependencies
Projects
Status: needs triage
Development

Successfully merging this pull request may close these issues.

2 participants