Skip to content

Commit 4fa2b90

Browse files
authored
release: 1.4.0 (#27)
* package.json: bump version to 1.4.0 for upcoming features * Update pnpm to version 10 in workflows and Dockerfile - Update the pnpm setup process to utilize pnpm/action-setup and streamline the installation to version 10. - Ensure compatibility across the workflow and Dockerfile by reflecting version changes in both build and install stages. - Maintain existing functionality for repository checkout, Node setup, dependency installation, building, and publishing processes. Signed-off-by: katsumata <[email protected]> * Refactor metrics test suite for clarity and accuracy - Refactor the test suite naming for clarity and consistency. - Enhance mock request creation to align with the updated naming convention. - Improve error handling assertions for better readability and accuracy in test cases. Signed-off-by: katsumata <[email protected]> * Clarify metrics querying function name - Update function name for improved clarity and understanding. - Enhance documentation in the README to reflect the changes made. - Ensure consistency across the codebase following the renaming of the metric query function. Signed-off-by: katsumata <[email protected]> --------- Signed-off-by: katsumata <[email protected]>
1 parent 3577a3a commit 4fa2b90

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ jobs:
2222
node-version: 20
2323
registry-url: 'https://registry.npmjs.org/'
2424

25-
- name: Install pnpm
26-
run: npm install -g pnpm
25+
- uses: pnpm/action-setup@v4
26+
with:
27+
version: 10
2728

2829
- name: Install dependencies
2930
run: pnpm install --frozen-lockfile

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM node:22.12-alpine AS builder
33

44
# Install pnpm globally
5-
RUN npm install -g pnpm
5+
RUN npm install -g pnpm@10
66

77
WORKDIR /app
88

@@ -19,7 +19,7 @@ RUN pnpm build
1919
FROM node:22.12-alpine AS installer
2020

2121
# Install pnpm globally
22-
RUN npm install -g pnpm
22+
RUN npm install -g pnpm@10
2323

2424
WORKDIR /app
2525

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ MCP server for the Datadog API, enabling incident management and more.
6464
- `dashboard_id` (string): ID of the dashboard to fetch.
6565
- **Returns**: Dashboard details including title, widgets, etc.
6666

67-
7. `get_metrics`
67+
7. `query_metrics`
6868

6969
- Retrieve metrics data from Datadog.
7070
- **Inputs**:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@winor30/mcp-server-datadog",
3-
"version": "1.3.0",
3+
"version": "1.4.0",
44
"description": "MCP server for interacting with Datadog API",
55
"repository": {
66
"type": "git",

tests/tools/metrics.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('Metrics Tool', () => {
2424
const toolHandlers = createMetricsToolHandlers(apiInstance)
2525

2626
// https://docs.datadoghq.com/api/latest/metrics/#query-timeseries-data-across-multiple-products
27-
describe.concurrent('get_metrics', async () => {
27+
describe.concurrent('query_metrics', async () => {
2828
it('should query metrics data', async () => {
2929
const mockHandler = http.get(metricsEndpoint, async () => {
3030
return HttpResponse.json({
@@ -81,7 +81,7 @@ describe('Metrics Tool', () => {
8181
const server = setupServer(mockHandler)
8282

8383
await server.boundary(async () => {
84-
const request = createMockToolRequest('get_metrics', {
84+
const request = createMockToolRequest('query_metrics', {
8585
from: 1640995000,
8686
to: 1641095000,
8787
query: 'avg:system.cpu.user{*}',
@@ -114,7 +114,7 @@ describe('Metrics Tool', () => {
114114
const server = setupServer(mockHandler)
115115

116116
await server.boundary(async () => {
117-
const request = createMockToolRequest('get_metrics', {
117+
const request = createMockToolRequest('query_metrics', {
118118
from: 1640995000,
119119
to: 1641095000,
120120
query: 'avg:non.existent.metric{*}',
@@ -142,7 +142,7 @@ describe('Metrics Tool', () => {
142142
const server = setupServer(mockHandler)
143143

144144
await server.boundary(async () => {
145-
const request = createMockToolRequest('get_metrics', {
145+
const request = createMockToolRequest('query_metrics', {
146146
from: 1640995000,
147147
to: 1641095000,
148148
query: 'invalid:query:format',
@@ -169,7 +169,7 @@ describe('Metrics Tool', () => {
169169
const server = setupServer(mockHandler)
170170

171171
await server.boundary(async () => {
172-
const request = createMockToolRequest('get_metrics', {
172+
const request = createMockToolRequest('query_metrics', {
173173
from: 1640995000,
174174
to: 1641095000,
175175
query: 'avg:system.cpu.user{*}',
@@ -191,7 +191,7 @@ describe('Metrics Tool', () => {
191191
const server = setupServer(mockHandler)
192192

193193
await server.boundary(async () => {
194-
const request = createMockToolRequest('get_metrics', {
194+
const request = createMockToolRequest('query_metrics', {
195195
from: 1640995000,
196196
to: 1641095000,
197197
query: 'avg:system.cpu.user{*}',
@@ -216,7 +216,7 @@ describe('Metrics Tool', () => {
216216

217217
await server.boundary(async () => {
218218
// Using a very large time range that might exceed limits
219-
const request = createMockToolRequest('get_metrics', {
219+
const request = createMockToolRequest('query_metrics', {
220220
from: 1600000000, // Very old date
221221
to: 1700000000, // Very recent date
222222
query: 'avg:system.cpu.user{*}',

0 commit comments

Comments
 (0)