-
Couldn't load subscription status.
- Fork 412
Log a warning if the API version is not supported. #285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e6d1c6b to
1220ae5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable. Interesting you've gone for a warning approach instead of outright stopping people. I have no comments on this.
Do we need approval for the references to the enterprise/releases repo? Is linking to internal resources like that the best way to achieve this?
Yes, there's a few benefits to doing a warning. It eases development and testing of new GHES versions as the Action won't fail until we officially add support for the new version. It also means if we happen not to break support for an older release we won't cause any unnecessary issues with people using GitHub Connect. It does have the disadvantage that we have to be a bit careful that we don't change the semantics of an API without actively breaking it, but that seems like a fairly small risk and we already have to think pretty carefully about API changes to avoid breaking supported versions.
I don't really see an issue with it as the only information that gets pulled in by the update script in the end is really just the feature freeze date for the next version. @rneatherway and I spent a good amount of time trying to think of an alternative but we couldn't come up with anything other than updating it manually for each release which seemed like it could be a bit error-prone. I've asked whether this is okay and got a non-committal but vaguely positive answer. |
It's nice that it might just work for unsupported versions, and I agree given how much we're changing things and how careful we're being there's a good chance it'll still work. My main worry with just a warning is that people won't see it in the logs and thus there will still be the cost of a support request to discover the problem. I guess one things that works in our favour here is that the warning is printed after the request, so if the request fails then the version warning should be the last thing that gets printed. So considering that, I'm happy with this implementation. |
|
I agree with Robert, so approving. |
|
I had one other comment I made (#285 (comment)) which I think would be good to consider, but that could be pushed to later if it's more important to get this in now. |
2b50631 to
b16110e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. LGTM
This adds a warning, logged by the API client if the Action detects it is communicating with an unsupported version of GitHub Enterprise Server.
For the purposes of this check, a version is supported if all the following are true:
This means new versions become supported two weeks from being feature frozen, and support is dropped one year after release. The supported versions are updated automatically by a nightly cron job that will open a pull request at the right times to add support for new versions or remove support for old versions.
This allows us to make breaking changes to the APIs used by the Action whilst still providing good feedback to users about how to ensure their workflows keep working on GHES.
Merge / deployment checklist