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

Add Nightly Deploy Tests #335

Merged
merged 66 commits into from
Nov 17, 2023
Merged

Add Nightly Deploy Tests #335

merged 66 commits into from
Nov 17, 2023

Conversation

kgartland-rstudio
Copy link
Collaborator

@kgartland-rstudio kgartland-rstudio commented Nov 2, 2023

Intent

This PR adds deployment tests to run at night against a fuzzbucket instance running Connect.

Workflows:

  • nightly.yaml: This runs at 1 AM EST and kicks off all the tests and build workflows that the pull-request.yaml runs as well as the contract-deps, contract, cleanup
  • contract-deps.yaml: currently this only contains a way to start a fuzzbucket instance running Connect. In the future, we can add ways to run other deployment targets and their dependencies here.
  • contract: this is where we run the new test-deploy target that kicks off deployments from the publish-ui to our new fuzzbucket instance we started in contract-deps
  • cleanup: this stops the fuzzbucket instance we started.

Cypress Tests:

  • contract: This currently contains only one spec that deploys the content, then checks to ensure the content was deployed properly to our fuzzbucket instance.
  • ui: I also split out the existing home spec into a ui folder. Tests in the ui folder will test the local publish-ui without the need to have a running Connect instance for deployments.

The pull-request and main workflows will continue to run the ui tests but not the contract tests since these take longer to run due to fuzzbucket startups. and rely on network connections.

Setup:
test/setup/ folder contains scripts to install the latest available dev version of Connect and gets the address using fuzzbucket (connect_setup.py) and a script to calculate an api key given a username (gen_apikey.py). We then store the Connect address as CONNECT_SERVER and the api key as CONNECT_API_KEY so we can use the -n env flag to publish content. This may change in the future when we have better ways to add accounts.

Fuzzbucket:
The fuzzbucket instance I created is called ubuntu22-publishing-client. It has 3 users (admin, publisher, viewer) and I pre-deployed content to build caches for each of the Connect jumpstart examples so deploys won't take long in the contract tests mentioned above. It currently has Python 3.11.4 and R 4.1.2.

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change

Approach

Automated Tests

Directions for Reviewers

Checklist

Copy link
Collaborator

@sagerb sagerb left a comment

Choose a reason for hiding this comment

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

Looks good to me! I left a note on the impact of our redesign, but the impact on this code shouldn't be too bad. I would recommend holding off on adding additional UX cypress tests until we get the new UX up and running.

@@ -0,0 +1,27 @@
describe('Publish', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a note, this is going to be broken and require updates when the new UX design gets merged into main. The default UX will require navigation from the project page to the pre-publish page, where the publish button will be located. We will eventually provide some routes to get directly to the pre-publish page, but those may not be there to start with. No change needed for this PR, but I wanted to let you know.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sounds good. It shouldn't impact CI workflows, we'll just have some nightly failures for a bit until it's ready.

@kgartland-rstudio kgartland-rstudio merged commit a02202d into main Nov 17, 2023
36 checks passed
@kgartland-rstudio kgartland-rstudio deleted the kg-deploy-new branch November 17, 2023 19:41
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.

3 participants