Skip to content

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

Merged
rogerthatdev merged 110 commits into
mainfrom
filesystems-sample
Jul 25, 2023
Merged

rogerthatdev merged 110 commits into
mainfrom
filesystems-sample

Conversation

@rogerthatdev

@rogerthatdev rogerthatdev commented Jun 21, 2023 •

Copy link
Copy Markdown
Contributor

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
Comment thread run/filesystem/index.js Fixed
Comment thread run/filesystem/index.js Fixed
Comment thread run/filesystem/index.js Fixed
Comment thread run/filesystem/index.js Fixed
Comment thread run/filesystem/index.js Fixed
Comment thread run/filesystem/index.js Fixed
Comment thread run/filesystem/index.js Fixed
Comment thread run/filesystem/index.js Fixed
Comment thread run/filesystem/index.js 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
Comment thread .kokoro/run/filesystem.cfg Outdated
Comment thread run/filesystem/package.json Outdated
Comment thread run/filesystem/test/e2e_test_setup.yaml Outdated
Comment thread run/filesystem/test/system.test.js Outdated
Comment thread run/filesystem/index.js Outdated
Comment thread run/filesystem/index.js Outdated
Comment thread run/filesystem/index.js
console.log(`Listening on port ${port}`);
});

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

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.

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

Missing integration tests and GCS Fuse files

GCS Fuse files to be added in separate PR

@rogerthatdev
rogerthatdev requested a review from averikitsch July 20, 2023 21:19
@rogerthatdev
rogerthatdev merged commit bdda289 into main Jul 25, 2023
@rogerthatdev
rogerthatdev deleted the filesystems-sample branch July 25, 2023 20:52
@rogerthatdev

Copy link
Copy Markdown
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.

7 participants