Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Refactor storage bucket constants #556

Merged
merged 2 commits into from
Nov 11, 2022
Merged

Conversation

gastonyelmini
Copy link
Contributor

Refactor storage constants to match new structure requirements.

@gastonyelmini gastonyelmini requested a review from ndowmon November 7, 2022 13:44
@gastonyelmini gastonyelmini requested a review from a team as a code owner November 7, 2022 13:44
@gastonyelmini gastonyelmini requested a review from i5o November 7, 2022 13:45
@@ -15,7 +15,7 @@ import {
} from './constants';
import { CloudSourceRepositoriesStepsSpec } from '../cloud-source-repositories/constants';
import { cloudfunctions_v1 } from 'googleapis';
import { STEP_CLOUD_STORAGE_BUCKETS } from '../storage';
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we get rid of this and use the new constant?

@@ -2,3 +2,18 @@ export const CLOUD_STORAGE_BUCKET_ENTITY_CLASS = 'DataStore';
export const CLOUD_STORAGE_BUCKET_ENTITY_TYPE = 'google_storage_bucket';

export const STEP_CLOUD_STORAGE_BUCKETS = 'fetch-cloud-storage-buckets';
Copy link
Contributor

Choose a reason for hiding this comment

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

We should be able to remove these lines

@gastonyelmini gastonyelmini force-pushed the storage-constants-refactor branch from 8405221 to 1182ed7 Compare November 7, 2022 14:38
i5o
i5o previously approved these changes Nov 7, 2022
CLOUD_STORAGE_BUCKET_ENTITY_TYPE,
STEP_CLOUD_STORAGE_BUCKETS,
} from '../storage';
import { StorageEntitiesSpec, StorageStepsSpec } from '../storage';
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you remove the export * from './constants' line from storage/index.ts? Exporting from index.ts can quickly lead to circular dependencies, so it's much better to always import from constants and to stop the practice of export * from './constants'.

Suggested change
import { StorageEntitiesSpec, StorageStepsSpec } from '../storage';
import { StorageEntitiesSpec, StorageStepsSpec } from '../storage/constants';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in commit f007ff0 :)

@gastonyelmini gastonyelmini force-pushed the storage-constants-refactor branch from 1182ed7 to f007ff0 Compare November 8, 2022 12:51
@gastonyelmini gastonyelmini force-pushed the INT-5917-cloud-function-relationship branch 4 times, most recently from 87b7d88 to 44fd8ab Compare November 9, 2022 00:43
Base automatically changed from INT-5917-cloud-function-relationship to main November 9, 2022 02:26
@gastonyelmini gastonyelmini force-pushed the storage-constants-refactor branch from f007ff0 to d26edbe Compare November 9, 2022 02:36
@gastonyelmini gastonyelmini force-pushed the storage-constants-refactor branch from d26edbe to 2dd5a03 Compare November 9, 2022 14:09
@gastonyelmini gastonyelmini added the patch Increment the patch version when merged label Nov 11, 2022
@gastonyelmini gastonyelmini merged commit 29ace9b into main Nov 11, 2022
@gastonyelmini gastonyelmini deleted the storage-constants-refactor branch November 11, 2022 15:35
@j1-internal-automation
Copy link
Collaborator

🚀 PR was released in v2.20.1 🚀

@j1-internal-automation j1-internal-automation added the released This issue/pull request has been released. label Dec 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
patch Increment the patch version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants