Skip to content

feat(wren-ui): Support Athena connector#1754

Merged
fredalai merged 2 commits into
mainfrom
feature/athena-connector
Jun 19, 2025
Merged

feat(wren-ui): Support Athena connector#1754
fredalai merged 2 commits into
mainfrom
feature/athena-connector

Conversation

@fredalai
Copy link
Copy Markdown
Contributor

@fredalai fredalai commented Jun 18, 2025

This pull request introduces support for the Athena data source.

Description

Support Athena (Trino SQL) connector

Athena Data Source:

Logo:

athena

Engine API information

{
    "s3_staging_dir": 
    "aws_access_key_id": 
    "aws_secret_access_key": 
    "region_name": 
    "schema_name": 
}

Ref UI

截圖 2025-06-18 下午5 43 17
截圖 2025-06-18 下午5 43 54

截圖 2025-06-18 下午5 54 31

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 18, 2025

Walkthrough

This change adds support for the Athena data source throughout the application. It introduces new types, schema entries, configuration options, UI components for Athena, and updates related enums and mappings. Additionally, it modifies dashboard schedule types to make certain fields optional and nullable, and updates error messages for Athena-specific fields.

Changes

File(s) Change Summary
.../graphql/types.ts, .../graphql/dashboard.generated.ts Made dashboard schedule fields optional/nullable; reordered/extended DataSourceName enum.
.../server/adaptors/ibisAdaptor.ts, .../server/dataSource.ts, .../server/mdl/type.ts Added Athena support: new types, enum entries, and connection mapping for Athena.
.../server/repositories/projectRepository.ts Added ATHENA_CONNECTION_INFO interface; extended WREN_AI_CONNECTION_INFO union.
.../server/schema.ts, .../server/types/dataSource.ts, .../utils/enum/dataSources.ts Added ATHENA to DataSourceName and DATA_SOURCES enums.
.../components/pages/setup/dataSources/AthenaProperties.tsx Added new React component for Athena data source configuration form.
.../components/pages/setup/utils.tsx Added Athena entry to DATA_SOURCE_OPTIONS with guide URL and config.
.../pages/home/dashboard.tsx Updated schedule prop typing for DashboardHeader component.
.../utils/dataSourceType.ts Added Athena support to data source image, name, and properties functions.
.../utils/error/dictionary.ts Added Athena-specific error messages for AWS connection fields.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant UI
  participant Server
  participant Athena

  User->>UI: Selects Athena as data source
  UI->>UI: Renders AthenaProperties form
  User->>UI: Fills AWS credentials and config
  UI->>Server: Submits Athena connection info
  Server->>Athena: Uses credentials to connect
  Athena-->>Server: Returns connection status
  Server-->>UI: Responds with result
  UI-->>User: Displays connection status
Loading

Possibly related PRs

Suggested reviewers

  • andreashimin

Poem

In the warren of code, a new path appears,
Athena now joins—let's give three cheers!
With keys and regions, and S3 in tow,
The dashboard's schedule can ebb and flow.
Hopping through forms, the rabbit's delight:
Athena support is now in sight!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2b13d70 and 8bc18e8.

⛔ Files ignored due to path filters (1)
  • wren-ui/public/images/dataSource/athena.svg is excluded by !**/*.svg
📒 Files selected for processing (15)
  • wren-ui/src/apollo/client/graphql/__types__.ts (3 hunks)
  • wren-ui/src/apollo/client/graphql/dashboard.generated.ts (1 hunks)
  • wren-ui/src/apollo/server/adaptors/ibisAdaptor.ts (3 hunks)
  • wren-ui/src/apollo/server/dataSource.ts (2 hunks)
  • wren-ui/src/apollo/server/mdl/mdlBuilder.ts (1 hunks)
  • wren-ui/src/apollo/server/mdl/type.ts (1 hunks)
  • wren-ui/src/apollo/server/repositories/projectRepository.ts (1 hunks)
  • wren-ui/src/apollo/server/schema.ts (1 hunks)
  • wren-ui/src/apollo/server/types/dataSource.ts (1 hunks)
  • wren-ui/src/components/pages/setup/dataSources/AthenaProperties.tsx (1 hunks)
  • wren-ui/src/components/pages/setup/utils.tsx (1 hunks)
  • wren-ui/src/pages/home/dashboard.tsx (2 hunks)
  • wren-ui/src/utils/dataSourceType.ts (4 hunks)
  • wren-ui/src/utils/enum/dataSources.ts (1 hunks)
  • wren-ui/src/utils/error/dictionary.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • wren-ui/src/apollo/server/adaptors/ibisAdaptor.ts
🚧 Files skipped from review as they are similar to previous changes (14)
  • wren-ui/src/pages/home/dashboard.tsx
  • wren-ui/src/apollo/server/schema.ts
  • wren-ui/src/apollo/server/mdl/mdlBuilder.ts
  • wren-ui/src/components/pages/setup/utils.tsx
  • wren-ui/src/utils/enum/dataSources.ts
  • wren-ui/src/apollo/server/types/dataSource.ts
  • wren-ui/src/utils/dataSourceType.ts
  • wren-ui/src/utils/error/dictionary.ts
  • wren-ui/src/components/pages/setup/dataSources/AthenaProperties.tsx
  • wren-ui/src/apollo/server/repositories/projectRepository.ts
  • wren-ui/src/apollo/server/mdl/type.ts
  • wren-ui/src/apollo/client/graphql/types.ts
  • wren-ui/src/apollo/server/dataSource.ts
  • wren-ui/src/apollo/client/graphql/dashboard.generated.ts
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (python)
  • GitHub Check: Analyze (javascript-typescript)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in Comment
  • Commit Unit Tests in branch feature/athena-connector

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@fredalai fredalai force-pushed the feature/athena-connector branch 2 times, most recently from 115ba58 to 2b13d70 Compare June 18, 2025 09:16
@fredalai fredalai changed the title feat(wren-ui): support Athena connector feat(wren-ui): Support Athena connector Jun 18, 2025
@fredalai fredalai marked this pull request as ready for review June 18, 2025 09:29
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🧹 Nitpick comments (4)
wren-ui/src/apollo/server/schema.ts (1)

47-58: Ensure consistent enum ordering for DataSourceName

The ATHENA member is inserted at the top of this GraphQL enum, whereas TypeScript enums place it elsewhere. For predictable ordering in introspection-driven UIs, consider sorting the values alphabetically or aligning the order with your TypeScript definitions.

wren-ui/src/pages/home/dashboard.tsx (1)

12-14: Circular-dependency / tree-shaking risk – export the Schedule type from a dedicated file

CacheSettingsDrawer now re-exports Schedule, forcing consumers of a type to import the whole drawer bundle.
Consider extracting Schedule to its own module (e.g. types.ts) or to the GraphQL-generated types to avoid unnecessary bundle weight and potential circular imports.

wren-ui/src/utils/dataSourceType.ts (1)

11-12: Import path will break the chunk if the component file is code-split elsewhere

If AthenaProperties is heavy (SDK validation, etc.), consider lazy loading it with dynamic import() as done for some other data-sources to keep initial bundle small.

wren-ui/src/utils/error/dictionary.ts (1)

52-63: Great – dedicated error texts for AWS fields

Clear, actionable messages improve UX. Consider adding simple format validation (e.g. S3 URI must start with s3://, region regex) in the form component for even earlier feedback.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6e84b6a and 2b13d70.

⛔ Files ignored due to path filters (1)
  • wren-ui/public/images/dataSource/athena.svg is excluded by !**/*.svg
📒 Files selected for processing (15)
  • wren-ui/src/apollo/client/graphql/__types__.ts (3 hunks)
  • wren-ui/src/apollo/client/graphql/dashboard.generated.ts (1 hunks)
  • wren-ui/src/apollo/server/adaptors/ibisAdaptor.ts (3 hunks)
  • wren-ui/src/apollo/server/dataSource.ts (2 hunks)
  • wren-ui/src/apollo/server/mdl/mdlBuilder.ts (1 hunks)
  • wren-ui/src/apollo/server/mdl/type.ts (1 hunks)
  • wren-ui/src/apollo/server/repositories/projectRepository.ts (1 hunks)
  • wren-ui/src/apollo/server/schema.ts (1 hunks)
  • wren-ui/src/apollo/server/types/dataSource.ts (1 hunks)
  • wren-ui/src/components/pages/setup/dataSources/AthenaProperties.tsx (1 hunks)
  • wren-ui/src/components/pages/setup/utils.tsx (1 hunks)
  • wren-ui/src/pages/home/dashboard.tsx (2 hunks)
  • wren-ui/src/utils/dataSourceType.ts (4 hunks)
  • wren-ui/src/utils/enum/dataSources.ts (1 hunks)
  • wren-ui/src/utils/error/dictionary.ts (1 hunks)
🔇 Additional comments (13)
wren-ui/src/utils/enum/dataSources.ts (1)

11-11: Add Athena to supported data sources

The new enum entry is correct and aligns with the PR objectives.

wren-ui/src/apollo/server/mdl/type.ts (1)

86-90: Add Athena to WrenEngineDataSourceType

The new enum entry correctly integrates Athena as a supported engine type.

wren-ui/src/apollo/server/mdl/mdlBuilder.ts (1)

494-497: Map Athena in buildDataSource

The new switch-case correctly maps DataSourceName.ATHENA to WrenEngineDataSourceType.ATHENA, ensuring Athena manifests are built properly.

wren-ui/src/components/pages/setup/utils.tsx (1)

105-109: 👍 Athena option correctly wired

Entry looks consistent with existing options (guide URL, disabled flag). No issues spotted.

wren-ui/src/utils/dataSourceType.ts (3)

60-62: Display name alignment looks good

“Athena” follows existing naming conventions.


87-88: Properties component registered

Registration completes the triad (image, label, form component). Nice.


33-35: ```shell
#!/bin/bash

Search the entire repository for athena.svg (case-insensitive)

find . -type f -iname athena.svg


</details>
<details>
<summary>wren-ui/src/apollo/server/repositories/projectRepository.ts (1)</summary>

`96-97`: **Union order fine; don’t forget downstream narrowing**

Wherever `connectionInfo` is type-narrowed (e.g. adaptor layer) add a case for `ATHENA`, otherwise TypeScript’s exhaustiveness checks will fail silently if you used `as unknown as`.

</details>
<details>
<summary>wren-ui/src/apollo/server/adaptors/ibisAdaptor.ts (2)</summary>

`69-75`: **Athena interface is clear and consistent with ibis-py expectations**  
The field names follow ibis’ parameter conventions (`aws_access_key_id`, `s3_staging_dir`, etc.), so no mapping friction is expected on the Python side.

---

`86-99`: **Enum / URL map updated correctly**  
`SupportedDataSource.ATHENA` and its URL mapping were added without disturbing existing entries—good housekeeping.

</details>
<details>
<summary>wren-ui/src/apollo/client/graphql/__types__.ts (2)</summary>

`293-300`: **`frequency`, `hour`, `minute` turned into `Maybe` – tighten caller checks**

The schedule fields are now nullable/optional.  Any consumer code that previously did:

```ts
const { frequency, hour, minute } = dashboard.schedule;

without null-guards will now break at runtime when schedule or any of its children come back null.
Please grep the UI for direct property access and add safe-navigation (?.) or fallback defaults where needed.


315-323: New ATHENA entry added to DataSourceName enum – review exhaustiveness

Every switch/if that branches on DataSourceName (logo mapping, validator, connection form, etc.) must handle the ATHENA case, otherwise the compiler won’t complain (string enum) but users will see empty UI / “unsupported” errors.

wren-ui/src/apollo/client/graphql/dashboard.generated.ts (1)

59-59: Generated DashboardQuery reflects nullable schedule – audit UI for null-checks

dashboard.schedule and its nested fields are now optional in the generated hook result.
Before merging, run tsc --noEmit (or your CI) and manually test the dashboard page with no schedule configured to be sure there are no uncontrolled undefined accesses or rendering glitches.

CLICK_HOUSE = 'CLICK_HOUSE',
TRINO = 'TRINO',
SNOWFLAKE = 'SNOWFLAKE',
ATHENA = 'ATHENA',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Missing Athena properties in DataSourceProperties union

You’ve added ATHENA to DataSourceName but haven’t defined or included an AthenaDataSourceProperties interface in the DataSourceProperties type. Please create an interface for Athena-specific fields (s3_staging_dir, aws_access_key_id, aws_secret_access_key, region_name, schema_name) and add it to the union to maintain type safety.

🤖 Prompt for AI Agents
In wren-ui/src/apollo/server/types/dataSource.ts at line 11, you added ATHENA to
DataSourceName but did not define AthenaDataSourceProperties or include it in
the DataSourceProperties union. Define an interface AthenaDataSourceProperties
with fields s3_staging_dir, aws_access_key_id, aws_secret_access_key,
region_name, and schema_name, then add this interface to the
DataSourceProperties union type to ensure type safety for Athena data sources.

