Adding changeset sending support to a specified endpoint in new Publisher and other infrastructure updates. - #1058
Conversation
…ding_registry_changesets.rb Update docker-compose to include needed env variables
excelsior
left a comment
There was a problem hiding this comment.
Hey @rohit-joy!
The Argo removal part looks correct. I found some contractions between the docs and the actual behavior, as well as some regressions in the Docker environment.
Also, there are a few leftovers here and there. I can add a commit taking care of those or just list them in a comment—LMK what would be better.
| - `X-Registry-Changeset-Key`: S3 object key for the ZIP. | ||
|
|
||
| ## Changeset Selection | ||
| `REGISTRY_CHANGESET_SYNC_ENDPOINT_TIMEOUT_SECONDS` controls both the connection and response timeout and defaults to 30 seconds. A non-2xx response or network error fails the changeset run and does not advance the synced cutoffs, allowing the job to retry. |
There was a problem hiding this comment.
A non-2xx response or network error fails the changeset run and does not advance the synced cutoffs, allowing the job to retry.
These statements contradict the implemented behavior. Such failures get swollen here with no re-raise, while being logged and sent to the error tracker. Since that block exists normally, the window closes anyway.
There was a problem hiding this comment.
Sending the changeset is not an “essential” functionality for Ruby Registry, but it is “necessary” for new Publisher to keep up to date. So we would rather have Alerts indicating that sending has failed. Hence, the logging without exceptions.
It’s OK when sending the changeset fails. You could perhaps retry sending it 2 more times with a 30-second interval, then give up.
The main thing is that the window should open up to submit new objects for publishing.
There was a problem hiding this comment.
I added the suggested retry mechanism and updated the documentation.
There was a problem hiding this comment.
Thank you!
@chuang-CE please stress test locally CRUD operations as before, prior to sign off.
| } | ||
| end | ||
| ``` | ||
| Delete entries use the same complete JSON document shape as their corresponding upsert entries. Graph and metadata deletes are reconstructed from the pre-destroy envelope version. Resource deletes are snapshotted before resource rows are removed. Older queued resource delete events that predate the snapshot column may still use an identifier/deletion-time marker fallback. |
There was a problem hiding this comment.
Delete entries use the same complete JSON document shape as their corresponding upsert entries
This seems to contadict the above statement saying that
Delete files contain an
identifieranddeleted_attimestamp
There was a problem hiding this comment.
Would anything break due to this change? We just need a copy of what is going to be deleted in the Changeset ZIP file.
There was a problem hiding this comment.
If the full resource can't be recovered, the delete payload is reduced to an identifier+timestamp stub.
@chuang-CE Can you point me to the consumer code to verify whether both formats are supported?
There was a problem hiding this comment.
There was a problem hiding this comment.
We don’t want to support both formats. Since the deletion is requested by CTID, just put the actual JSON blobs in the ZIP at that moment. Actual deletion time doesn't matter.
Can this not be done?
@chuang-CE Did this not work when you were stress testing deletions?
There was a problem hiding this comment.
@rohit-joy I did not have issues with deletions when I was stress testing.
There was a problem hiding this comment.
Thanks Cary! The consumer actually only derives the IDs from the paths and ignores the content of the files completely. So yes, both formats are supported. If you simplify the payload, nothing will break.
|
|
||
| COPY . $APP_PATH | ||
|
|
||
| ENTRYPOINT ["/bin/bash", "-c", "set -euo pipefail && \ |
There was a problem hiding this comment.
Removing the migration step breaks the test intructions for the agents, since the commands there imply that the database already has the necessary schema.
There was a problem hiding this comment.
Feel free to add it back. I found it more convenient and transparent to do it myself.
There was a problem hiding this comment.
I updated the agents instructions instead because the CI runs the migrations explicitly too.
There was a problem hiding this comment.
Great, then let’s leave it out.
| end | ||
|
|
||
| def s3_resource_options | ||
| options = { region: ENV.fetch('AWS_REGION') } |
There was a problem hiding this comment.
Making the AWS region lookup strict breaks docker compose which has an empty AWS_REGION variable.
There was a problem hiding this comment.
Are changesets created and saved in S3 successfully? Would any thing break due to this change?
There was a problem hiding this comment.
EKS is safe, because it injects AWS_REGION.
The problem only exists in the docker compose environment. It needs to be addressed only If you use it outside EKS.
There was a problem hiding this comment.
Ok, go ahead and fix the docker compose and docker for testing.
|
Thank you, @excelsior and @chuang-CE! Onwards to deployment. :) |
Uh oh!
There was an error while loading. Please reload this page.