Skip to content

Commit a131950

Browse files
committed
Address pre-commit errors
The errors being addressed are "new" due to updated configuration. (I think? It's not entirely clear to me what's up with the typos.)
1 parent 4de2657 commit a131950

File tree

13 files changed

+28
-30
lines changed

13 files changed

+28
-30
lines changed

config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1749,7 +1749,7 @@ func InitServer(ctx context.Context, currentServers server_structs.ServerType) e
17491749
if !param.Server_EnableUI.GetBool() {
17501750
return errors.Errorf("%s must be true when %s is set to globus", param.Server_EnableUI.GetName(), param.Origin_StorageType.GetName())
17511751
}
1752-
pvd, err := GetOIDCProdiver()
1752+
pvd, err := GetOIDCProvider()
17531753
if err != nil || pvd != Globus {
17541754
log.Info("Server OIDC provider is not Globus. Use Origin.GlobusClientIDFile instead")
17551755
} else {

config/oidc_metadata.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func getMetadataValue(stringParam param.StringParam) (result string, err error)
108108
if param.OIDC_Issuer.IsSet() {
109109
issuerUrl, _ := url.Parse(param.OIDC_Issuer.GetString())
110110
if issuerUrl != nil && issuerUrl.Hostname() == "auth.globus.org" && stringParam.GetName() == param.OIDC_DeviceAuthEndpoint.GetName() {
111-
log.Warning("You are using Globus as the auth privider. Although it does not support OAuth device flow used by Pelican registry, you may use it for other Pelican servers. OIDC.DeviceAuthEndpoint is set to https://auth.globus.org/")
111+
log.Warning("You are using Globus as the auth provider. Although it does not support OAuth device flow used by Pelican registry, you may use it for other Pelican servers. OIDC.DeviceAuthEndpoint is set to https://auth.globus.org/")
112112
result = "https://auth.globus.org/"
113113
return
114114
}
@@ -130,7 +130,7 @@ func getMetadataValue(stringParam param.StringParam) (result string, err error)
130130
}
131131

132132
// Get from the config parameters the OIDC provider
133-
func GetOIDCProdiver() (pvd OIDCProvider, err error) {
133+
func GetOIDCProvider() (pvd OIDCProvider, err error) {
134134
authURLStr := param.OIDC_AuthorizationEndpoint.GetString()
135135
if authURLStr == "" {
136136
authURLStr = param.OIDC_Issuer.GetString()

config/oidc_metadata_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func TestGetOIDCProvider(t *testing.T) {
3434
})
3535
t.Run("empty-endpoints-gives-error", func(t *testing.T) {
3636
ResetConfig()
37-
get, err := GetOIDCProdiver()
37+
get, err := GetOIDCProvider()
3838
require.Error(t, err)
3939
assert.Contains(t, err.Error(), "nothing set for config parameter OIDC.IssuerUrl or OIDC.AuthorizationEndpoint")
4040
assert.Empty(t, get)
@@ -43,45 +43,45 @@ func TestGetOIDCProvider(t *testing.T) {
4343
t.Run("auth-endpoint-gives-correct-result", func(t *testing.T) {
4444
ResetConfig()
4545
require.NoError(t, param.Set(param.OIDC_AuthorizationEndpoint.GetName(), "https://example.com/authorization"))
46-
get, err := GetOIDCProdiver()
46+
get, err := GetOIDCProvider()
4747
require.NoError(t, err)
4848
assert.Equal(t, UnknownProvider, get)
4949

5050
// CILogon
5151
require.NoError(t, param.Set(param.OIDC_AuthorizationEndpoint.GetName(), "https://cilogon.org/api/v1.0/authorization"))
52-
get, err = GetOIDCProdiver()
52+
get, err = GetOIDCProvider()
5353
require.NoError(t, err)
5454
assert.Equal(t, CILogon, get)
5555

5656
// Globus
5757
require.NoError(t, param.Set(param.OIDC_AuthorizationEndpoint.GetName(), "https://auth.globus.org/api/v1.0/authorization"))
58-
get, err = GetOIDCProdiver()
58+
get, err = GetOIDCProvider()
5959
require.NoError(t, err)
6060
assert.Equal(t, Globus, get)
6161
})
6262

6363
t.Run("issuer-endpoint-gives-correct-result", func(t *testing.T) {
6464
ResetConfig()
6565
require.NoError(t, param.Set(param.OIDC_Issuer.GetName(), "https://example.com"))
66-
get, err := GetOIDCProdiver()
66+
get, err := GetOIDCProvider()
6767
require.NoError(t, err)
6868
assert.Equal(t, UnknownProvider, get)
6969

7070
// CILogon
7171
require.NoError(t, param.Set(param.OIDC_AuthorizationEndpoint.GetName(), "https://cilogon.org"))
72-
get, err = GetOIDCProdiver()
72+
get, err = GetOIDCProvider()
7373
require.NoError(t, err)
7474
assert.Equal(t, CILogon, get)
7575

7676
// CILogon no protocol
7777
require.NoError(t, param.Set(param.OIDC_AuthorizationEndpoint.GetName(), "cilogon.org"))
78-
get, err = GetOIDCProdiver()
78+
get, err = GetOIDCProvider()
7979
require.NoError(t, err)
8080
assert.Equal(t, CILogon, get)
8181

8282
// Globus no protocol
8383
require.NoError(t, param.Set(param.OIDC_AuthorizationEndpoint.GetName(), "auth.globus.org"))
84-
get, err = GetOIDCProdiver()
84+
get, err = GetOIDCProvider()
8585
require.NoError(t, err)
8686
assert.Equal(t, Globus, get)
8787
})

docs/app/getting-help/faqs/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ and we frequently refer to said components as "Pelican _____" in our documentati
2020

2121
### How is the Pelican Platform related to the HTCondor Software Suite (HTCSS)?
2222

23-
Both the Pelican Platform and [HTCSS](https://htcondor.org/) are open-source software techonologies whose development is led by the [Center for High Throughput Computing (CHTC)](https://chtc.cs.wisc.edu) at the University of Wisconsin-Madison,
23+
Both the Pelican Platform and [HTCSS](https://htcondor.org/) are open-source software technologies whose development is led by the [Center for High Throughput Computing (CHTC)](https://chtc.cs.wisc.edu) at the University of Wisconsin-Madison,
2424
whose mission is "to bring the power of High Throughput Computing to all fields of research, and to allow the future of HTC to be shaped by insight from all fields."
2525
While the funding for developing these technologies comes from different sources, there is a lot of overlap of the staff that are involved in the development of these technologies.
2626

metrics/xrootd_metrics.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ var (
468468
}, []string{"path", "ap", "dn", "role", "org", "proj", "network"})
469469

470470
TransferReadvSegsTotal = promauto.NewCounterVec(prometheus.CounterOpts{
471-
Name: "xrootd_transfer_readv_segments_toal",
471+
Name: "xrootd_transfer_readv_segments_total",
472472
Help: "Number of segments in readv operations",
473473
}, []string{"path", "ap", "dn", "role", "org", "proj", "network"})
474474

@@ -866,7 +866,7 @@ var (
866866
Buckets: TimeHistogramBuckets,
867867
})
868868

869-
CPUUtilzation = promauto.NewGauge(prometheus.GaugeOpts{
869+
CPUUtilization = promauto.NewGauge(prometheus.GaugeOpts{
870870
Name: "xrootd_cpu_utilization",
871871
Help: "CPU utilization of the XRootD server",
872872
})
@@ -1964,8 +1964,8 @@ func HandleSummaryPacket(packet []byte) error {
19641964

19651965
if wallDelta > 0 {
19661966
// represents the average of cores utilized during the interval
1967-
utlizationRatio := cpuDelta / wallDelta
1968-
CPUUtilzation.Set(utlizationRatio)
1967+
utilizationRatio := cpuDelta / wallDelta
1968+
CPUUtilization.Set(utilizationRatio)
19691969
}
19701970
}
19711971

registry/registry_db_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func mockNamespace(prefix, pubkey, identity string, adminMetadata server_structs
158158
}
159159

160160
// Some genertic mock data function to be shared with other test
161-
// functinos in this package. Please treat them as "constants"
161+
// functions in this package. Please treat them as "constants"
162162
var (
163163
mockNssWithNamespaces []server_structs.Registration = []server_structs.Registration{
164164
mockNamespace("/test1", "pubkey1", "", server_structs.AdminMetadata{Status: server_structs.RegApproved}),

registry/registry_validation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ func validateInstitution(instID string) (bool, error) {
202202
} else {
203203
insts, err := getCachedOptions(instUrl, instUrlTTL)
204204
if err != nil {
205-
return false, errors.Wrap(err, "Error fetching instituions from TTL cache")
205+
return false, errors.Wrap(err, "Error fetching institutions from TTL cache")
206206
}
207207
for _, availableInst := range insts {
208208
// We required full equality, as we expect the value is from the institution API

server_structs/director.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ func (ad *ServerBaseAd) Initialize(name string) {
555555
ad.StartTime = startTime
556556
ad.GenerationID = generationID.Add(1) + 1
557557
adLifetime := param.Server_AdLifetime.GetDuration()
558-
// Not all unit tests initializae the config, meaning adLifetime
558+
// Not all unit tests initialize the config, meaning adLifetime
559559
// may be 0.
560560
if adLifetime == 0 {
561561
adLifetime = 15 * time.Minute

swagger/pelican-swagger.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ definitions:
275275
type: string
276276
description:
277277
The public JWK from the origin that wants to register the namespace.
278-
It should be a marshaled (stringfied) JSON that contains either one JWK or a JWKS
278+
It should be a marshaled (stringified) JSON that contains either one JWK or a JWKS
279279
admin_metadata:
280280
$ref: "#/definitions/AdminMetadata"
281281
custom_fields:
@@ -359,7 +359,7 @@ definitions:
359359
type: string
360360
description:
361361
The public JWK from the origin that wants to register the namespace.
362-
It should be a marshaled (stringfied) JSON that contains either one JWK or a JWKS
362+
It should be a marshaled (stringified) JSON that contains either one JWK or a JWKS
363363
admin_metadata:
364364
$ref: "#/definitions/AdminMetadataForRegistration"
365365
custom_fields:

web_ui/frontend/dev/image/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@ RUN apt-get update && apt-get install -y cron
1010

1111
# Update the entrypoint
1212
COPY ./entrypoint.sh /opt/bin/entrypoint.sh
13-
RUN chmod +x /opt/bin/entrypoint.sh
1413
ENTRYPOINT ["/opt/bin/entrypoint.sh"]
1514

1615
# Copy the NGINX configuration file
1716
COPY ./nginx.conf /etc/nginx/templates/nginx.conf.template
1817

1918
# Copy the login script
2019
COPY ./login.sh /opt/bin/login.sh
21-
RUN chmod +x /opt/bin/login.sh
2220

2321
# Copy the crontab file and set up cron job
2422
COPY ./crontab /etc/cron.d/login_cron

0 commit comments

Comments
 (0)