You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "jhorvath (via GitHub)" <gi...@apache.org> on 2024/10/11 11:21:07 UTC
[PR] Use OCI profile based on an item [netbeans]
jhorvath opened a new pull request, #7870:
URL: https://github.com/apache/netbeans/pull/7870
When an OCI operation is run, the active OCI profile is used to interact with OCI resources. If the active profile is switched, operations on resources or items that were previously loaded using the old profile may stop working or behave unexpectedly, since they rely on the context of the original active profile.
Changed the implementation so that the profile used for running operations is selected based on the item's tenancy ID and region code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Use OCI profile based on an item [netbeans]
Posted by "jhorvath (via GitHub)" <gi...@apache.org>.
jhorvath merged PR #7870:
URL: https://github.com/apache/netbeans/pull/7870
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] Use OCI profile based on an item [netbeans]
Posted by "sdedic (via GitHub)" <gi...@apache.org>.
sdedic commented on code in PR #7870:
URL: https://github.com/apache/netbeans/pull/7870#discussion_r1798969976
##########
enterprise/cloud.oracle/src/org/netbeans/modules/cloud/oracle/actions/CreateContainerRepositoryCommand.java:
##########
@@ -34,19 +35,19 @@ public class CreateContainerRepositoryCommand extends CreateResourceCommand<Cont
@Override
ContainerRepositoryItem callCreate(OCIItemCreationDetails itemCreator) {
- ArtifactsClient client = this.getProfile().newClient(ArtifactsClient.class);
+ ArtifactsClient client = OCIManager.getDefault().getActiveProfile(itemCreator.getCompartment()).newClient(ArtifactsClient.class);
CreateContainerRepositoryRequest request = (CreateContainerRepositoryRequest) itemCreator.getRequest();
CreateContainerRepositoryResponse response = client.createContainerRepository(request);
ContainerRepository res = response.getContainerRepository();
- String tenancyId = this.getProfile().getTenancy().isPresent() ? this.getProfile().getTenancy().get().getKey().getValue() : null;
+ String tenancyId = itemCreator.getCompartment().getRegionCode();
Review Comment:
Seems as a miscompleted change ? If the `regionCode` is the correct value, pls. rename the local variable, so it is obvious that it is not an OCID.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists