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

Make data connection for S3 model sources AWS-unspecific #1479

Merged
merged 3 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ test('Edit model', async ({ page }) => {
await page
.getByRole('textbox', { name: 'Field list AWS_SECRET_ACCESS_KEY' })
.fill('test-secret-key');
await page.getByRole('textbox', { name: 'Field list AWS_S3_ENDPOINT' }).fill('test-endpoint');
await expect(page.getByRole('button', { name: 'Deploy', exact: true })).toBeEnabled();
});

Expand Down Expand Up @@ -81,5 +82,6 @@ test('Create model', async ({ page }) => {
await page
.getByRole('textbox', { name: 'Field list AWS_SECRET_ACCESS_KEY' })
.fill('test-secret-key');
await page.getByRole('textbox', { name: 'Field list AWS_S3_ENDPOINT' }).fill('test-endpoint');
await expect(await page.getByRole('button', { name: 'Deploy' })).toBeEnabled();
});
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ test('Deploy model', async ({ page }) => {
await page
.getByRole('textbox', { name: 'Field list AWS_SECRET_ACCESS_KEY' })
.fill('test-secret-key');
await page.getByRole('textbox', { name: 'Field list AWS_S3_ENDPOINT' }).fill('test-endpoint');
await expect(await page.getByRole('button', { name: 'Deploy', exact: true })).toBeEnabled();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,21 @@ const ViewPipelineServerModal: React.FC<ViewPipelineServerModalProps> = ({
</DescriptionListDescription>
</DescriptionListGroup>
<DescriptionListGroup>
<DescriptionListTerm>AWS_ACCESS_KEY_ID</DescriptionListTerm>
<DescriptionListTerm>Access key</DescriptionListTerm>
<DescriptionListDescription>
{objectStorageRecord?.AWS_ACCESS_KEY_ID}
</DescriptionListDescription>
</DescriptionListGroup>
<DescriptionListGroup>
<DescriptionListTerm>AWS_SECRET_ACCESS_KEY</DescriptionListTerm>
<DescriptionListTerm>Secret key</DescriptionListTerm>
<DescriptionListDescription>
<PasswordHiddenText
password={objectStorageRecord?.AWS_SECRET_ACCESS_KEY ?? ''}
/>
</DescriptionListDescription>
</DescriptionListGroup>
<DescriptionListGroup>
<DescriptionListTerm>AWS_S3_ENDPOINT</DescriptionListTerm>
<DescriptionListTerm>Endpoint</DescriptionListTerm>
<DescriptionListDescription>
{pipelineNamespaceCR.spec.objectStorage.externalStorage?.scheme &&
pipelineNamespaceCR.spec.objectStorage.externalStorage?.host
Expand All @@ -101,7 +101,7 @@ const ViewPipelineServerModal: React.FC<ViewPipelineServerModalProps> = ({
</DescriptionListDescription>
</DescriptionListGroup>
<DescriptionListGroup>
<DescriptionListTerm>AWS_S3_BUCKET</DescriptionListTerm>
<DescriptionListTerm>Bucket</DescriptionListTerm>
<DescriptionListDescription>
{pipelineNamespaceCR.spec.objectStorage.externalStorage?.bucket}
</DescriptionListDescription>
Expand Down
15 changes: 8 additions & 7 deletions frontend/src/pages/projects/dataConnections/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,27 @@ export const AWS_FIELDS: FieldOptions[] = [
},
{
key: AWS_KEYS.ACCESS_KEY_ID,
label: AWS_KEYS.ACCESS_KEY_ID,
label: 'Access key',
isRequired: true,
},
{
key: AWS_KEYS.SECRET_ACCESS_KEY,
label: AWS_KEYS.SECRET_ACCESS_KEY,
label: 'Secret key',
isPassword: true,
isRequired: true,
},
{
key: AWS_KEYS.S3_ENDPOINT,
label: AWS_KEYS.S3_ENDPOINT,
label: 'Endpoint',
isRequired: true,
},
{
key: AWS_KEYS.DEFAULT_REGION,
label: AWS_KEYS.DEFAULT_REGION,
label: 'Region',
},
{
key: AWS_KEYS.AWS_S3_BUCKET,
label: AWS_KEYS.AWS_S3_BUCKET,
label: 'Bucket',
},
];

Expand All @@ -60,10 +61,10 @@ export const EMPTY_AWS_SECRET_DATA: AWSDataEntry = [
},
{
key: AWS_KEYS.S3_ENDPOINT,
value: 'https://s3.amazonaws.com/',
value: '',
Gkrumbach07 marked this conversation as resolved.
Show resolved Hide resolved
},
{
key: AWS_KEYS.DEFAULT_REGION,
value: 'us-east-1',
value: '',
Gkrumbach07 marked this conversation as resolved.
Show resolved Hide resolved
},
];
Loading