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

feat(run): add Cloud Run + Filestore sample #3288

Merged
merged 110 commits into from
Jul 25, 2023
Merged

Conversation

rogerthatdev
Copy link
Contributor

@rogerthatdev rogerthatdev commented Jun 21, 2023

Description

This pull request will add a nodejs sample for deploying Cloud Run with a connected filestore.

To manually test full deployment to Cloud see Using Filestore with Cloud Run tutorial

Upon deployment:

  • requests to / will generate a test file to the mounted filestore.
  • Clicking a file filename listed at / will show file contents.
  • navigating to /filesystem will present the files on the filesystem via serve-index

Checklist

  • I have followed guidelines from CONTRIBUTING.MD and Samples Style Guide
  • Tests pass: npm test (see Testing)
  • Lint pass: npm run lint (see Style)
  • These samples need a new API enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new sample directory, and I created GitHub Actions workflow for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • Please merge this PR for me once it is approved

@product-auto-label product-auto-label bot added samples Issues that are directly related to samples. api: run Issues related to the Cloud Run API. labels Jun 21, 2023
@rogerthatdev rogerthatdev changed the title Filesystems sample feat(run): add Cloud Run + Filestore sample Jun 21, 2023
run/filesystem/index.js Fixed Show fixed Hide fixed
run/filesystem/index.js Fixed Show fixed Hide fixed
run/filesystem/index.js Fixed Show fixed Hide fixed
run/filesystem/index.js Fixed Show fixed Hide fixed
run/filesystem/index.js Fixed Show fixed Hide fixed
run/filesystem/index.js Fixed Show fixed Hide fixed
run/filesystem/index.js Fixed Show fixed Hide fixed
run/filesystem/index.js Fixed Show fixed Hide fixed
run/filesystem/index.js Fixed Show fixed Hide fixed
@rogerthatdev rogerthatdev marked this pull request as ready for review June 27, 2023 19:43
@rogerthatdev rogerthatdev requested a review from a team as a code owner June 27, 2023 19:43
@rogerthatdev rogerthatdev marked this pull request as ready for review July 17, 2023 19:35
.kokoro/run/filesystem.cfg Outdated Show resolved Hide resolved
run/filesystem/package.json Outdated Show resolved Hide resolved
run/filesystem/test/e2e_test_setup.yaml Outdated Show resolved Hide resolved
console.log(`Listening on port ${port}`);
});

app.get(mntDir, async (req, res) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't add the "back" button to get back to the mount directory index.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This sample can't add the back button because it's returning the actual file which is a plain-text .txt without HTML

Copy link
Contributor

Choose a reason for hiding this comment

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

The canonical does this differently. Do you have a reason to break from the canonical?

@rogerthatdev
Copy link
Contributor Author

Missing integration tests and GCS Fuse files

GCS Fuse files to be added in separate PR

@rogerthatdev rogerthatdev merged commit bdda289 into main Jul 25, 2023
13 checks passed
@rogerthatdev rogerthatdev deleted the filesystems-sample branch July 25, 2023 20:52
@rogerthatdev
Copy link
Contributor Author

fixes #3019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: run Issues related to the Cloud Run API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants