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(domains): update custom domains functionality #2920

Merged
merged 32 commits into from
Jul 24, 2024

Conversation

zwhitfield3
Copy link
Contributor

@zwhitfield3 zwhitfield3 commented Jul 12, 2024

Description

Work Item
Work Item
Work Item

This PR updates and introduces a few new changes for custom domains and the Heroku CLI in general.

  • Adds a pagination utility function that can be used to paginate any list request
  • Adds keyValueParser utility function to parse any @oclif/core flags that may contain spaces such as ./bin/run domains -a testing-deploy --filter 'Domain Name=ztestdomain7'
  • Warns users that the application they're attempting to display custom domains for contains over 100 domains
  • Prompts users after aforementioned warning with a question on whether they would like to display the full list of custom domains

Testing

NOTE: In order to test these updates, you'll need an app with over 1,000 domains. If you don't have one, please ping me to add you to the test app, testing-deploy.

  1. Pull down current branch
  2. yarn it up
  3. Check that the new warning and prompt functionality work via
    ./bin/run domains -a testing-deploy
  4. Confirm the new warning and prompt appear like so:
›   Warning: This app has over 100 domains. Your terminal may not be configured to display the total
›   amount of domains. You can export all domains into a CSV file with: heroku domains -a example-app
›   --csv > example-file.csv
Display all 1003 domains? (Y/N)
  1. Confirm that pressing enter auto selects no as the default option
  2. Run the command again and type y. Confirm that all domains are shown.
  3. Create a csv file by running the example command via
    ./bin/run domains -a testing-deploy --csv > test-domains-file.csv
  4. Confirm all domains are outputted to the csv file
  5. Apply a filter to the domains command via
    ./bin/run domains -a testing-deploy --filter 'Domain Name=ztestdomain7'
  6. Confirm the prompt asks to display all 111 domains
  7. Apply a filter to the domains command that will return less than 100 domains via
    ./bin/run domains -a testing-deploy --filter 'Domain Name=sara'
  8. Confirm that no warning or prompt is displayed and that there is only 1 custom domain

@zwhitfield3 zwhitfield3 changed the title feat(spaces): update custom domains functionality feat(domains): update custom domains functionality Jul 12, 2024
@mattgraham
Copy link
Member

👍 Workflow looks good;

we talked about fixing filtering --filter "blue.com" and having that list the results without the error message (assuming its under 100)

Need to update types and update logic for when this condition will be true. Currently defaulted to true verify size of filtered domains
@zwhitfield3 zwhitfield3 marked this pull request as ready for review July 18, 2024 21:39
@zwhitfield3 zwhitfield3 requested a review from a team as a code owner July 18, 2024 21:39
Copy link
Contributor

@justinwilaby justinwilaby left a comment

Choose a reason for hiding this comment

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

:shipit:

@zwhitfield3 zwhitfield3 merged commit 045eab4 into main Jul 24, 2024
7 checks passed
@zwhitfield3 zwhitfield3 deleted the zw/custom-domains-update branch July 24, 2024 19:51
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