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
[RelEng] Add reusable verifyFreezePeriode workflow #24
[RelEng] Add reusable verifyFreezePeriode workflow #24
Conversation
@mickaelistria Can you please take a look at this one? I believe this is a good idea. Can we get the api keys added to the organization? Since this is common across all the repos I suggest this actions to be added to our common organizational repository https://github.com/eclipse-platform/.github |
Alternatively this could be implemented like the eca-check. I'm not aware how this is done exactly, but it seems to be some kind of web-service that is queried by a dedicated status-check. When I click on the details I'm directed to the ECA Validation Service of Eclipse. Something similiar could be done to check if Eclipse-Platform is currently in a code-freeze period. This way the credentials could remain on the server and the service would just have to answer with yes/no. |
IMO, it's really worth getting rid of the API token, and fetching the XML or ICS file and processing it. |
Or I could create a custom action written in Java, just like for example Oracle does for their Setup-Java action: This has the advantage that I'm way more proficient in Java than any of the languages you mentioned and this would also allow read the file's content from an |
My opinion here is "whatever works with public access. Thinking more about it, the HTML calendar can have options to only show the current day. So, if weal manage to get a good URL to show only current day, some |
With a lot of try and error and searching multiple forums I managed to find a good URL that fits our needs based on It would be nice to display a descriptive text about the result of the check directly at the corresponding item in the list of performed checks which is displayed for a PR, but I did not figure out how to set that from a workflow. So at the moment the check is only displayed as failed or passed and if one wants a message he/she has to click on the details to see the message. An individual descriptions like for the ECA-check would be nice to have: Besides this cosmetic imperfection I think this is ready to be used. The last question is: Are you sure this is the right repository for workflows reused by other Eclipse-Project repos? In general I think in the future more reusable workflows could follow. |
I think the most suitable place would be https://github.com/eclipse-cbi instead.
I think you need to write an action for this (that could then be used in a workflow) e.g. the https://github.com/EnricoMi/publish-unit-test-result-action also adds the number of failed tests there. But I think this is really not needed for a first |
We do have separate calendar for platform to manage so it in specific to platform project. So we should have this in one of our repositories. We have multiple options here
These 4 are the best locations to hold necessary code for this task. I do prefer .github since it will be used by all platform repos. |
Then the calendar should be a parameter for the workflow/action |
Maybe this would be better suited to be an Action? It could be a simple JavaScript action: or if you need the power of an OS a docker action: |
With a lot of try and error and searching multiple forums I managed to
find a good URL that fits our needs based on htmlembed using the
mode=AGENDA and the dates parameter available with it. The latter
parameter seems to have the same effect like timeMin and timeMax in the
calendar-v3 API (except that it only accepts whole days, but I think this
is fine).
Awesome finding!
Besides this cosmetic imperfection I think this is ready to be used.
How to enable it on all repos concretely? Adding a verifyFreeze.yaml to all
repos?
The last question is: Are you sure this is the right repository for
workflows reused by other Eclipse-Project repos?
From the naming eclipse-platform/eclipse.platform.releng.buildtools could
also be a suitable repo.
Yes, maybe. What about
https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/tree/master/scripts
?
|
Thank you Christoph for the links. Looks like this cannot be done by a magic
Isn't the calendar, besides Platform also used for JDT, PDE and Equinox? At least its title indicates this: Because I also want to reference the reusable workflow in JDT, PDE and Equinox I think @laeubi suggestion (https://github.com/eclipse-cbi) looks also very suitable. With that in mind |
Thanks!
Exactly and this |
So eclipse.platform.releng.aggregator/.github/workflows then? |
If the others find this suitable, too, then yes. |
Then please move to the eclipse.platform.releng.aggregator, and we'll merge it just after M1 is done. |
Done with eclipse-platform/eclipse.platform.releng.aggregator#206 I'll abandon this PR because I think adding a simple workflow that calles the reusable one should be done in a separate change. |
This PR moves the Freeze-Period verification from the Jenkins build to a dedicated reusable workflow to get more detailed/clear PR checks as I have suggested on the Mailing-Lists.
All repositories that require the code-freeze check can add the following file named
.github/workflows/verifyFreezePeriod.yml
:And can remove remove the
Check freeze period
stage from their Jenkins file.The only problem at the moment is, although the calendar is publicly readable, querying the Google Calendar-API requires an authentication for example via the Google-API-Key that is used with the current
verifyFreezePeriod.sh
script:https://developers.google.com/calendar/api/guides/auth
https://developers.google.com/calendar/api/v3/reference/events/list
So we either have to store Foundations Google-API-Key in the GitHub organization's secret store or have to avoid using the calendar-API.
I have never worked before with the Google-Calendar API and calenders in general and know almost nothing about it.
But this StackOverflow answer suggest to fetch the data through ical/xml/html:
https://stackoverflow.com/a/18303697
However the following link returns a
basic.ics
file with over 20.000 lines and events going back to 2007:https://calendar.google.com/calendar/ical/prfk26fdmpru1mptlb06p0jh4s%40group.calendar.google.com/public/basic.ics
Maybe this can searched with a more sophisticated RegEx, but I think there might be better solutions.
Can anybody, who is more proficient in this area, help in this regard.