Hankintailmoitukset / hilma-api

11 stars 0 forks source link

What is a status of notice c3a97336-f64b-486a-bd8d-4b0527e1227c-01 in production? #193

Closed eduardsmirnov closed 9 months ago

eduardsmirnov commented 10 months ago

Notice with ETS c3a97336-f64b-486a-bd8d-4b0527e1227c-01 submitted to Production. Its current state requested via https://api.hankintailmoitukset.fi/eforms/external-write/v1/notice/c3a97336-f64b-486a-bd8d-4b0527e1227c-01?includeEForm=True is { "etsIdentifier": "c3a97336-f64b-486a-bd8d-4b0527e1227c-01", "id": 361, "noticeNumber": "2023-000361", "procedureId": 352, "hideFromOrganisationUsersWhileDraft": false, "eForm": "removed", "hilmaStatistics": { ...... }, "hilmaState": 1, "hilmaErrorState": 2, "tedState": 0, "tedPublicationId": null, "tedDateReceived": null, "tedDatePublished": null, "tedError": "<html>\r\n<head><title>503 Service Temporarily Unavailable</title></head>\r\n<body>\r\n<center><h1>503 Service Temporarily Unavailable</h1></center>\r\n</body>\r\n</html>\r\n", "datePublished": null }

hilmaState = 1 which means Draft status. So we treat a notice as successfully submitted and wait for publication.

We do not check a value of "hilmaErrorState" which is equal to 2. Do we have to somehow react on this property? It is not documented.

Is there anything we could do to publish a notice?

Havunen commented 10 months ago

When the hilmaState is 1 and hilmaErrorState is not a zero it means the notice needs to be submitted again by the user. tedState 0 means the notice is not submitted to TED at all. tedError contains the error response from TED.

Is there anything we could do to publish a notice?

Yes re-submit it

eduardsmirnov commented 10 months ago

Please, where it is documented?

eduardsmirnov commented 10 months ago

@arinurkkala is there any chance to re-submit a notice from Hilma side? Actually due to 24h rule it cannot be just re-submitted, we need to re-generate XML.

Juhisee commented 10 months ago

Yep, that is indeed the case. If the issuedate is too late, then you need to re-submit it with updated date

Juhisee commented 10 months ago

@eduardsmirnov FYI: We just got an email from TED: "Due to scheduled maintenance of the TED Developer Portal, TED Apps for eForms will experience disruptions in Preview and Production environments on 2 October, between 07:00 and 09:00 (CEST). We suggest that you do not use the applications during this time. ". So if notices are sent to Hilma in that time, they will most probably fail again

eduardsmirnov commented 9 months ago

@arinurkkala @Havunen I re-submitted same notice again and got this exception {"type":"Hilma API Error","title":"Validation error","status":400,"detail":"Notice resubmission is allowed only when notice state is DRAFT and TED state is DELETED, STOPPED, VALIDATION_FAILED or NOT_PUBLISHED.","traceId":"c9a89b773cc98248100303c0a703a590"}

As you told me above, it should be enough to re-submit a notice. It did not work.

We need to publish a notice ASAP!

eduardsmirnov commented 9 months ago

I have re-submitted a notice with a new ETS c3a97336-f64b-486a-bd8d-4b0527e1227d-01

Havunen commented 9 months ago

I re-submitted same notice again and got this exception {"type":"Hilma API Error","title":"Validation error","status":400,"detail":"Notice resubmission is allowed only when notice state is DRAFT and TED state is DELETED, STOPPED, VALIDATION_FAILED or NOT_PUBLISHED.","traceId":"c9a89b773cc98248100303c0a703a590"}

This is indeed a bug in Hilma, we will change it to allow re-submission when TED state is 0 ( not submitted )

eduardsmirnov commented 9 months ago

When it will be fixed? I have 4 more notices in the same status and need to publish them ASAP. Should I wait or re-create them with a new notice id?

exttuosa commented 9 months ago

The fix is on the way. We try to release it during lunch hours. We'll let you know when it has been deployed.

exttuosa commented 9 months ago

Fix is now in production. Let us know if you run into any issues.

eduardsmirnov commented 9 months ago

Thank you! Notices being stuck are now re-submitted successfully. The issue could be closed.