Repository navigation
Provide disposable ConfD Basic-auth credentials for ITDE fixtures - #682
Conversation
998d9f2 to
02d31a3
Compare
02d31a3 to
ff6d23f
Compare
ff6d23f to
d193171
Compare
d193171 to
7310e5b
Compare
7310e5b to
96ef520
Compare
762bf57 to
231973f
Compare
231973f to
7b51841
Compare
7b51841 to
0f84eb2
Compare
0f84eb2 to
53849c3
Compare
53849c3 to
7194589
Compare
7194589 to
857b0d7
Compare
- Added opt-in ConfD test-user provisioning with owner-only credential files, redacted connection metadata, bounded authenticated readiness checks, rollback, cleanup, CLI/API support, documentation, and integration coverage.
857b0d7 to
8b059cf
Compare
| assert database_info is not None | ||
| confd_credentials_task = self.create_confd_credentials_task(database_info) | ||
| if confd_credentials_task is not None: | ||
| confd_credentials_future = yield from self.run_dependencies( |
There was a problem hiding this comment.
Careful, you are using docker exec to run confd to create the user; it is not guaranteed that you have a docker DB in this place. Either move the subclass for Docker or use an executor that can use either SSH or Docker to run commands in COS.
| @@ -56,15 +57,20 @@ | |||
|
|
|||
|
|
|||
| def _cleanup(environment_info: EnvironmentInfo) -> None: | |||
There was a problem hiding this comment.
| @@ -53,15 +54,20 @@ | |||
|
|
|||
|
|
|||
| def _cleanup(environment_info: EnvironmentInfo) -> None: | |||
There was a problem hiding this comment.
…provide-confd-credentials
pj-spoelders
left a comment
There was a problem hiding this comment.
All clear from me! But perhaps someone else more acquainted with the ITDE and ConfD should have another look.
TK seems to have had some comments
- ConfD commands now run through DbOsExecFactory (Docker or SSH), not direct Docker exec. - Added environment support to executors and wired the selected executor into the ConfD task. - Added coverage for executor environment handling and task wiring.
| **(environment or {}), | ||
| } |
There was a problem hiding this comment.
You could alternatively
- declare the argument
environmentas not required:def _run_confd( ... environment: dict[str, str]) - declare your local default
local_defaults = { ... } - build the final env
environment = local_defaults | environment
…ly, and merge them with local_defaults | environment.
|
| if self.database_info.reused: | ||
| raise RuntimeError( | ||
| "Cannot create disposable ConfD credentials for a reused database" | ||
| ) |
There was a problem hiding this comment.
if the reused DB already has a confd user it would be possible; you can simply return its credentials
There was a problem hiding this comment.
Thank you, good point.
I will reuse the existing ConfdInfo and owner-only credentials file for a reused Docker-DB, without creating or changing the ConfD account.
This works while the reusable environment is retained with no_database_cleanup_after_success=True: the Docker-DB, its test data, the disposable ConfD user, and confd_credentials.json all remain available to the next run.
Currently, ITDE does not offer a separate documented mode to reset database test data while retaining the ConfD user.
Normal cleanup removes the entire Docker-DB, so no explicit ConfD-user deletion is necessary;
the account disappears with the database. If the credentials file is missing, ITDE cannot reconstruct its password and will fail clearly rather than alter the reused database.



Closes #678
All Submissions: