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

test: [M3-8769] - Add Docker Compose service to reverse proxy Cloud in CI #11177

Merged

Conversation

jdamore-linode
Copy link
Contributor

Description 📝

This PR includes Docker changes that are necessary to reverse proxy containerized Cloud Manager instances in CI. This allows our CI tools to automate containerized Cloud instances and perform actions that are only available in secure browser contexts.

Notably, this is necessary to unblock our OAuth PKCE work (#10600) which includes changes that cannot be tested in environments where a secure context is not available.

Once this PR is merged, additional (minor) CI changes will need to be made to use the new Docker Compose service. I don't believe any changes are necessary for GitHub Actions since Cloud is served from localhost:3000 already.

Changes 🔄

  • Remove and consolidate Docker build stage related to expect and openssh-client installation -- these packages are no longer needed since we removed our Longview end-to-end test
  • Add e2e-reverse-proxy Docker build target which is identical to e2e but includes caddy
  • Add cypress-containerized Docker Compose service to test against a local containerized Cloud instance
    -- The key difference between cypress-local and cypress-containerized is that cypress-containerized has a reverse proxy running that allows Cloud to be accessed from inside the container at localhost:3000, which is what allows us to achieve a secure context from the tests
  • Expose a nodejs-cloud-manager build target that includes bun and pnpm (cc @bnussman-akamai)

Target release date 🗓️

N/A, but we will probably want these changes to sit in develop for a few days before changing our CI pipelines since the pipeline changes will causebreakage against any branches/PRs that pre-date this change.

How to test 🧪

This can't be easily tested since the CI changes haven't been made (this PR accomplishes basically nothing on its own). However, I did do a test run that demonstrates that these changes work and that they allow the OAuth/PKCE changes to be tested. I've included a link to that run in the Jira ticket, as well as some details as to how that run was achieved, etc.

As an Author I have considered 🤔

Check all that apply

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
  • 🧪 Providing/Improving test coverage
  • 🔐 Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • 👣 Providing comprehensive reproduction steps
  • 📑 Providing or updating our documentation
  • 🕛 Scheduling a pair reviewing session
  • 📱 Providing mobile support
  • ♿ Providing accessibility support

Copy link

github-actions bot commented Oct 28, 2024

Coverage Report:
Base Coverage: 87.23%
Current Coverage: 87.23%

Copy link
Member

@bnussman-akamai bnussman-akamai left a comment

Choose a reason for hiding this comment

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

Nice. Caddy is awesome! I use it to reverse proxy things I self hosted at 🏠

@jdamore-linode jdamore-linode merged commit d871268 into linode:develop Nov 1, 2024
23 checks passed
Copy link

cypress bot commented Nov 1, 2024

Cloud Manager E2E    Run #6766

Run Properties:  status check failed Failed #6766  •  git commit d871268b7b: test: [M3-8769] - Add Docker Compose service to reverse proxy Cloud in CI (#1117...
Project Cloud Manager E2E
Branch Review develop
Run status status check failed Failed #6766
Run duration 27m 19s
Commit git commit d871268b7b: test: [M3-8769] - Add Docker Compose service to reverse proxy Cloud in CI (#1117...
Committer jdamore-linode
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 3
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 444
View all changes introduced in this branch ↗︎

Tests for review

Failed  cypress/e2e/core/kubernetes/lke-create.spec.ts • 1 failed test

View Output Video

Test Artifacts
LKE Cluster Creation > can create an LKE cluster Screenshots Video
Flakiness  stackscripts/create-stackscripts.spec.ts • 1 flaky test

View Output Video

Test Artifacts
Create stackscripts > creates a StackScript with Any/All target image Screenshots Video
Flakiness  objectStorageGen2/bucket-object-gen2.spec.ts • 1 flaky test

View Output Video

Test Artifacts
Object Storage Gen2 bucket object tests > can check Object details drawer with E0 endpoint type Screenshots Video
Flakiness  placementGroups/delete-placement-groups.spec.ts • 1 flaky test

View Output Video

Test Artifacts
Placement Group deletion > can delete with Linodes assigned when unexpected error show up and retry Screenshots Video

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants