-
Notifications
You must be signed in to change notification settings - Fork 81
Description
Description
When trying to add a past change in the past 24 hours using epoch time and milliseconds you still get an error that the change time has to be completed in the past 24 hours.
Go Version
Provide the output of go version here please
Current behavior
FATAL timestamp can not be more than 24 hours in the past or future. Make sure to use epoch milliseconds for timestamp.
Expected behavior
This command should have added a change for that time because that time was only about 6 hours in the past.
Steps To Reproduce
Steps to reproduce the behavior:
- on the CLI create a command that is only about 6 hours from the current time.
- newrelic entity deployment create --guid "GUID of our application" --version "25.06" --deploymentType "BASIC" --description "Deployed for New Relic" --user "Greg Barnes" -t 1762218986000
- Error you will see is "FATAL timestamp can not be more than 24 hours in the past or future. Make sure to use epoch milliseconds for timestamp."
Debug Output (if applicable)
[jboss@gt-rundeck-gcp-l3t7 ark-getthere-svcdel]$ newrelic entity deployment create --guid "NzI0OTQ5MXxBUE18QVBQTElDQVRJT058NDgyMDg3ODA0" --version "25.06" --deploymentType "BASIC" --description "Deployed for New Relic" --user "Diego Lois" -t 1762444215000 --trace
DEBUG performing request method=POST url="https://api.newrelic.com/graphql"
TRACE request details headers="{"Api-Key":["NRAK-8WE************************"],"Content-Type":["application/json"],"Newrelic-Requesting-Services":["newrelic-cli|newrelic-client-go"],"User-Agent":["newrelic-cli/0.106.1 ([https://github.com/newrelic/newrelic-cli)"],"X-Query-Source-Component-Id":"newrelic-cli|newrel…/%22],/%22X-Query-Source-Component-Id/%22:[/%22newrelic-cli%7Cnewrelic-client-go/%22]%7D%22) query="mutation( $dataHandlingRules: ChangeTrackingDataHandlingRules, $deployment: ChangeTrackingDeploymentInput!, ) { changeTrackingCreateDeployment( dataHandlingRules: $dataHandlingRules, deployment: $deployment, ) { changelog commit deepLink deploymentId deploymentType description entityGuid groupId timestamp user version } }" variables="{"dataHandlingRules":{"validationFlags":["FAIL_ON_FIELD_LENGTH"]},"deployment":{"deploymentType":"BASIC","description":"Deployed for New Relic","entityGuid":"NzI0OTQ5MXxBUE18QVBQTElDQVRJT058NDgyMDg3ODA0","timestamp":1762444215,"user":"Diego Lois","version":"25.06"}}"
TRACE request completed body="{"data":{"changeTrackingCreateDeployment":null},"errors":[{"message":"timestamp can not be more than 24 hours in the past or future. Make sure to use epoch milliseconds for timestamp.","path":["changeTrackingCreateDeployment"],"extensions":{"classification":"DataFetchingException","errorClass":"INVALID_INPUT"},"locations":[{"line":4,"column":5}]}]}" headers="{"Cache-Control":["max-age=0, private, must-revalidate"],"Cf-Cache-Status":["DYNAMIC"],"Cf-Ray":["99a6d30f098061cf-ORD"],"Content-Type":["application/json; charset=utf-8"],"Date":["Thu, 06 Nov 2025 18:58:48 GMT"],"Served-By":["nerd-graph"],"Server":["cloudflare"],"Vary":["accept-encoding"],"X-Envoy-Upstream-Service-Time":["37"]}" method=POST status_code=200 url="https://api.newrelic.com/graphql"
FATAL timestamp can not be more than 24 hours in the past or future. Make sure to use epoch milliseconds for timestamp.
Current time is 13:01 and the time I used for the epoch is 09:50 which is about 4 hours in the past which should have worked.
Looks like it is dropped the milliseconds in the trace so if you add microseconds the command actually does go through.