Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Commits listed here are skipped by git blame. GitHub reads this file
# automatically; locally, run once:
# git config blame.ignoreRevsFile .git-blame-ignore-revs

# CLDSRV-1002: whole-repo Prettier reformat, no behaviour change
cad223258128a7e811befe9fef826efb6b97c476
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
monitoring/dashboard.json linguist-generated=true
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ the **[Zenko Forum](http://forum.zenko.io/)**.
> Questions opened as GitHub issues will systematically be closed, and moved to
> the [Zenko Forum](http://forum.zenko.io/).

--------------------------------------------------------------------------------
---

## Avoiding duplicates

Expand All @@ -21,7 +21,7 @@ any duplicates already open:
- if there is a duplicate, please do not open your issue, and add a comment
to the existing issue instead.

--------------------------------------------------------------------------------
---

## Bug report information

Expand Down Expand Up @@ -52,7 +52,7 @@ Describe the results you expected
- distribution/OS,
- optional: anything else you deem helpful to us.

--------------------------------------------------------------------------------
---

## Feature Request

Expand All @@ -78,10 +78,10 @@ Please provide use cases for changing the current behavior
### Additional information

- Is this request for your company? Y/N
- If Y: Company name:
- Are you using any Scality Enterprise Edition products (RING, Zenko EE)? Y/N
- If Y: Company name:
- Are you using any Scality Enterprise Edition products (RING, Zenko EE)? Y/N
- Are you willing to contribute this feature yourself?
- Position/Title:
- How did you hear about us?

--------------------------------------------------------------------------------
---
2 changes: 1 addition & 1 deletion .github/actions/cleanup-and-coverage/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ runs:
env:
INPUT_PROFILES: ${{ inputs.profiles }}
working-directory: .github/docker

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/codeql/qlpack.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: scality/cloudserver-async-migration

Check warning on line 1 in .github/codeql/qlpack.yml

View workflow job for this annotation

GitHub Actions / lint

1:1 [document-start] missing document start "---"
version: 0.0.1
dependencies:
codeql/javascript-all: "*"
codeql/javascript-all: '*'
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2

Check warning on line 1 in .github/dependabot.yml

View workflow job for this annotation

GitHub Actions / lint

1:1 [document-start] missing document start "---"
updates:
- package-ecosystem: docker-compose
directory: /.github/docker
Expand All @@ -6,7 +6,7 @@
interval: weekly
open-pull-requests-limit: 5
ignore:
- dependency-name: "scality/vault"
update-types: ["version-update:semver-major"]
- dependency-name: "scality/metadata"
update-types: ["version-update:semver-major"]
- dependency-name: 'scality/vault'
update-types: ['version-update:semver-major']
- dependency-name: 'scality/metadata'
update-types: ['version-update:semver-major']
16 changes: 4 additions & 12 deletions .github/docker/config.s3c.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,17 @@
"dumpLevel": "error"
},
"replicationEndpoints": [
{"site": "zenko", "servers": ["127.0.0.1:9080"], "echo": false, "default": true},
{"site": "us-east-2", "servers": ["127.0.0.1:9080"]}
{ "site": "zenko", "servers": ["127.0.0.1:9080"], "echo": false, "default": true },
{ "site": "us-east-2", "servers": ["127.0.0.1:9080"] }
],
"requests": {
"extractClientIPFromHeader": "x-forwarded-for",
"extractProtocolFromHeader": "x-forwarded-proto",
"trustedProxyCIDRs": [
"127.0.0.1/32",
"::ffff:127.0.0.1/128",
"127.0.0.1"
],
"trustedProxyCIDRs": ["127.0.0.1/32", "::ffff:127.0.0.1/128", "127.0.0.1"],
"viaProxy": true
},
"multiObjectDeleteEnableOptimizations": false,
"supportedLifecycleRules": [
"Expiration",
"NoncurrentVersionExpiration",
"AbortIncompleteMultipartUpload"
],
"supportedLifecycleRules": ["Expiration", "NoncurrentVersionExpiration", "AbortIncompleteMultipartUpload"],
Comment thread
DarkIsDude marked this conversation as resolved.
"bucketNotificationDestinations": [
{
"resource": "target1",
Expand Down
2 changes: 1 addition & 1 deletion .github/docker/docker-compose.sse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
# root because S3C images needs ownership permission on files and mounted paths
user: root
command: sh -c "chmod 400 tests/utils/keyfile && yarn start > /artifacts/vault.log 2> /artifacts/vault-stderr.log"
network_mode: "host"
network_mode: 'host'
volumes:
- /tmp/artifacts/${JOB_NAME}:/artifacts
- ./vault-config.json:/conf/config.json:ro
Expand Down
22 changes: 11 additions & 11 deletions .github/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
cloudserver:
image: ${CLOUDSERVER_IMAGE}
network_mode: 'host'
network_mode: host
volumes:
- /tmp/ssl:/ssl
- /tmp/ssl-kmip:/tmp/ssl-kmip
Expand Down Expand Up @@ -57,13 +57,13 @@ services:
depends_on:
- redis
extra_hosts:
- 'bucketwebsitetester.s3-website-us-east-1.amazonaws.com:127.0.0.1'
- 'pykmip.local:127.0.0.1'
- bucketwebsitetester.s3-website-us-east-1.amazonaws.com:127.0.0.1
- pykmip.local:127.0.0.1
redis:
image: redis:alpine
network_mode: 'host'
network_mode: host
squid:
network_mode: 'host'
network_mode: host
profiles: ['ci-proxy']
image: scality/ci-squid
command: >-
Expand All @@ -77,7 +77,7 @@ services:
volumes:
- /tmp/ssl:/ssl
pykmip:
network_mode: 'host'
network_mode: host
profiles: ['pykmip']
image: ${PYKMIP_IMAGE:-ghcr.io/scality/cloudserver/pykmip}
volumes:
Expand All @@ -87,17 +87,17 @@ services:
- ../pykmip/policy.json:/etc/pykmip/policies/policy.json
- ../pykmip/server.conf:/etc/pykmip/server.conf
localkms:
network_mode: 'host'
network_mode: host
profiles: ['localkms']
image: ${KMS_IMAGE:-nsmithuk/local-kms:3.11.7}
mongo:
network_mode: 'host'
network_mode: host
profiles: ['mongo']
image: ${MONGODB_IMAGE}
volumes:
- /tmp/artifacts/${JOB_NAME}:/logs
sproxyd:
network_mode: 'host'
network_mode: host
profiles: ['sproxyd']
image: sproxyd-standalone
build: ./sproxyd
Expand All @@ -110,7 +110,7 @@ services:
profiles: ['vault']
user: root
command: sh -c "chmod 400 tests/utils/keyfile && yarn start > /artifacts/vault.log 2> /artifacts/vault-stderr.log"
network_mode: 'host'
network_mode: host
volumes:
- /tmp/artifacts/${JOB_NAME}:/artifacts
- ./vault-config.json:/conf/config.json:ro
Expand All @@ -128,7 +128,7 @@ services:
metadata-standalone:
image: ghcr.io/scality/metadata:9.17.0-standalone
profiles: ['metadata-standalone']
network_mode: 'host'
network_mode: host
volumes:
- ./md-config.json:/mnt/standalone_workdir/config.json:ro
- /tmp/artifacts/${JOB_NAME}/md:/mnt/standalone_workdir/log
2 changes: 1 addition & 1 deletion .github/docker/md-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"logLevel": "info",
"env": {
"METADATA_NEW_BUCKETS_VFORMAT": "v0",
"S3_VERSION_ID_ENCODING_TYPE":"hex"
"S3_VERSION_ID_ENCODING_TYPE": "hex"
},
"migration": {
"deploy": false,
Expand Down
2 changes: 1 addition & 1 deletion .github/docker/vault-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"kmsAWS": {
"noAwsArn": true,
"providerName": "local",
"region": "us-east-1",
"region": "us-east-1",
"endpoint": "http://0:8080",
"ak": "456",
"sk": "123"
Expand Down
30 changes: 10 additions & 20 deletions .github/scripts/check-diff-async.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,12 @@ import { Project, SyntaxKind } from 'ts-morph';
const CALLBACK_PARAM_PATTERN = /^(cb|callback|next|done)$/i;

function getChangedJsFiles() {
const base = process.env.GITHUB_BASE_REF
const base = process.env.GITHUB_BASE_REF //
? `origin/${process.env.GITHUB_BASE_REF}`
: 'HEAD';
const output = execFileSync('git', [
'diff',
'--name-only',
'--diff-filter=ACMR',
base,
'--',
'**/*.js',
], { encoding: 'utf8' }).trim();
const output = execFileSync('git', ['diff', '--name-only', '--diff-filter=ACMR', base, '--', '**/*.js'], {
encoding: 'utf8',
}).trim();

return output ? output.split('\n').filter(f => f.endsWith('.js')) : [];
}
Expand All @@ -30,9 +25,7 @@ function getChangedJsFiles() {
* Get added line numbers for a file in the current diff.
*/
function getAddedLineNumbers(filePath) {
const base = process.env.GITHUB_BASE_REF
? `origin/${process.env.GITHUB_BASE_REF}`
: 'HEAD';
const base = process.env.GITHUB_BASE_REF ? `origin/${process.env.GITHUB_BASE_REF}` : 'HEAD';
const diff = execFileSync('git', ['diff', base, '--', filePath], { encoding: 'utf8' });
const addedLines = new Set();
let currentLine = 0;
Expand Down Expand Up @@ -69,14 +62,11 @@ const project = new Project({
skipAddingFilesFromTsConfig: true,
});

const filesToCheck = changedFiles.filter(f =>
!f.startsWith('tests/') &&
!f.startsWith('node_modules/') &&
(
f.startsWith('lib/') ||
f.startsWith('bin/') ||
!f.includes('/')
)
const filesToCheck = changedFiles.filter(
f =>
!f.startsWith('tests/') &&
!f.startsWith('node_modules/') &&
(f.startsWith('lib/') || f.startsWith('bin/') || !f.includes('/')),
);
if (filesToCheck.length === 0) {
console.log('No source JS files in diff (tests and node_modules excluded).');
Expand Down
59 changes: 30 additions & 29 deletions .github/scripts/cleanupOldGCPBuckets.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ function buildClient() {

if (!accessKeyId || !secretAccessKey) {
console.error(
'Missing required environment variables: ' +
'AWS_GCP_BACKEND_ACCESS_KEY and AWS_GCP_BACKEND_SECRET_KEY'
'Missing required environment variables: AWS_GCP_BACKEND_ACCESS_KEY and AWS_GCP_BACKEND_SECRET_KEY',
);
process.exit(1);
}
Expand Down Expand Up @@ -56,21 +55,23 @@ async function abortMultipartUploads(client, bucketName) {
let keyMarker;

do {
const res = await client.send(new ListMultipartUploadsCommand({
Bucket: bucketName,
UploadIdMarker: uploadIdMarker,
KeyMarker: keyMarker,
}));
const res = await client.send(
new ListMultipartUploadsCommand({
Bucket: bucketName,
UploadIdMarker: uploadIdMarker,
KeyMarker: keyMarker,
}),
);

for (const upload of res.Uploads || []) {
console.log(
` Aborting MPU: ${upload.Key} (${upload.UploadId})`
console.log(` Aborting MPU: ${upload.Key} (${upload.UploadId})`);
await client.send(
new AbortMultipartUploadCommand({
Bucket: bucketName,
Key: upload.Key,
UploadId: upload.UploadId,
}),
);
await client.send(new AbortMultipartUploadCommand({
Bucket: bucketName,
Key: upload.Key,
UploadId: upload.UploadId,
}));
}

uploadIdMarker = res.NextUploadIdMarker;
Expand All @@ -82,19 +83,23 @@ async function deleteAllObjects(client, bucketName) {
let continuationToken;

do {
const res = await client.send(new ListObjectsV2Command({
Bucket: bucketName,
ContinuationToken: continuationToken,
}));
const res = await client.send(
new ListObjectsV2Command({
Bucket: bucketName,
ContinuationToken: continuationToken,
}),
);

const objects = res.Contents || [];
if (objects.length > 0) {
console.log(` Deleting ${objects.length} object(s)...`);
for (const obj of objects) {
await client.send(new DeleteObjectCommand({
Bucket: bucketName,
Key: obj.Key,
}));
await client.send(
new DeleteObjectCommand({
Bucket: bucketName,
Key: obj.Key,
}),
);
}
}

Expand All @@ -121,20 +126,16 @@ async function main() {
const { Buckets = [] } = await client.send(new ListBucketsCommand({}));

const now = Date.now();
const stale = Buckets.filter(b =>
b.Name.startsWith(BUCKET_PREFIX) &&
now - new Date(b.CreationDate).getTime() > ONE_WEEK_MS
const stale = Buckets.filter(
b => b.Name.startsWith(BUCKET_PREFIX) && now - new Date(b.CreationDate).getTime() > ONE_WEEK_MS,
);

if (stale.length === 0) {
console.log('No stale GCP CI buckets found.');
return;
}

console.log(
`Found ${stale.length} stale GCP CI bucket(s) to clean up: ${
stale.map(b => b.Name).join(', ')}`
);
console.log(`Found ${stale.length} stale GCP CI bucket(s) to clean up: ${stale.map(b => b.Name).join(', ')}`);

for (const bucket of stale) {
await cleanupBucket(client, bucket.Name);
Expand Down
Loading
Loading