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

ZENKO-4905-check-patches-on-ci #2202

Open
wants to merge 4 commits into
base: development/2.11
Choose a base branch
from

Conversation

benzekrimaha
Copy link
Contributor

@benzekrimaha benzekrimaha commented Mar 13, 2025

Issue: ZENKO-4905

@bert-e
Copy link
Contributor

bert-e commented Mar 13, 2025

Hello benzekrimaha,

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.

@scality scality deleted a comment from bert-e Mar 13, 2025
@bert-e
Copy link
Contributor

bert-e commented Mar 13, 2025

Waiting for approval

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

  • the author

  • 2 peers

@benzekrimaha benzekrimaha force-pushed the improvement/ZENKO-4905-ci-patch-job branch 2 times, most recently from 7978d27 to 728074e Compare March 13, 2025 14:36
@benzekrimaha benzekrimaha changed the title wip ZENKO-4905-check-patches-on-ci Mar 13, 2025
@benzekrimaha benzekrimaha marked this pull request as ready for review March 13, 2025 14:37
Previously the path for all charts was concidered
as a single one ( not taking into concideration white
spaces) causing the make patch command to fail, thus
the intorduced loop to go through each chat path individually
Issue: ZENKO-4905
@benzekrimaha benzekrimaha force-pushed the improvement/ZENKO-4905-ci-patch-job branch from bd04824 to de06258 Compare March 18, 2025 14:32
@benzekrimaha benzekrimaha force-pushed the improvement/ZENKO-4905-ci-patch-job branch from 1c7ba72 to acebd94 Compare March 18, 2025 14:35
@@ -5,11 +5,10 @@ CHART_REPO:="https://charts.bitnami.com/bitnami"
CHART_MONGO_SHARDED_VERSION:="7.9.1"

PATCH_DIR:="${ROOT_DIR}/patches"
PATCH_FILES:="$(shell ls -d ${PATCH_DIR}/*)"

PATCH_FILES:=$(shell ls ${PATCH_DIR}/* | grep -v mongodb-sharded-add-configsvr-service-file.patch)
Copy link
Contributor

Choose a reason for hiding this comment

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

should not filter patches: if we need not to apply it, then we must actually remove it (git rm)...

Suggested change
PATCH_FILES:=$(shell ls ${PATCH_DIR}/* | grep -v mongodb-sharded-add-configsvr-service-file.patch)
PATCH_FILES:=$(shell ls ${PATCH_DIR}/*)

@benzekrimaha benzekrimaha force-pushed the improvement/ZENKO-4905-ci-patch-job branch 2 times, most recently from ac87420 to ada5dd2 Compare March 21, 2025 00:30
@@ -5,8 +5,7 @@ CHART_REPO:="https://charts.bitnami.com/bitnami"
CHART_MONGO_SHARDED_VERSION:="7.9.1"

PATCH_DIR:="${ROOT_DIR}/patches"
PATCH_FILES:="$(shell ls -d ${PATCH_DIR}/*)"

PATCH_FILES:=$(shell ls ${PATCH_DIR}/*)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Why this change?

run: make fetch-mongodb-sharded
working-directory: ./solution-base/mongodb
- name: remove configsrv file
run: rm -vf charts/mongodb-sharded/templates/config-server/config-server-service.yaml || echo "Failed to remove"
Copy link
Contributor

@francoisferrand francoisferrand Mar 21, 2025

Choose a reason for hiding this comment

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

why do we need to remove?
if this is needed, should be part of a patch...

(if helm does not does remove "external" files, then we may need remove the whole chart folder in make fetch-mongodb-sharded)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no the file isn't there when we fetch de mongo sharded , it has always been added manually , the chart creates it. That's why here I remove it otherwise i end up with an error saying that the file already exists ( I don't have the historic linked to this)

Copy link
Contributor

@francoisferrand francoisferrand Mar 21, 2025

Choose a reason for hiding this comment

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

that is an issue in the patch file,

--- /dev/null
+++ b/solution-base/mongodb/charts/mongodb-sharded/templates/config-server/config-server-service.yaml

and should be fixed by updating the patchfile, not the process.

Copy link
Contributor

@francoisferrand francoisferrand Mar 21, 2025

Choose a reason for hiding this comment

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

Just tested:

  • "updating" the charts does not actually remove files which were created... So upgrading "in-place" just overwrites the files, but leaves removed files in place...
  • the patches work when we simply delete the charts directory before fetching: however, this causes the git diff to fail as we added some files:
    supprimé :        charts/mongodb-sharded/charts/common/values.schema.json
    supprimé :        charts/mongodb-sharded/files/docker-entrypoint-initdb.d/create-app-user-sharded.sh
    supprimé :        charts/mongodb-sharded/files/docker-entrypoint-initdb.d/set-default-write-concern-majority-sharded.sh
    supprimé :        charts/mongodb-sharded/templates/initialization-configmap.yaml
    
  • Regarding config-server-service.yaml, this file is indeed not present in the chart: not related to patching, but I wonder why we added it (or kept it), and if we need it still...
  • clearing the folder before fetch is the way
  • need to update the patch files to "create" these removed files/links
  • need to review if we still need values.schema.json, initialization-configmap.yaml and config--server-service.yaml

@benzekrimaha benzekrimaha force-pushed the improvement/ZENKO-4905-ci-patch-job branch from c841d7c to 7ed8014 Compare March 21, 2025 11:02
@benzekrimaha
Copy link
Contributor Author

/approve

@benzekrimaha
Copy link
Contributor Author

/wait

@bert-e
Copy link
Contributor

bert-e commented Mar 21, 2025

Waiting for approval

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

  • the author

  • 2 peers

The following options are set: approve

@francoisferrand francoisferrand force-pushed the improvement/ZENKO-4905-ci-patch-job branch from 7ed8014 to 5c600e1 Compare March 21, 2025 18:56
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