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

Save tenancyId and region when Cloud Asset is added #7622

Merged

Conversation

petrovic-d
Copy link
Collaborator

With this changes, when a resource is added to the Cloud Assets window, information about the tenancy and region is saved.

@jhorvath jhorvath requested review from jhorvath and sdedic and removed request for jhorvath July 30, 2024 09:11
@jhorvath jhorvath added LSP [ci] enable Language Server Protocol tests VSCode Extension [ci] enable VSCode Extension tests enterprise [ci] enable enterprise job labels Jul 30, 2024
@apache apache locked and limited conversation to collaborators Jul 30, 2024
@apache apache unlocked this conversation Jul 30, 2024
@sdedic
Copy link
Member

sdedic commented Jul 31, 2024

I am still thinking about how to handle adding region+tenancy IDs in a way that does not obtrude every and all sources ... and still didn't come to anything, except including that into OCID, which I don't think is a terribly good idea either...

@petrovic-d petrovic-d force-pushed the add-tenency-id-and-region-to-cloud-assets branch 2 times, most recently from 4e7b3d6 to 76d4267 Compare August 2, 2024 06:57
@@ -162,12 +169,19 @@ public CompletableFuture<KnowledgeBaseItem> findKnowledgeBase(String knowledgeBa
.knowledgeBaseId(knowledgeBaseId).
build();

OCISessionInitiator session = OCIManager.getDefault().getActiveProfile();
String tenancyId = session.getTenancy().isPresent() ?
Copy link
Member

Choose a reason for hiding this comment

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

A weird idea: Why not pass OCISessionInitiator to individual OCIItem & subclasses ? This logic (tenancy not present -> tenancyid/null + regioncode) could be done at one place (OCIItem). OCIItem can still have an alternative 'raw' constructor with IDs - this would be useful for TenancyItem.

Could it work?

@sdedic sdedic added this to the NB24 milestone Aug 8, 2024
@petrovic-d petrovic-d force-pushed the add-tenency-id-and-region-to-cloud-assets branch from 76d4267 to e18df72 Compare September 16, 2024 15:54
@jhorvath jhorvath merged commit 0b56bd5 into apache:master Sep 16, 2024
32 checks passed
@jhorvath jhorvath deleted the add-tenency-id-and-region-to-cloud-assets branch September 16, 2024 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enterprise [ci] enable enterprise job LSP [ci] enable Language Server Protocol tests VSCode Extension [ci] enable VSCode Extension tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants