Skip to content

Commit a66bf44

Browse files
committed
Updated README
1 parent 41bd5f5 commit a66bf44

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ named arguments:
142142
Only update image tag store. Skip creating PRs
143143
-x X comment snippet mentioned in line just before FROM instruction for ignoring a child image. Defaults to 'no-dfiu'
144144
-r, --rate-limit-pr-creations
145-
Enable rateLimiting for throttling the number of PRs DFIU will cut over a period of time.
146-
Defaults is not set, means no ratelimiting is imposed if this is not set to true
145+
Enable rateLimiting for throttling the number of PRs DFIU will cut over a period of time.
146+
The argument value should be in format "<positive_integer>-<ISO-8601_formatted_time>". For example "--rate-limit-pr-creations 60-PT1H" to create 60 PRs per hour.
147+
Default is not set, this means no ratelimiting is imposed.
147148
148149
subcommands:
149150
Specify which feature to perform

dockerfile-image-update/src/main/java/com/salesforce/dockerfileimageupdate/utils/DockerfileGitHubUtil.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,8 @@ public void createPullReq(GHRepository origRepo,
363363
RateLimiter rateLimiter) throws InterruptedException, IOException {
364364
// TODO: This may loop forever in the event of constant -1 pullRequestExitCodes...
365365
while (true) {
366+
// TODO: accept rateLimiter Optional with option to get no-op rateLimiter
367+
// where it's not required.
366368
if(rateLimiter != null) {
367369
log.info("Trying to consume a token before creating pull request..");
368370
// Consume a token from the token bucket.

dockerfile-image-update/src/test/java/com/salesforce/dockerfileimageupdate/subcommands/impl/AllTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public void testAllCommandSuccessful() throws Exception {
3636
Map<String, Object> nsMap = ImmutableMap.of(Constants.IMG,
3737
"image", Constants.TAG,
3838
"tag", Constants.STORE,
39-
"store", RATE_LIMIT_PR_CREATION, "500-per-60s");
39+
"store");
4040

4141
Namespace ns = new Namespace(nsMap);
4242
RateLimiter rateLimiter = spy(new RateLimiter());
@@ -85,7 +85,7 @@ public void testAllCommandSkipsSendingPRsIfSearchReturnsEmpty() throws Exception
8585
Map<String, Object> nsMap = ImmutableMap.of(Constants.IMG,
8686
"image", Constants.TAG,
8787
"tag", Constants.STORE,
88-
"store", RATE_LIMIT_PR_CREATION, "500-per-60s");
88+
"store");
8989

9090
Namespace ns = new Namespace(nsMap);
9191
All all = spy(new All());

dockerfile-image-update/src/test/java/com/salesforce/dockerfileimageupdate/subcommands/impl/ChildTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,12 @@ public Object[][] inputMap() {
3535
GIT_REPO, "test",
3636
IMG, "test",
3737
FORCE_TAG, "test",
38-
STORE, "test",
39-
RATE_LIMIT_PR_CREATION, "500-per-60s")},
38+
STORE, "test")},
4039
{ImmutableMap.of(
4140
GIT_REPO, "test",
4241
IMG, "test",
4342
FORCE_TAG, "test",
44-
STORE, "test",
45-
RATE_LIMIT_PR_CREATION, "500-per-60s")},
43+
STORE, "test")},
4644
};
4745
}
4846

dockerfile-image-update/src/test/java/com/salesforce/dockerfileimageupdate/subcommands/impl/ParentTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public void testParentCommandSuccessfulForS3ImageStore() throws Exception {
125125
"image", Constants.TAG,
126126
"tag", Constants.STORE,
127127
"s3://store", Constants.SKIP_PR_CREATION,
128-
false, RATE_LIMIT_PR_CREATION, "500-per-60s");
128+
false);
129129
Namespace ns = new Namespace(nsMap);
130130
Parent parent = spy(new Parent());
131131
DockerfileGitHubUtil dockerfileGitHubUtil = mock(DockerfileGitHubUtil.class);

0 commit comments

Comments
 (0)