Skip to content
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

Add support for GS64 3.7.0 #176

Merged
merged 68 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
499f70a
Move Zinc extensions to its own package
gcotelli Sep 13, 2023
e2bf46c
Move Teapot extensions to its own package
gcotelli Sep 13, 2023
54848b9
Move NeoJSON extensions to its own package
gcotelli Sep 13, 2023
59e48f8
Move JWT extensions to its own package
gcotelli Sep 13, 2023
e220d92
Move Hyperspace extensions to its own package
gcotelli Sep 13, 2023
241c5ca
Move String extension to its own package
gcotelli Sep 13, 2023
bca5fef
Add GH action to check Core loading in GS64
gcotelli Sep 13, 2023
f6fd796
Fix Core.ston
gcotelli Sep 13, 2023
78ed428
Remove unnecessary pool dictionary
gcotelli Sep 13, 2023
8f5611e
Do not make direct references to `JWAHMACSHA256`
gcotelli Sep 13, 2023
d924276
Use MessageDigestAlgorithm facade
gcotelli Sep 14, 2023
f188135
Fix test
gcotelli Sep 14, 2023
6b2c6ad
Add more components
gcotelli Sep 14, 2023
ef03050
Add first test package
gcotelli Sep 15, 2023
ba4d9a8
Fix depdency in component
gcotelli Sep 15, 2023
ed6bf52
Add SortFunctions dependency on GS64
gcotelli Sep 15, 2023
cc02e7e
Use split: instead of splitOn:
gcotelli Sep 15, 2023
a143f07
Add application configuration components to rowan specs
gcotelli Sep 21, 2023
451244f
Fix Launchpad spec
gcotelli Sep 21, 2023
ecb4965
Move abstract test case
gcotelli Sep 21, 2023
930ef84
Rename spec
gcotelli Sep 21, 2023
7711871
Add application control component
gcotelli Sep 21, 2023
ab3bce0
Update dependencies
gcotelli Sep 22, 2023
11f8f37
Add missing package with Hyperspace extensions
gcotelli Sep 22, 2023
bb2e090
Move Pharo-specific application info to its own package
gcotelli Sep 22, 2023
b94bdb9
Add application info component
gcotelli Sep 22, 2023
fad4101
Add GS64 version of Operating System information provider
gcotelli Sep 22, 2023
435732e
Add new package
gcotelli Sep 22, 2023
11421d0
Add GS64 information provider
gcotelli Sep 22, 2023
5e42538
Merge branch 'gs64_info' into gs64_3.7.0
gcotelli Sep 22, 2023
1b91b35
Make application info tests aware of GS64
gcotelli Sep 22, 2023
57eca01
Add default providers for GS64
gcotelli Sep 22, 2023
039ddc8
Stargate-Loggers package added
ytsejam78 Sep 22, 2023
49ac2bc
Bell's LogRecord reference fix
ytsejam78 Sep 22, 2023
414e97d
Add HealthCheck component for GS64
gcotelli Sep 25, 2023
14ded1e
Split metrics in Pharo and GS64 packages
gcotelli Sep 25, 2023
9918fb9
Add Metrics component
gcotelli Sep 25, 2023
4fffc48
Remove Smalltalk reference
gcotelli Sep 25, 2023
9352465
Fix PrometehousMetricEncoder for GS64
gcotelli Sep 25, 2023
bb7d2cb
Improve CompositeMetric>>#value
gcotelli Sep 25, 2023
93d5ac7
Fix tests
gcotelli Sep 25, 2023
49530aa
Fix tests
gcotelli Sep 25, 2023
e55e022
Move Zinc events extensions to its own package
gcotelli Sep 25, 2023
ac34e03
Add HTTP metrics to component
gcotelli Sep 25, 2023
9008f06
Beacon extensions moved to specific package
ytsejam78 Sep 25, 2023
7f5dbaf
Bell extensions moved to specific package
ytsejam78 Sep 25, 2023
f9b477f
More protocol extended for Bell classes
ytsejam78 Sep 25, 2023
612e3af
Rowan specs updated for Logger packages
ytsejam78 Sep 25, 2023
ab895cc
Merge branch 'gs64_3.7.0' into gs64_3.7.0_loggers
gcotelli Sep 26, 2023
6088d4c
Merge pull request #175 from ba-st/gs64_3.7.0_loggers
gcotelli Sep 26, 2023
3a3ad88
Fix loggers tests
gcotelli Sep 26, 2023
886c264
Use the textual stack trace dumper by default
gcotelli Sep 26, 2023
b53bde4
Add examples component
gcotelli Sep 26, 2023
361ca32
Fix references to LaunchpadLogRecord
gcotelli Sep 26, 2023
f3e4168
Access headers using strings and not symbols
gcotelli Sep 26, 2023
8a52e05
Don't use directly instVarNamed:put:
gcotelli Sep 26, 2023
c3f8508
Do not use splitOn:
gcotelli Sep 26, 2023
ff1ed6b
Fix tests
gcotelli Sep 26, 2023
3154a9f
Fix testFileReferenceToDumpStackTrace on GS64
gcotelli Sep 26, 2023
1b13d45
Add test package to Tests component
gcotelli Sep 26, 2023
d7e5d9b
Move Teapot extensions to its own package
gcotelli Sep 26, 2023
a62dd66
Fix tests in GS64
gcotelli Sep 26, 2023
996277d
Add ZnEntity >> #asString
gcotelli Sep 28, 2023
d6cdf37
Add ignore for coverage in GS64 only method
gcotelli Sep 28, 2023
661eb20
Update docs and remove Pharo 8 and 9 support
gcotelli Sep 28, 2023
6d758ab
Fix markdown lint complaints
gcotelli Sep 28, 2023
7085622
Take into account code review comments
gcotelli Sep 29, 2023
1b2f6c5
Remove dependency
gcotelli Sep 29, 2023
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
27 changes: 23 additions & 4 deletions .github/workflows/loading-groups.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
name: Baseline groups

