[feat]: automatically upload adapter on start if the upload is missing for some reason #2902
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Link the feature issue which is closed by this PR
In #2897 it was recommended to inform about missing uploads with a TODO to perform the upload automatically. To do this before start the code needs to move outside of the adapter class to also have correct information for blocked checks, dependency checks etc. (in general access to the current installed io-package and instance object).
Implementation details
During the adapter start checks we read the
io-package.json
and check if the version in the instance object differs. This should be a sufficient heuristic to detect failed uploads in most cases. If there is a difference, the adapter will be uploaded before any further checks will be performed.Tests
Documentation
There is a log line added to show what is going on. From my pov no need to document the feature.
If no tests added, please specify why it was not possible
Would need an adapter.