Skip to content

Move test resource setup from Python to Typescript#2438

Open
SylvainSenechal wants to merge 2 commits into
development/2.15from
improvement/ZENKO-5077
Open

Move test resource setup from Python to Typescript#2438
SylvainSenechal wants to merge 2 commits into
development/2.15from
improvement/ZENKO-5077

Conversation

@SylvainSenechal

Copy link
Copy Markdown
Contributor

Issue: ZENKO-5077

  • Moving the configuration of various resources needed for the tests (accounts, locations, buckets etc) from python to typescript. Integrating it directly with our existing functional tests library (no new javascript project).
    This change wasn't absolutely needed, but it was very cheap and easy to do with Claude, it goes toward aligning the codebase on a single programming language and a single typescript project, to ease future maintenance.
    It also open doors for later progressive refactoring of test configuration, as the code is now shared, cucumber/mocha test could directly call functions defined in this configuration folder
  • Bump functional test transitive dependencies to reduce dependabot noise

@bert-e

bert-e commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Hello sylvainsenechal,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request TBA
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

Comment thread tests/functional/testResourcesSetup/setup/buckets/ring.ts Outdated
@SylvainSenechal SylvainSenechal force-pushed the improvement/ZENKO-5077 branch from 36a43c8 to 352b2fb Compare June 12, 2026 17:10

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.

this one is completely removed, was not used

Comment thread tests/functional/testResourcesSetup/setup/locations.ts
@SylvainSenechal SylvainSenechal force-pushed the improvement/ZENKO-5077 branch 2 times, most recently from 9f459d7 to 593dbfd Compare June 12, 2026 17:20
@scality scality deleted a comment from bert-e Jun 12, 2026
@bert-e

bert-e commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

Comment thread tests/functional/testResourcesSetup/setup/locations.ts Outdated
Comment thread tests/functional/testResourcesSetup/config.ts Outdated
@SylvainSenechal SylvainSenechal force-pushed the improvement/ZENKO-5077 branch 2 times, most recently from 22104b7 to f69ac66 Compare June 12, 2026 18:55
Comment thread tests/functional/testResourcesSetup/config.ts Outdated
@SylvainSenechal SylvainSenechal force-pushed the improvement/ZENKO-5077 branch from f69ac66 to e635bbf Compare June 15, 2026 08:59
@SylvainSenechal SylvainSenechal marked this pull request as ready for review June 15, 2026 09:00
@SylvainSenechal SylvainSenechal requested review from a team, benzekrimaha and maeldonn June 15, 2026 09:00

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.

General thought : Not addressed in this pr, but wondering if some of these setup (no just this file, whole resources setup) could be done in simpler before hook from within the tests

I guess for some things like locations, it's not advisable because of reconciliation, or even not possible maybe for accounts that we wanna create before anything ?
But maybe for buckets creation its possible (not even sure as some/all of these buckets are the buckets of the locations)

Comment thread tests/functional/testResourcesSetup/setup/clients/k8s.ts Outdated
@SylvainSenechal SylvainSenechal force-pushed the improvement/ZENKO-5077 branch from e635bbf to c4ddaf7 Compare June 15, 2026 13:00

const versionedBucket = env.RING_S3C_INGESTION_SRC_BUCKET_NAME;
const nonVersionedBucket = env.RING_S3C_INGESTION_SRC_NON_VERSIONED_BUCKET_NAME;
const objectCount = env.RING_S3C_INGESTION_NON_VERSIONED_OBJECT_COUNT_PER_TYPE ?? 0;

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.

Behavioral regression: the Python original validated this env var was set (would throw on missing). It now silently defaults to 0, skipping pre-population entirely.


export function loadConfig(configFile: string): E2EConfig {
const content = fs.readFileSync(configFile, 'utf8');
return yaml.load(content) as E2EConfig;

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.

Behavioral regression: the Python original validated this config against a JSON schema. The as E2EConfig cast does no runtime validation, so a malformed resources.yaml crashes later with a cryptic undefined error.

@maeldonn maeldonn self-requested a review June 15, 2026 21:29

@maeldonn maeldonn left a comment

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.

Some regressions. Need to know if it's intentional or not.

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.

3 participants