-
Notifications
You must be signed in to change notification settings - Fork 3
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
Gitlab Presentation Task #89
Comments
For step 1, python-gitlab (which we are exploring also in other projects) may be helpful. |
Hej @zklaus , |
Sounds fine. Since the target likely will be set in a single line of configuration somewhere, you might as well get on with it and just use a dedicated test project under your own account. Switching (to the main EC-Earth repo with a dedicated label or perhaps to a dedicated monitoring project with no associated repo) should be trivial, right? |
A first version of the Gitlab task works (with a private test repository I created) and I have created a draft PR #95 where we can discuss implementation-related questions. |
Note: I have stuck with the same concept as in Redmine, i.e., I assume that we just create issues for each experiment and this is what gets updated. |
Yes, will be easy! We just have to update the |
So I think we can just try amending the task with the file deletion feature in the API and test it for an example experiment? @uwefladrich what do you think? |
Just a quick shout out from the off before I unsubscribe here: You should also talk to Aitor, who has implemented something similar for HCLIM, iiuc. |
I absolutely agree, the issue approach has nice features! The discussion, but also that people usually know about issues, how to handle them, and have them generally in their workflow.
Some clarification: On Redmine, every issue page (as well as others) has a history, which says who and when things happened. This is at the bottom of the page, but usually hidden (actually by an optional plugin). You can click on "Show details" to see it. Hidden or not, the history entries are part of the HTML code that is sent to the local browser. Now the problem is that every individual(!) delete from each of the monitoring events will add a single history entry. The adding of new files (altogether) adds one more entry. So basically the pages has (number_of_plots x years) history entries. We have ~25..30 plots at the moment, so in a 500 year run this adds to O(10000) entries. The Redmine server does not have a problem with this. However, the local browser does. The page (i.e. the HTML code) is just huge and the rendering engine has a lot to do. This is the reason that the problem persists even when the page is loaded. It can happen even after a long time on the page that the browser freezes for some time when navigating the page. Now this may all be very specific for Redmine. So it is worth a try to just use the Gitlab APi and do things in the same way as for Redmine. It might not be the same outcome. But we should have a careful look to make sure we are not running into the same trouble eventually. Because it shows only up for long monitored runs.
This may be a good sign! |
I talked to Aitor. The approach is quite different, but maybe still interesting for our discussion. They do not use an API as such, but "automatic" commits and pushes to a dedicated repository. So the main monitoring page is the README of the repo and new plots and pages are pushed as new files as the experiments go. Also, they use a time-triggered approach (cron jobs) to update, not event-triggered, as we do. So maybe this is interesting in a broader discussion about what the best approach is, but not directly affecting this issue (which is dedicated to miming the Redmine approach). |
Okay, I have now looked around and it seems like it is still not possible to delete issue attachments as a regular user with the REST API in python-gitlab. From what I understand:
Both are indicated here. I have verified that
So, one option would be:
Note that GraphQL API support is in beta in python-gitlab. I think one of the consequences of this is that one has to manually provide these long query strings which are frankly quite terrible to work with? I don't know if this package is helpful in this context. See also the related discussion in the python-gitlab repository As an alternative to the second bullet point above, one could restrict GraphQL usage to the task of deleting attachments to stay in the nice world of objects that python-gitlab provides for working on projects/issues/uploads. |
I got here through a cross-reference in python-gitlab: just FYI file uploads can be manipulated with https://docs.gitlab.com/ee/api/project_markdown_uploads.html, just let us know if anything is missing in python-gitlab. The GraphQL client will probably be GA soon but I'm not sure if we'll want to build a custom DSL on top of the query building at the moment. |
Thanks for commenting! Yes I know, we have been using this feature. Our use case is that we would like to either replace the existing file (which is not possible since the destination path is generated when uploading) or delete the existing one when uploading a new one (which is only possible through the GraphQL, not the Rest API, and requires maintainer or owner status on the project).
Good to know, and makes sense! |
Since EC-Earth 4 is moving to Gitlab from Redmine, we want to prepare a new presentation task that can, at some point, replace the Redmine task.
This includes:
This issue is here to already discuss these aspects and document progress on the individual tasks.
The text was updated successfully, but these errors were encountered: