-
Notifications
You must be signed in to change notification settings - Fork 72
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
Do not fetch git username and email if the gitconfig configmap contains the data #777
Conversation
...se/che/workspace/infrastructure/kubernetes/namespace/configurator/GitconfigConfigurator.java
Outdated
Show resolved
Hide resolved
if (usernameAndEmailFromGitconfigOptional.isEmpty()) { | ||
Optional<Pair<String, String>> usernameAndEmailFromFetcher = | ||
getUsernameAndEmailFromFetcher(namespaceName); | ||
if (usernameAndEmailFromFetcher.isPresent()) { | ||
ConfigMap gitconfigConfigmap = buildGitconfigConfigmap(); | ||
Optional<String> gitconfigSectionsOptional = | ||
generateGitconfigSections(gitconfigOptional, usernameAndEmailFromFetcher); | ||
gitconfigConfigmap.setData( | ||
ImmutableMap.of(CONFIGMAP_DATA_KEY, gitconfigSectionsOptional.orElse(""))); | ||
client.configMaps().inNamespace(namespaceName).createOrReplace(gitconfigConfigmap); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we extract it to a separate method and add clear javadoc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added javadocs to each step.
… contains the data
/retest |
@vinokurig: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Verified on Eclipse Che with |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: artaleks9, ibuziuk, tolusha, vinokurig The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Build 3.20 :: server_3.x/387: Console, Changes, Git Data |
…ns the data (#777) Check the workspace-userdata-gitconfig-configmap configmap if it contains gitconfig with username and email and the data is not empty. Only then, try to fetch username and email from a git provider.
…ns the data (#777) Check the workspace-userdata-gitconfig-configmap configmap if it contains gitconfig with username and email and the data is not empty. Only then, try to fetch username and email from a git provider.
Build 3.20 :: sync-to-downstream_3.x/8853: Console, Changes, Git Data |
Build 3.20 :: push-latest-container-to-quay_3.x/5106: Console, Changes, Git Data |
Build 3.20 :: get-sources-rhpkg-container-build_3.x/8972: server : 3.x :: Build 66900338 : quay.io/devspaces/server-rhel9:3.20-5 |
Build 3.20 :: server_3.x/387: Upstream sync done; /DS_CI/sync-to-downstream_3.x/8853 triggered |
…ns the data (#777) Check the workspace-userdata-gitconfig-configmap configmap if it contains gitconfig with username and email and the data is not empty. Only then, try to fetch username and email from a git provider.
Build 3.20 :: update-digests_3.x/8732: Console, Changes, Git Data |
Build 3.20 :: operator-bundle_3.x/4506: Console, Changes, Git Data |
Build 3.20 :: sync-to-downstream_3.x/8856: Console, Changes, Git Data |
Build 3.20 :: get-sources-rhpkg-container-build_3.x/8975: devspaces-operator-bundle : 3.x :: Failed in 66901388 : BREW:BUILD/STATUS:UNKNOWN |
What does this PR do?
Check the
workspace-userdata-gitconfig-configmap
configmap if it contains gitconfig with username and email and the data is not empty. Only then, try to fetch username and email from a git provider.Screenshot/screencast of this PR
What issues does this PR fix or reference?
fixes eclipse-che/che#23376
How to test this PR?
N/A
PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedRelease Notes
Reviewers
Reviewers, please comment how you tested the PR when approving it.