<DashboardHeader
isSupportCached={isSupportCached}
schedule={data?.dashboard?.schedule}
schedule={data?.dashboard?.schedule as Schedule}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Avoid unchecked as Schedule; rely on proper typing instead

The explicit cast suppresses the compiler even when data?.dashboard?.schedule is:

  1. undefined | null (now allowed by the schema change);
  2. structurally incompatible after future edits.

Prefer a safe-guard:

- schedule={data?.dashboard?.schedule as Schedule}
+ schedule={data?.dashboard?.schedule ?? undefined}

and declare the prop in DashboardHeader as schedule?: Schedule to keep strict-null-checks useful.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
schedule={data?.dashboard?.schedule as Schedule}
- schedule={data?.dashboard?.schedule as Schedule}
+ schedule={data?.dashboard?.schedule ?? undefined}
🤖 Prompt for AI Agents
In wren-ui/src/pages/home/dashboard.tsx at line 112, remove the explicit cast to
Schedule on data?.dashboard?.schedule to avoid unchecked type assertion.
Instead, rely on proper typing by allowing the schedule prop in DashboardHeader
to be optional (schedule?: Schedule). This preserves strict-null-checks and
safely handles cases where schedule may be undefined or null.

Comment on lines +86 to +93
export interface ATHENA_CONNECTION_INFO {
database: string;
schema: string;
s3StagingDir: string;
awsRegion: string;
awsAccessKey: string;
awsSecretKey: string;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Interface added, but remember to mask secrets when logging

awsAccessKey / awsSecretKey are now part of connectionInfo. Ensure any logging/serialization that surfaces connectionInfo strips these fields; other connectors already have masking helpers – please extend them to Athena.

🤖 Prompt for AI Agents
In wren-ui/src/apollo/server/repositories/projectRepository.ts around lines 86
to 93, the new ATHENA_CONNECTION_INFO interface includes sensitive fields
awsAccessKey and awsSecretKey. To fix this, identify all places where
connectionInfo is logged or serialized and update the code to mask or remove
these secret fields before output. Reuse or extend existing masking helper
functions used by other connectors to ensure consistent handling of sensitive
data for Athena connection info.

Comment on lines +76 to +87
label="AWS access key ID"
name="awsAccessKey"
required
rules={[
{
required: true,
message: ERROR_TEXTS.CONNECTION.AWS_ACCESS_KEY.REQUIRED,
},
]}
>
<Input />
</Form.Item>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Mask the AWS access-key field & treat it as sensitive
Even though the access-key ID is less sensitive than the secret key, showing it in plain text invites shoulder-surfing and screenshots in bug reports.

-      >
-        <Input />
+      >
+        <Input.Password />

If you adopt this, remember to

  1. add "awsAccessKey" to sensitiveProps for Athena in dataSource.ts, and
  2. re-encrypt existing records (if any).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
label="AWS access key ID"
name="awsAccessKey"
required
rules={[
{
required: true,
message: ERROR_TEXTS.CONNECTION.AWS_ACCESS_KEY.REQUIRED,
},
]}
>
<Input />
</Form.Item>
label="AWS access key ID"
name="awsAccessKey"
required
rules={[
{
required: true,
message: ERROR_TEXTS.CONNECTION.AWS_ACCESS_KEY.REQUIRED,
},
]}
>
<Input.Password />
</Form.Item>
🤖 Prompt for AI Agents
In wren-ui/src/components/pages/setup/dataSources/AthenaProperties.tsx around
lines 76 to 87, the AWS access key ID input field is currently shown in plain
text, which risks exposure through shoulder-surfing or screenshots. Change the
Input component to a password type input to mask the value. Additionally, add
"awsAccessKey" to the sensitiveProps list for Athena in dataSource.ts and ensure
any existing stored access keys are re-encrypted to maintain security.

Comment on lines 68 to +92
const dataSource = {
// Athena
[DataSourceName.ATHENA]: {
sensitiveProps: ['awsSecretKey'],
toIbisConnectionInfo(connectionInfo) {
const decryptedConnectionInfo = decryptConnectionInfo(
DataSourceName.ATHENA,
connectionInfo,
);
const { awsAccessKey, awsRegion, awsSecretKey, s3StagingDir, schema } =
decryptedConnectionInfo as ATHENA_CONNECTION_INFO;
const res: IbisAthenaConnectionInfo = {
aws_access_key_id: awsAccessKey,
aws_secret_access_key: awsSecretKey,
region_name: awsRegion,
s3_staging_dir: s3StagingDir,
schema_name: schema,
};
return res;
},
} as IDataSourceConnectionInfo<
ATHENA_CONNECTION_INFO,
IbisAthenaConnectionInfo
>,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Encrypt the AWS access-key ID as well
Currently only awsSecretKey is marked sensitive. Storing the access-key ID in clear text leaks half of the credential pair and complicates key rotation audits.

-    sensitiveProps: ['awsSecretKey'],
+    // access-key ID is not strictly secret, but encrypting both halves of
+    // the credential pair avoids accidental leaks in logs / DB exports.
+    sensitiveProps: ['awsSecretKey', 'awsAccessKey'],

Encryption / decryption will keep functioning because both helpers iterate over sensitiveProps.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const dataSource = {
// Athena
[DataSourceName.ATHENA]: {
sensitiveProps: ['awsSecretKey'],
toIbisConnectionInfo(connectionInfo) {
const decryptedConnectionInfo = decryptConnectionInfo(
DataSourceName.ATHENA,
connectionInfo,
);
const { awsAccessKey, awsRegion, awsSecretKey, s3StagingDir, schema } =
decryptedConnectionInfo as ATHENA_CONNECTION_INFO;
const res: IbisAthenaConnectionInfo = {
aws_access_key_id: awsAccessKey,
aws_secret_access_key: awsSecretKey,
region_name: awsRegion,
s3_staging_dir: s3StagingDir,
schema_name: schema,
};
return res;
},
} as IDataSourceConnectionInfo<
ATHENA_CONNECTION_INFO,
IbisAthenaConnectionInfo
>,
const dataSource = {
// Athena
[DataSourceName.ATHENA]: {
// access-key ID is not strictly secret, but encrypting both halves of
// the credential pair avoids accidental leaks in logs / DB exports.
sensitiveProps: ['awsSecretKey', 'awsAccessKey'],
toIbisConnectionInfo(connectionInfo) {
const decryptedConnectionInfo = decryptConnectionInfo(
DataSourceName.ATHENA,
connectionInfo,
);
const { awsAccessKey, awsRegion, awsSecretKey, s3StagingDir, schema } =
decryptedConnectionInfo as ATHENA_CONNECTION_INFO;
const res: IbisAthenaConnectionInfo = {
aws_access_key_id: awsAccessKey,
aws_secret_access_key: awsSecretKey,
region_name: awsRegion,
s3_staging_dir: s3StagingDir,
schema_name: schema,
};
return res;
},
} as IDataSourceConnectionInfo<
ATHENA_CONNECTION_INFO,
IbisAthenaConnectionInfo
>,
🤖 Prompt for AI Agents
In wren-ui/src/apollo/server/dataSource.ts between lines 68 and 92, the
awsAccessKey is not included in the sensitiveProps array, causing it to be
stored in clear text. To fix this, add 'awsAccessKey' to the sensitiveProps
array alongside 'awsSecretKey' so that both keys are encrypted and decrypted
properly, ensuring full credential security and easier key rotation audits.

Comment on lines +388 to 389
schedule?: Maybe<DashboardSchedule>;
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

DetailedDashboard.schedule can now be null – update component props

Components such as <DashboardHeader> and any helpers that expect schedule! need to accept undefined / null. Prop-drilling a possibly-null object into components typed as non-null will silently widen to any and defeat type-safety.

🤖 Prompt for AI Agents
In wren-ui/src/apollo/client/graphql/__types__.ts at lines 388-389, the
DetailedDashboard.schedule field is now nullable, but components like
DashboardHeader still expect a non-null schedule prop. Update the component
props and any helper functions to accept schedule as possibly undefined or null,
ensuring type definitions reflect this change to maintain type safety and
prevent implicit any types.

@fredalai fredalai force-pushed the feature/athena-connector branch from 2b13d70 to 8bc18e8 Compare June 18, 2025 09:44
Copy link
Copy Markdown
Contributor

@andreashimin andreashimin left a comment

Choose a reason for hiding this comment

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

lgtm

@fredalai fredalai merged commit 1b1a5b9 into main Jun 19, 2025
10 checks passed
@fredalai fredalai deleted the feature/athena-connector branch June 19, 2025 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants