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

feat: return the production enclave information if present via GetEnclaves API #1395

Merged
merged 7 commits into from Sep 26, 2023

Conversation

Peeeekay
Copy link
Contributor

This PR returns whether the enclave is running in production mode via GetEnclaves() api.

Sample Response for test enclave:
{
"enclaveUuid": "1a8396beea6a464d83ee27900eea012e",
"name": "vibrant-volcano",
"shortenedUuid": "1a8396beea6a",
"containersStatus": "EnclaveContainersStatus_RUNNING",
"apiContainerStatus": "EnclaveAPIContainerStatus_RUNNING",
...
}

Sample Response for prod enclave:
{
"enclaveUuid": "1a8396beea6a464d83ee27900eea012e",
"name": "vibrant-volcano",
"shortenedUuid": "1a8396beea6a",
"containersStatus": "EnclaveContainersStatus_RUNNING",
"apiContainerStatus": "EnclaveAPIContainerStatus_RUNNING",
"mode":"PRODUCTION"
}

@Peeeekay Peeeekay changed the title Pk/propagate prod flag feat: return the production enclave information if present via GetEnclaves API Sep 26, 2023
Copy link
Contributor

@leoporoli leoporoli left a comment

Choose a reason for hiding this comment

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

LGTM, the only suggestion that I have is that it could be implemented by storing the enclave production mode value in the Docker labels and retrieving it by getting the APIC container's labels as we do for the other enclave information, like ports, enclaveID, etc. In order to normalize how the enclave info is stored and retrieved.
But it can be refactored later if this feat needs to be released soon.

@Peeeekay
Copy link
Contributor Author

LGTM, the only suggestion that I have is that it could be implemented by storing the enclave production mode value in the Docker labels and retrieving it by getting the APIC container's labels as we do for the other enclave information, like ports, enclaveID, etc. In order to normalize how the enclave info is stored and retrieved. But it can be refactored later if this feat needs to be released soon.

Yes; make sense. I want to confirm with @victorcolombo about that as currently we store it as env variable and if it's ok to store it in label as well. I am not familiar if it cause some unintentional bugs.

@Peeeekay Peeeekay merged commit ef22820 into main Sep 26, 2023
30 checks passed
@Peeeekay Peeeekay deleted the pk/propagate_prod_flag branch September 26, 2023 19:04
tedim52 added a commit that referenced this pull request Sep 27, 2023
🤖 I have created a release *beep* *boop*
---


##
[0.83.10](0.83.9...0.83.10)
(2023-09-27)


### Features

* disable scrollbar, remove line highlighting, set background color
([#1408](#1408))
([1ffdf10](1ffdf10)),
closes [#1391](#1391)
* return the production enclave information if present via GetEnclaves
API ([#1395](#1395))
([ef22820](ef22820))


### Bug Fixes

* add scrollbar
([#1400](#1400))
([40aba1d](40aba1d)),
closes [#1390](#1390)
* bring back args
([#1397](#1397))
([3e1c318](3e1c318))
* text off center
([#1407](#1407))
([d845764](d845764)),
closes [#1406](#1406)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: kurtosisbot <kurtosisbot@users.noreply.github.com>
Co-authored-by: Tedi Mitiku <tedi.m52@gmail.com>
Co-authored-by: tedim52 <tedim52@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants