Skip to content

Commit

Permalink
Constants should use upper case letters
Browse files Browse the repository at this point in the history
github_status_builders -> GITHUB_STATUS_BUILDERS
  • Loading branch information
cvicentiu committed Nov 26, 2024
1 parent 4325ee5 commit 66f3826
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
]

# Defines what builders report status to GitHub
github_status_builders = [
GITHUB_STATUS_BUILDERS = [
"aarch64-macos-compile-only",
"amd64-debian-12",
"amd64-debian-12-debug-embedded",
Expand Down
2 changes: 1 addition & 1 deletion locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def getLocks(props):
assert builder_name is not None

if (
builder_name in github_status_builders
builder_name in GITHUB_STATUS_BUILDERS
or builder_name in builders_install
or builder_name in builders_upgrade
):
Expand Down
2 changes: 1 addition & 1 deletion master-bintars/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ gs = reporters.GitHubStatusPush(
startDescription="Build started.",
endDescription="Build done.",
verbose=True,
builders=github_status_builders,
builders=GITHUB_STATUS_BUILDERS,
)
c["services"].append(gs)
c['secretsProviders'] = [secrets.SecretInAFile(dirname=os.getenv("MASTER_CREDENTIALS_DIR", default="/srv/buildbot/master/master-credential-provider"))]
Expand Down
2 changes: 1 addition & 1 deletion master-docker-nonstandard-2/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ gs = reporters.GitHubStatusPush(
startDescription="Build started.",
endDescription="Build done.",
verbose=True,
builders=github_status_builders,
builders=GITHUB_STATUS_BUILDERS,
)
c["services"].append(gs)
c['secretsProviders'] = [secrets.SecretInAFile(dirname=os.getenv("MASTER_CREDENTIALS_DIR", default="/srv/buildbot/master/master-credential-provider"))]
Expand Down
2 changes: 1 addition & 1 deletion master-docker-nonstandard/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ gs = reporters.GitHubStatusPush(
startDescription="Build started.",
endDescription="Build done.",
verbose=True,
builders=github_status_builders,
builders=GITHUB_STATUS_BUILDERS,
)
c["services"].append(gs)
c['secretsProviders'] = [secrets.SecretInAFile(dirname=os.getenv("MASTER_CREDENTIALS_DIR", default="/srv/buildbot/master/master-credential-provider"))]
Expand Down
2 changes: 1 addition & 1 deletion master-nonlatent/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ gs = reporters.GitHubStatusPush(
startDescription="Build started.",
endDescription="Build done.",
verbose=True,
builders=github_status_builders,
builders=GITHUB_STATUS_BUILDERS,
)
c["services"].append(gs)
c['secretsProviders'] = [secrets.SecretInAFile(dirname=os.getenv("MASTER_CREDENTIALS_DIR", default="/srv/buildbot/master/master-credential-provider"))]
Expand Down
2 changes: 1 addition & 1 deletion master-protected-branches/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ gs = reporters.GitHubStatusPush(
startDescription="Build started.",
endDescription="Build done.",
verbose=True,
builders=github_status_builders,
builders=GITHUB_STATUS_BUILDERS,
)
c["services"].append(gs)
c['secretsProviders'] = [secrets.SecretInAFile(dirname=os.getenv("MASTER_CREDENTIALS_DIR", default="/srv/buildbot/master/master-credential-provider"))]
Expand Down
4 changes: 2 additions & 2 deletions master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ gs = reporters.GitHubStatusPush(
startDescription="Build started.",
endDescription="Build done.",
verbose=True,
builders=github_status_builders,
builders=GITHUB_STATUS_BUILDERS,
)
c["services"].append(gs)
c['secretsProviders'] = [secrets.SecretInAFile(dirname="/srv/buildbot/master/master-credential-provider")]
Expand Down Expand Up @@ -298,7 +298,7 @@ for builder in master_config["builders"]:
build_type = os_info[os_name]["type"]

# Add builder only if it's not a protected branches one
if builder not in github_status_builders:
if builder not in GITHUB_STATUS_BUILDERS:
tags = [os_name]
if arch == "s390x" and builder in builders_galera_mtr:
tags += ["experimental"]
Expand Down
6 changes: 3 additions & 3 deletions schedulers_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
builders_install,
builders_upgrade,
builders_wordpress,
github_status_builders,
GITHUB_STATUS_BUILDERS,
supportedPlatforms,
)

Expand All @@ -18,7 +18,7 @@ def getBranchBuilderNames(props):
mBranch = props.getProperty("master_branch")

builders = list(
filter(lambda x: x not in github_status_builders, supportedPlatforms[mBranch])
filter(lambda x: x not in GITHUB_STATUS_BUILDERS, supportedPlatforms[mBranch])
)

return builders
Expand All @@ -29,7 +29,7 @@ def getProtectedBuilderNames(props):
mBranch = props.getProperty("master_branch")

builders = list(
filter(lambda x: x in supportedPlatforms[mBranch], github_status_builders)
filter(lambda x: x in supportedPlatforms[mBranch], GITHUB_STATUS_BUILDERS)
)

return builders
Expand Down

0 comments on commit 66f3826

Please sign in to comment.