Skip to content

Provide disposable ConfD Basic-auth credentials for ITDE fixtures - #682

Merged
skyglass merged 5 commits into
mainfrom
skyglass/feature/678-provide-confd-credentials
Sep 23, 2026
Merged

skyglass merged 5 commits into
mainfrom
skyglass/feature/678-provide-confd-credentials

Conversation

@skyglass

Copy link
Copy Markdown
Contributor

Closes #678

  • 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.

All Submissions:

  • Is the title of the Pull Request correct?
  • Is the title of the corresponding issue correct?
  • Have you updated the changelog?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Are you mentioning the issue which this PullRequest fixes ("Fixes...")
  • Are the CLI usage examples up to date?

@skyglass
skyglass enabled auto-merge (squash) September 22, 2026 14:02
@skyglass
skyglass force-pushed the skyglass/feature/678-provide-confd-credentials branch from 998d9f2 to 02d31a3 Compare September 22, 2026 18:44
@skyglass
skyglass force-pushed the skyglass/feature/678-provide-confd-credentials branch from 02d31a3 to ff6d23f Compare September 22, 2026 18:54
@skyglass
skyglass force-pushed the skyglass/feature/678-provide-confd-credentials branch from ff6d23f to d193171 Compare September 22, 2026 19:10
@skyglass
skyglass force-pushed the skyglass/feature/678-provide-confd-credentials branch from d193171 to 7310e5b Compare September 22, 2026 19:12
@skyglass
skyglass force-pushed the skyglass/feature/678-provide-confd-credentials branch from 7310e5b to 96ef520 Compare September 22, 2026 19:32
@skyglass
skyglass force-pushed the skyglass/feature/678-provide-confd-credentials branch from 762bf57 to 231973f Compare September 22, 2026 19:59
@skyglass
skyglass force-pushed the skyglass/feature/678-provide-confd-credentials branch from 231973f to 7b51841 Compare September 22, 2026 20:43
@skyglass
skyglass force-pushed the skyglass/feature/678-provide-confd-credentials branch from 7b51841 to 0f84eb2 Compare September 22, 2026 20:54
@skyglass
skyglass force-pushed the skyglass/feature/678-provide-confd-credentials branch from 0f84eb2 to 53849c3 Compare September 22, 2026 21:09
@skyglass
skyglass force-pushed the skyglass/feature/678-provide-confd-credentials branch from 53849c3 to 7194589 Compare September 22, 2026 21:25
@skyglass
skyglass force-pushed the skyglass/feature/678-provide-confd-credentials branch from 7194589 to 857b0d7 Compare September 22, 2026 21:42
- 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.
@skyglass
skyglass force-pushed the skyglass/feature/678-provide-confd-credentials branch from 857b0d7 to 8b059cf Compare September 22, 2026 21:47
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(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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:

@tkilias tkilias Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@@ -53,15 +54,20 @@


def _cleanup(environment_info: EnvironmentInfo) -> None:

@tkilias tkilias Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

pj-spoelders
pj-spoelders previously approved these changes Sep 23, 2026

@pj-spoelders pj-spoelders left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All clear from me! But perhaps someone else more acquainted with the ITDE and ConfD should have another look.

@pj-spoelders
pj-spoelders dismissed their stale review September 23, 2026 08:45

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.
Comment on lines +156 to +157
**(environment or {}),
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You could alternatively

  • declare the argument environment as 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.
@sonarqubecloud

Copy link
Copy Markdown

@skyglass
skyglass merged commit b84a3c2 into main Sep 23, 2026
422 checks passed
@skyglass
skyglass deleted the skyglass/feature/678-provide-confd-credentials branch September 23, 2026 13:28
Comment on lines +45 to +48
if self.database_info.reused:
raise RuntimeError(
"Cannot create disposable ConfD credentials for a reused database"
)

@tkilias tkilias Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if the reused DB already has a confd user it would be possible; you can simply return its credentials

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

This branch was previously deployed

1 inactive deployment
manual-approval — 9a17b5ea Deployed Sep 23, 2026 by skyglass via Merge Gate / Approve Running Slow Tests? #823
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.

Provide documented ConfD credentials for disposable ITDE environments

4 participants