on: [push,pull_request,workflow_dispatch]
on:
- push
- pull_request
- workflow_dispatch

jobs:
group-loading:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
smalltalk: [ Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0 ]
load-spec: [ deployment, dependent-sunit-extensions, tests, development, tools, examples, core, healthcheck, metrics, metrics-http, json-rpc, app-control, app-info, app-config, loggers ]
smalltalk:
- Pharo64-10
- Pharo64-11
load-spec:
- app-config
- app-control
- app-info
- core
- dependent-sunit-extensions
- deployment
- development
- examples
- healthcheck
- json-rpc
- loggers
- metrics
- metrics-http
- tests
- tools
name: ${{ matrix.smalltalk }} + ${{ matrix.load-spec }}
steps:
- uses: actions/checkout@v3
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/loading-gs64-components.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 'GS64 Components Loading'
on:
- push
- pull_request
- workflow_dispatch
jobs:
component-loading:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
load-spec:
- Application-Configuration
- Application-Control
- Application-Info
- Core
- Dependent-SUnit-Extensions
- Deployment
- Examples
- HealthCheck
- Metrics
- JSON-RPC
name: GS64 + ${{ matrix.load-spec }}
steps:
- uses: actions/checkout@v3
- name: Load component in image
uses: ba-st-actions/gs64-ci@v2
with:
project_name: 'Stargate'
load_spec: 'Stargate-${{ matrix.load-spec }}'
6 changes: 4 additions & 2 deletions .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Markdown Lint
on: [pull_request,workflow_dispatch]
on:
- pull_request
- workflow_dispatch
jobs:
remark-lint:
name: runner / markdownlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: markdownlint
uses: reviewdog/action-markdownlint@v0
with:
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/notify.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
name: Release Notifications

on:
release:
types: [published]

on: workflow_dispatch
jobs:
notify:
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Shellcheck

on: [push,pull_request]

on:
- push
- pull_request
jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Run Shellcheck
uses: reviewdog/action-shellcheck@v1
with:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/unit-tests-gs64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'GS64 Unit Tests'
on:
- push
- pull_request
- workflow_dispatch
jobs:
unit-tests:
runs-on: ubuntu-latest
name: GS64 Unit Tests
steps:
- uses: actions/checkout@v3
- name: Load Image and Run Tests
uses: ba-st-actions/gs64-ci@v2
with:
project_name: 'Stargate'
run_tests: 'true'
13 changes: 8 additions & 5 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: Unit Tests

on: [push,pull_request,workflow_dispatch]

name: Pharo Unit Tests
on:
- push
- pull_request
- workflow_dispatch
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
smalltalk: [ Pharo64-11, Pharo64-10, Pharo64-9.0, Pharo64-8.0 ]
smalltalk:
- Pharo64-10
- Pharo64-11
name: ${{ matrix.smalltalk }}
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018-2022 Buenos Aires Smalltalk Contributors
Copyright (c) 2018-2023 Buenos Aires Smalltalk Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,22 @@

Stargate is a library supporting the creation of HTTP based RESTful APIs.

[![Unit Tests](https://github.com/ba-st/Stargate/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/ba-st/Stargate/actions/workflows/unit-tests.yml)
[![Pharo Unit Tests](https://github.com/ba-st/Stargate/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/ba-st/Stargate/actions/workflows/unit-tests.yml)
[![GS64 - Unit Tests](https://github.com/ba-st/Stargate/actions/workflows/unit-tests-gs64.yml/badge.svg)](https://github.com/ba-st/Stargate/actions/workflows/unit-tests-gs64.yml)
[![Coverage Status](https://codecov.io/github/ba-st/Stargate/coverage.svg?branch=release-candidate)](https://codecov.io/gh/ba-st/Stargate/branch/release-candidate)

[![Baseline Groups](https://github.com/ba-st/Stargate/actions/workflows/loading-groups.yml/badge.svg)](https://github.com/ba-st/Stargate/actions/workflows/loading-groups.yml)
[![GS64 Components](https://github.com/ba-st/Stargate/actions/workflows/loading-gs64-components.yml/badge.svg)](https://github.com/ba-st/Stargate/actions/workflows/loading-gs64-components.yml)
[![Markdown Lint](https://github.com/ba-st/Stargate/actions/workflows/markdown-lint.yml/badge.svg)](https://github.com/ba-st/Stargate/actions/workflows/markdown-lint.yml)
[![Shellcheck](https://github.com/ba-st/Stargate/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/ba-st/Stargate/actions/workflows/shellcheck.yml)

[![GitHub release](https://img.shields.io/github/release/ba-st/Stargate.svg)](https://github.com/ba-st/Stargate/releases/latest)
[![Pharo 8.0](https://img.shields.io/badge/Pharo-8.0-informational)](https://pharo.org)
[![Pharo 9.0](https://img.shields.io/badge/Pharo-9.0-informational)](https://pharo.org)

[![Pharo 10](https://img.shields.io/badge/Pharo-10-informational)](https://pharo.org)
[![Pharo 11](https://img.shields.io/badge/Pharo-11-informational)](https://pharo.org)

[![GS64 3.7.0](https://img.shields.io/badge/GS64-3.7.0-informational)](https://gemtalksystems.com/products/gs64/)

Quick links

- [**Explore the docs**](docs/README.md)
Expand Down
36 changes: 36 additions & 0 deletions docs/MigrationGuide.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
# Migration Guide

## Migration from v7/8 to v9

- Pharo 8 and 9 support is deprecated, use Pharo 10 or 11.
- `StargateApplication class >> #applicationBaselineName` is replaced by
`#projectName`.
- For Pharo it will be concatenated to `BaselineOf` to
search for the Baseline package when initializing the version.
- For GS64 it will be used as the project name to search in the Rowan
registry.
- `StargateApplication>>#stackTraceDumper` changed the default
implementation to create a `StackTraceTextDumper` instead of the
binary version. If you want to continue using the dumper as before,
reimplement it with:

```smalltalk
gcotelli marked this conversation as resolved.
Show resolved Hide resolved
stackTraceDumper

^ StackTraceBinarySerializer on: [ :dumpAction |
self class fileReferenceToDumpStackTrace binaryWriteStreamDo: dumpAction ]
```
gcotelli marked this conversation as resolved.
Show resolved Hide resolved

- `StargateApplication class >> fileReferenceToDumpStackTrace` changed
gcotelli marked this conversation as resolved.
Show resolved Hide resolved
the file naming convention. Now the produced file includes:
- the command name used to start the application
- the current timestamp
- a UUID encoded in Base-36

The new implementation will also check that the file to use doesn't
exist before dumping information on it.
- `stackTraceDumpExtension` is introduced in `StargateApplication` so
users can now specify a different file extension for the trace dumps.
- This version adds support for GemStone/S 64 bits 3.7.0, keep
in mind that `String` and `Symbol` instances do not compare for equality
like Pharo. Be careful when accessing header names in the request or
response abstractions, for maximum compatibility strings must be used as keys.

## Migration from v6 to v7

- Pharo 7 support is now deprecated, use Pharo 8 or 9.
Expand Down
1 change: 1 addition & 0 deletions docs/reference/ApplicationInfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Dictionary new
Available information providers:

- `application` Reports the application name, description, and version
- `gs64` Reports information about the Gem, Shared Page Cache and Stone
- `pharo` Reports information about the Pharo image and VM
- `os` Reports information about the underlying operating system

Expand Down
4 changes: 3 additions & 1 deletion docs/reference/Baseline-groups.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Baseline Groups
# Baseline Groups & GS 64 Components

## Pharo Baseline Groups

Stargate includes the following groups in its Baseline that can be used as
loading targets:
Expand Down
10 changes: 9 additions & 1 deletion docs/reference/Metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,22 @@ Dictionary new

To get a list of supported metric providers print the result of `MetricProvider allProviderNames`.

Available metric providers:
Available metric providers for Pharo:

- `memory` gathers metrics over the allocated memory (total, old space, free
old space, eden space, young space)
- `garbage collection` gathers metrics over the garbage collector (time spent
on garbage collection, invocation count and tenure count)
- `running system` gathers information over the running system (uptime,
process count by status and priority, external semaphore table data)

Available metric providers for GS64:

- `running gem` gathers information over the running gem (process count by
status and priority)

Available metric providers for Pharo and GS64

- `http` (optional group) gathers information over the incoming HTTP requests
(request count, request duration, response size by HTTP method, response code,
URL and URL template). The categories used for the breakdown can be filtered
Expand Down
9 changes: 5 additions & 4 deletions docs/reference/Skeleton.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ YourApplication class>>initialize
<ignoreForCoverage>
self initializeVersion

YourApplication class>>applicationBaselineName
YourApplication class>>projectName

^#BaselineOfYourApplication
^#YourApplication

YourApplication class>>commandName

Expand Down Expand Up @@ -52,12 +52,13 @@ String streamContents: [ :s | YourApplication printHelpOn: s].
### Stack trace generation

By default, stack traces are written in a `logs` directory relative to
the image's working directory in a filename whose name is `app-name-YYYY-MM-DD_HH-MM-SS.MS`,
and in `Fuel` format.
the image's working directory in a filename whose name is `app-name-YYYY-MM-DD_HH-MM-SS_uuid-as-base36.dump`.

- To change the stack trace location, re-implement the `logsDirectory` class method.
- To change the stack trace file name, re-implement `fileReferenceToDumpStackTrace`
class method
- To change the stack trace file extension, re-implement
`stackTraceDumpExtension` class method
- To change the dump format, re-implement `stackTraceDumper` instance method

### Additional configuration parameters
Expand Down
21 changes: 21 additions & 0 deletions rowan/components/Application-Configuration.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
RwSimpleProjectLoadComponentV2 {
#name : 'Application-Configuration',
#projectNames : [
'Launchpad'
],
#componentNames : [
'Core'
],
#packageNames : [
'Stargate-Application-Configuration'
],
#conditionalPackageMapSpecs : {
'gemstone' : {
'allusers' : {
#packageNameToPlatformPropertiesMap : {
'Stargate-Application-Configuration' : { 'symbolDictName' : 'Stargate' }
}
}
}
}
}
21 changes: 21 additions & 0 deletions rowan/components/Application-Control.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
RwSimpleProjectLoadComponentV2 {
#name : 'Application-Control',
#projectNames : [
'Launchpad'
],
#componentNames : [
'JSON-RPC'
],
#packageNames : [
'Stargate-Application-Control'
],
#conditionalPackageMapSpecs : {
'gemstone' : {
'allusers' : {
#packageNameToPlatformPropertiesMap : {
'Stargate-Application-Control' : { 'symbolDictName' : 'Stargate' }
}
}
}
}
}
21 changes: 21 additions & 0 deletions rowan/components/Application-Info.ston
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
RwSimpleProjectLoadComponentV2 {
#name : 'Application-Info',
#projectNames : [ ],
#componentNames : [
'Core'
],
#packageNames : [
'Stargate-Application-Info',
'Stargate-Application-Info-GS64'
],
#conditionalPackageMapSpecs : {
'gemstone' : {
'allusers' : {
#packageNameToPlatformPropertiesMap : {
'Stargate-Application-Info' : { 'symbolDictName' : 'Stargate' },
'Stargate-Application-Info-GS64' : { 'symbolDictName' : 'Stargate' }
}
}
}
}
}
Loading