Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feudalAdapterLDF
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
m-team
feudal
feudalAdapterLDF
Commits
94fa00ef
Commit
94fa00ef
authored
1 year ago
by
Marcus
Browse files
Options
Downloads
Patches
Plain Diff
shorten username in pooled mode to respect 32 char limit
parent
087726f6
No related branches found
No related tags found
No related merge requests found
Pipeline
#408436
failed
8 months ago
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ldf_adapter/name_generators.py
+6
-1
6 additions, 1 deletion
ldf_adapter/name_generators.py
with
6 additions
and
1 deletion
ldf_adapter/name_generators.py
+
6
−
1
View file @
94fa00ef
...
...
@@ -126,5 +126,10 @@ class PooledNameGenerator:
self
.
index
+=
1
if
self
.
index
>=
10
**
self
.
digits
:
return
None
candidate_name
=
f
"
{
self
.
username_prefix
}
%0
{
self
.
digits
}
d
"
%
self
.
index
candidate_name_no_digits
=
f
"
{
self
.
username_prefix
}
"
potential_length
=
len
(
candidate_name_no_digits
)
+
self
.
digits
if
potential_length
>
32
:
excess_chars
=
potential_length
-
32
candidate_name_no_digits
=
candidate_name_no_digits
[:
-
excess_chars
]
candidate_name
=
f
"
{
candidate_name_no_digits
}
%0
{
self
.
digits
}
d
"
%
self
.
index
return
candidate_name
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment