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

Skip database selection step when monitors would have no databases #5056

Merged
merged 5 commits into from
Jul 3, 2024

Conversation

jpople
Copy link
Contributor

@jpople jpople commented Jul 3, 2024

Description Of Changes

In discovery monitor configuration UI, changes form to submit immediately instead of advancing to blank project selection UI when there are no projects associated with the integration.

Code Changes

  • Handle form state and submission at modal level instead of inside form steps
  • Query database list endpoint at beginning of form process
  • Change first form step to submit immediately if no databases are found

Steps to Confirm

  • Create an integration with applicable projects (e.g. BigQuery)
  • Create a monitor for that integration; form should go through form step then project selection step
  • Edit an existing monitor for that integration; form should go through form step then project selection step
  • Create an integration without applicable projects (e.g. S3)
  • Create a monitor for that integration; form should submit immediately after form step and not show project selection step
  • Edit an existing monitor for that integration; form should submit immediately after form step and not show project selection step

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • Issue Requirements are Met
  • Update CHANGELOG.md

Copy link

vercel bot commented Jul 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
fides-plus-nightly ⬜️ Ignored (Inspect) Visit Preview Jul 3, 2024 3:14pm

Copy link

cypress bot commented Jul 3, 2024

Passing run #8745 ↗︎

0 4 0 0 Flakiness 0

Details:

Merge fecc1bb into dc2fefd...
Project: fides Commit: e4af10e1ad ℹ️
Status: Passed Duration: 00:42 💡
Started: Jul 3, 2024 3:27 PM Ended: Jul 3, 2024 3:28 PM

Review all test suite changes for PR #5056 ↗︎

Copy link
Contributor

@lucanovera lucanovera left a comment

Choose a reason for hiding this comment

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

The changes look good. Approved!

@@ -81,7 +87,11 @@ const ConfigureMonitorForm = ({
single_dataset: false,
};
}
onAdvance(payload);
if (databasesAvailable) {
Copy link
Contributor

Choose a reason for hiding this comment

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

crystal clear code

const [putMonitorMutationTrigger, { isLoading: isSubmitting }] =
usePutDiscoveryMonitorMutation();

const { data: databases } = useGetDatabasesByConnectionQuery({
Copy link
Contributor

Choose a reason for hiding this comment

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

Perfect. Having the data fetching higher up in the component hierarchy is very useful.

@jpople jpople merged commit 69a1048 into main Jul 3, 2024
13 checks passed
@jpople jpople deleted the jpople/skip-project-selection branch July 3, 2024 15:32
Copy link

cypress bot commented Jul 3, 2024

Passing run #8746 ↗︎

0 4 0 0 Flakiness 0

Details:

Skip database selection step when monitors would have no databases (#5056)
Project: fides Commit: 69a1048eaf
Status: Passed Duration: 00:40 💡
Started: Jul 3, 2024 3:44 PM Ended: Jul 3, 2024 3:45 PM

Review all test suite changes for PR #5056 ↗︎

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.

2 participants