Skip to content

External Service Credentials #12454

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

Merged
merged 63 commits into from
Apr 8, 2025
Merged

External Service Credentials #12454

merged 63 commits into from
Apr 8, 2025

Conversation

somebody1234
Copy link
Contributor

Pull Request Description

Important Notes

None

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.
  • If meaningful changes were made to logic or tests affecting Enso Cloud integration in the libraries,
    or the Snowflake database integration, a run of the Extra Tests has been scheduled.
    • If applicable, it is suggested to paste a link to a successful run of the Extra Tests.

@somebody1234 somebody1234 added CI: No changelog needed Do not require a changelog entry for this PR. x-new-feature Type: new feature request g-dashboard labels Mar 10, 2025
Copy link

github-actions bot commented Mar 10, 2025

🧪 Storybook is successfully deployed!

📊 Dashboard:

mergify bot pushed a commit that referenced this pull request Apr 4, 2025
- Closes #12011
- Note that since Google API is experimental, the new credentials are currently integrated with Sheets feature. Analytics feature is not yet updated to support them, let's do that as a separate followup PR.
- Related PRs:
- GUI: #12454
- cloud: https://github.com/enso-org/cloud-v2/pull/1821
- This libs PR can probably be merged before the others, but first we want to test the integration of the full flow.

/** A modal for creating a credential. */
export default function CreateCredentialModal(props: CreateCredentialModalProps) {
const { noDialog = false, doCreate } = props
Copy link
Contributor

Choose a reason for hiding this comment

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

noDialog should be forbidden, prefer exporting 2 components: CreateCredentialModal and CreateCredentialForm

const { getText } = useText()
const toastAndLog = useToastAndLog()

const form = Form.useForm({
Copy link
Contributor

Choose a reason for hiding this comment

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

It's better to inline form here:

<Form schema={google.FORM_SCHEMA} method="dialog" className="w-full" onSubmit={....}>

Copy link
Contributor

Choose a reason for hiding this comment

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

Same true for the other providers

form={form}
name="scopes"
label={getText('googleCredentialScopes')}
defaultValue={['sheets']}
Copy link
Contributor

Choose a reason for hiding this comment

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

it's better to set default values on the form element

@@ -651,6 +651,25 @@ export function useNewSecret(backend: Backend) {
})
}

/** A function to create a new credential. */
export function useNewCredential(backend: Backend) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need a hook here, prefer newCredentialMutationOptions and use an appropriate hook in place useMutation/useMutationCallback

@@ -417,6 +419,59 @@ function AssetPropertiesInternal(props: AssetPropertiesInternalProps) {
</div>
)}

{isSecret && isCredential && (
<div className={styles.section()} {...secretSpotlight.props}>
<Heading
Copy link
Contributor

@MrFlashAccount MrFlashAccount Apr 7, 2025

Choose a reason for hiding this comment

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

<Text variant="h1">{getText('configuration')}</Text>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what does this comment mean?

Copy link
Contributor

Choose a reason for hiding this comment

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

Github doesn't sanitize text bu default... fixed!

Copy link
Contributor

Choose a reason for hiding this comment

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

Why Text and not Heading though?

All other variants in this file use Heading, I essentially copy-pasted and adapted another variant. So I need some justification for changing this to be different than the convention in other parts of this file.

@radeusgd radeusgd added the CI: Ready to merge This PR is eligible for automatic merge label Apr 8, 2025
@mergify mergify bot merged commit eb5488c into develop Apr 8, 2025
63 checks passed
@mergify mergify bot deleted the wip/sb/credentials branch April 8, 2025 10:39
@jdunkerley jdunkerley added this to the 2025-Q1 Release milestone Apr 8, 2025
mergify bot pushed a commit that referenced this pull request Apr 9, 2025
farmaazon pushed a commit that referenced this pull request Apr 11, 2025
- Closes #12011
- Note that since Google API is experimental, the new credentials are currently integrated with Sheets feature. Analytics feature is not yet updated to support them, let's do that as a separate followup PR.
- Related PRs:
- GUI: #12454
- cloud: enso-org/cloud-v2#1821
- This libs PR can probably be merged before the others, but first we want to test the integration of the full flow.
farmaazon pushed a commit that referenced this pull request Apr 11, 2025
- Implement enso-org/cloud-v2#1694
- Add dialog to add an External Service Credential

# Important Notes
None
farmaazon pushed a commit that referenced this pull request Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. CI: Ready to merge This PR is eligible for automatic merge g-dashboard x-new-feature Type: new feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants