Skip to content

docs: SLA page and unstable for prereleases #3195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jun 17, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ debug.log
**/.yarn/*
!**/.yarn/releases
!**/.yarn/plugins
!**/.yarn/patches

.vscode/
.idea/
Expand Down
53 changes: 53 additions & 0 deletions .yarn/patches/lts-npm-1.2.0-e55f0a54f7.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
diff --git a/lib/index.js b/lib/index.js
index 483d41fe6e4b52f4d2210452a2f2e528e324a6f3..c8852f31dd5b40b706ac91254ef38f9a4eb7f154 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -45,10 +45,11 @@ function parseInput (data, queryStart, queryEnd, excludeMaster, projectName) {
Object.keys(data).forEach((v) => {
const version = data[v];
const name = `${projectName} ${v.replace('v', '')}`;
- const current = version.start ? new Date(version.start) : null;
- const active = version.lts ? new Date(version.lts) : null;
- const maint = version.maintenance ? new Date(version.maintenance) : null;
- let end = version.end ? new Date(version.end) : null;
+ const isPreRelease = version.prerelease === true;
+ const current = isPreRelease ? queryStart : version.start ? new Date(version.start) : null;
+ const active = isPreRelease ? queryStart : version.lts ? new Date(version.lts) : null;
+ const maint = isPreRelease ? queryStart : version.maintenance ? new Date(version.maintenance) : null;
+ let end = isPreRelease ? queryEnd : version.end ? new Date(version.end) : null;

if (current === null) {
throw new Error(`missing start in ${version}`);
@@ -60,7 +61,7 @@ function parseInput (data, queryStart, queryEnd, excludeMaster, projectName) {

if (maint !== null) {
if (maint < queryEnd && end > queryStart) {
- output.push({ name, type: 'maintenance', start: maint, end });
+ output.push({ name, type: isPreRelease ? 'unstable' : 'maintenance', start: maint, end });
}

end = maint;
@@ -68,20 +69,20 @@ function parseInput (data, queryStart, queryEnd, excludeMaster, projectName) {

if (active !== null) {
if (active < queryEnd && end > queryStart) {
- output.push({ name, type: 'active', start: active, end });
+ output.push({ name, type: isPreRelease ? 'unstable' : 'active', start: active, end });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is unstable a common word for releases ? I feel like DEVELOPMENT and MAINTENANCE would be more suitable

Copy link
Member Author

@shortcuts shortcuts Jun 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've used the same as for https://nodejs.org/en/about/previous-releases

maintenance in our SLA policy means that there's no features but fixes will be delivered

}

end = active;
}

if (current < queryEnd && end > queryStart) {
- output.push({ name, type: 'current', start: current, end });
+ output.push({ name, type: isPreRelease ? 'unstable' : 'current', start: current, end });
}
});

if (!excludeMaster) {
output.unshift({
- name: 'Master',
+ name: 'Main',
type: 'unstable',
start: queryStart,
end: queryEnd
Binary file removed config/csharp-lts.png
Binary file not shown.
Binary file removed config/dart-lts.png
Binary file not shown.
Binary file removed config/go-lts.png
Binary file not shown.
Binary file removed config/java-lts.png
Binary file not shown.
Binary file removed config/javascript-lts.png
Binary file not shown.
Binary file removed config/kotlin-lts.png
Binary file not shown.
Binary file removed config/php-lts.png
Binary file not shown.
Binary file removed config/python-lts.png
Binary file not shown.
80 changes: 43 additions & 37 deletions config/release.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,126 +22,132 @@
"name": "algolia-bot",
"email": "[email protected]"
},
"lts": {
"sla": {
"csharp": {
"6.1.17": {
"start": "2024-01-01",
"end": "2024-08-01"
"lts": "2024-01-01",
"end": "2026-08-01"
},
"7.0.0-beta.4": {
"start": "2024-06-13",
"active": "2024-06-13",
"end": "2025-06-13"
"end": "2026-06-13",
"prerelease": true
}
},
"dart": {
"1.11.1": {
"start": "2024-06-12",
"end": "2024-12-12"
},
"1.12.0": {
"start": "2024-06-13",
"active": "2024-06-13",
"end": "2025-06-13"
"lts": "2024-06-13",
"end": "2026-06-13"
}
},
"go": {
"3.31.1": {
"start": "2024-01-01",
"end": "2024-08-01"
"lts": "2024-01-01",
"end": "2026-08-01"
},
"4.0.0-beta.16": {
"start": "2024-06-13",
"active": "2024-06-13",
"end": "2025-06-13"
"end": "2025-06-13",
"prerelease": true
}
},
"java": {
"3.16.9": {
"start": "2024-01-01",
"end": "2024-08-01"
"lts": "2024-01-01",
"end": "2026-08-01"
},
"4.0.0-beta.34": {
"start": "2024-06-13",
"active": "2024-06-13",
"end": "2025-06-13"
"end": "2025-06-13",
"prerelease": true
}
},
"javascript": {
"4.23.3": {
"start": "2024-01-01",
"end": "2024-08-01"
"lts": "2024-01-01",
"end": "2026-08-01"
},
"5.0.0-beta.4": {
"start": "2024-06-13",
"active": "2024-06-13",
"end": "2025-06-13"
"end": "2025-06-13",
"prerelease": true
}
},
"kotlin": {
"2.1.12": {
"start": "2024-01-01",
"end": "2024-08-01"
"lts": "2024-01-01",
"end": "2026-08-01"
},
"3.0.0-beta.29": {
"start": "2024-06-13",
"active": "2024-06-13",
"end": "2025-06-13"
"end": "2025-06-13",
"prerelease": true
}
},
"php": {
"3.4.1": {
"start": "2024-01-01",
"end": "2024-08-01"
"lts": "2024-01-01",
"end": "2026-08-01"
},
"4.0.0-beta.4": {
"start": "2024-06-13",
"active": "2024-06-13",
"end": "2025-06-13"
"end": "2025-06-13",
"prerelease": true
}
},
"python": {
"3.0.0": {
"start": "2024-01-01",
"end": "2024-08-01"
"lts": "2024-01-01",
"end": "2026-08-01"
},
"4.0.0b19": {
"start": "2024-06-13",
"active": "2024-06-13",
"end": "2025-06-13"
"end": "2025-06-13",
"prerelease": true
}
},
"ruby": {
"2.3.4": {
"start": "2024-01-01",
"end": "2024-08-01"
"lts": "2024-01-01",
"end": "2026-08-01"
},
"3.0.0.beta.4": {
"start": "2024-06-13",
"active": "2024-06-13",
"end": "2025-06-13"
"end": "2026-06-13",
"prerelease": true
}
},
"scala": {
"1.45.2": {
"start": "2024-01-01",
"end": "2024-08-01"
"lts": "2024-01-01",
"end": "2026-08-01"
},
"2.0.0-beta.4": {
"start": "2024-06-13",
"active": "2024-06-13",
"end": "2025-06-13"
"end": "2026-06-13",
"prerelease": true
}
},
"swift": {
"8.20.1": {
"start": "2024-01-01",
"end": "2024-08-01"
"lts": "2024-01-01",
"end": "2026-08-01"
},
"9.0.0-beta.4": {
"start": "2024-06-13",
"active": "2024-06-13",
"end": "2025-06-13"
"end": "2026-06-13",
"prerelease": true
}
}
}
Expand Down
Binary file removed config/ruby-lts.png
Binary file not shown.
Binary file removed config/scala-lts.png
Binary file not shown.
Binary file removed config/swift-lts.png
Binary file not shown.
12 changes: 10 additions & 2 deletions scripts/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import { startTestServer } from '../cts/testServer';
import { formatter } from '../formatter.js';
import { generate } from '../generate.js';
import { playground } from '../playground.js';
import { createReleasePR } from '../release/createReleasePR.js';
import { createReleasePR, updateSLA } from '../release/createReleasePR.js';
import type { Versions } from '../release/types.js';
import { snippetsGenerateMany } from '../snippets/generate.js';
import type { Language } from '../types.js';

Expand Down Expand Up @@ -202,9 +203,16 @@ program
.option(flags.verbose.flag, flags.verbose.description)
.option('-m, --major', 'triggers a major release for the given language list')
.option('-d, --dry-run', 'does not push anything to GitHub')
.action(async (langArgs: LangArg[], { verbose, major, dryRun }) => {
.option('-gg, --generate-graph', 'only generates the graph')
.action(async (langArgs: LangArg[], { verbose, major, dryRun, generateGraph }) => {
setVerbose(Boolean(verbose));

if (generateGraph) {
await updateSLA({} as Versions, true);

return;
}

if (langArgs.length === 0) {
langArgs = [ALL];
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"fs-extra": "11.2.0",
"js-yaml": "4.1.0",
"knip": "5.20.0",
"lts": "1.2.0",
"lts": "patch:lts@npm%3A1.2.0#~/.yarn/patches/lts-npm-1.2.0-e55f0a54f7.patch",
"micromatch": "4.0.7",
"semver": "7.6.2",
"spinnies": "0.5.1",
Expand Down
Loading
Loading