Opened 11 months ago

Closed 7 months ago

Last modified 7 months ago

#30877 closed enhancement (worksforme)

Trac: Link to Github actions results, in particular for linters

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: website/wiki Keywords:
Cc: dimpase, chapoton, embray Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Follow-up from #30404 (Add pyright and pycodestyle checks as Github actions):

What is left to do is to add the integration of the github action output to trac. That can be done as follows:

  1. Sync trac branches to sagetrac-mirror (by post-commit hook)
  2. Activate github actions in the sagetrac-mirror github repo
  3. Add the following code to either the patchbot output or to the trac ticket header (next to the patchbot button)
    <a href="https://github.com/sagemath/sagetrac-mirror/actions?query=workflow%3ALint+branch%3BRANCH"><img src="https://github.com/sagemath/sagetrac-mirror/workflows/Lint/badge.svg?branch=BRANCH&event=push"/></a>
    

Here BRANCH needs to be replaced by the branch. Giving something similar to

https://github.com/tobiasdiez/sage/workflows/Lint/badge.svg

As this requires rights to the github repo and trac config, I cannot do this and have to leave it to somebody else.

Change History (27)

comment:2 follow-up: Changed 10 months ago by gh-tobiasdiez

Thanks chapton for the pointer! Based on your code, I've added a badge for github as well: https://github.com/sagemath/sage_trac_plugin/pull/22

@dimpase could you please extend the post-commit hook to push to include github as well. That would be awesome! Thanks.

comment:3 in reply to: ↑ 2 ; follow-up: Changed 10 months ago by dimpase

Replying to gh-tobiasdiez:

Thanks chapton for the pointer! Based on your code, I've added a badge for github as well: https://github.com/sagemath/sage_trac_plugin/pull/22

@dimpase could you please extend the post-commit hook to push to include github as well. That would be awesome! Thanks.

I'm trying to re-create a mirror on github atm. Our repo apparently has too many branches for GH to take it in one go. So it has to go branch by branch, tag by tag...

comment:4 in reply to: ↑ 3 ; follow-up: Changed 10 months ago by gh-tobiasdiez

Replying to dimpase:

I'm trying to re-create a mirror on github atm. Our repo apparently has too many branches for GH to take it in one go. So it has to go branch by branch, tag by tag...

Thanks a lot! It appears the initial sync was successful but it stopped pushing further updates to github about 8 days ago.

It would also be great if you could activate the github actions in the sagetrac mirror.

comment:5 Changed 10 months ago by gh-tobiasdiez

  • Cc embray added

comment:6 in reply to: ↑ 4 Changed 10 months ago by dimpase

Replying to gh-tobiasdiez:

Replying to dimpase:

I'm trying to re-create a mirror on github atm. Our repo apparently has too many branches for GH to take it in one go. So it has to go branch by branch, tag by tag...

Thanks a lot! It appears the initial sync was successful but it stopped pushing further updates to github about 8 days ago.

OK, I've finally got around to install the hook to actually do the mirror-pushing, it seems to work now.

It would also be great if you could activate the github actions in the sagetrac mirror.

All actions? I've done this for the time being, so it's active now, but perhaps we need to look into trimming the list.

Last edited 10 months ago by dimpase (previous) (diff)

comment:7 Changed 10 months ago by gh-tobiasdiez

  • Status changed from new to needs_review

Nice! After #30404 and #30910, the only github actions that should run after a push are the linter tests (that only take a couple of min).

So, the only thing left is to review and merge https://github.com/sagemath/sage_trac_plugin/pull/22, so I'll put this ticket on "ready-for-review" now.

comment:8 Changed 10 months ago by dimpase

I don't understand how sage_trac_plugin is supposed to be doing anything here. There is something to be done on trac server, yes...

comment:9 follow-up: Changed 10 months ago by gh-tobiasdiez

To my understanding the sage_trac_plugin handles the sage-specific customization of trac. Isn't this the case?

comment:10 in reply to: ↑ 9 Changed 10 months ago by dimpase

  • Status changed from needs_review to needs_work

Replying to gh-tobiasdiez:

To my understanding the sage_trac_plugin handles the sage-specific customization of trac. Isn't this the case?

sage_trac_plugin is a client (mostly a git extension, with various addons to deal with trac tickets).

It does have a kind of GitLab integration (used by the release manager, I suppose),

  • this integration does autoimatic opening/managing of trac tickets for MRs on GitLab.

Anything added there would only affect trac tickets opened via GitLab, I guess.

I don't think there is a config for our trac server maintained as a git repo anywhere. (At least I don't know).

comment:11 follow-up: Changed 10 months ago by dimpase

GitHub's "select actions to allow" looks like

Allow specified actions
Enter a comma-separated list of actions

...

Wildcards, tags, and SHAs are allowed. Examples: monalisa/octocat@*, monalisa/octocat@v2, monalisa/*

Could you provide a list of actions to enable this way, in this format?

comment:12 follow-up: Changed 10 months ago by dimpase

I'm stopping the actions for now, as now pushes to trac git trigger a full Actions testsuite.

comment:13 in reply to: ↑ 11 ; follow-up: Changed 10 months ago by gh-tobiasdiez

Replying to dimpase:

GitHub's "select actions to allow" looks like ... Could you provide a list of actions to enable this way, in this format?

To my knowledge, that's for specifying which actions are allowed in the workflows (i.e. as steps in the workflow, e.g. checkout), but not the workflows itself. The trigger for the workflows are specified at the beginning of the workflow file.

comment:14 in reply to: ↑ 12 ; follow-up: Changed 10 months ago by gh-tobiasdiez

Replying to dimpase:

I'm stopping the actions for now, as now pushes to trac git trigger a full Actions testsuite.

Which testsuites were triggered? I looked at it yesterday and it was only the WSL one, which is deactivated with #30910.

comment:15 in reply to: ↑ 14 Changed 10 months ago by dimpase

Replying to gh-tobiasdiez:

Replying to dimpase:

I'm stopping the actions for now, as now pushes to trac git trigger a full Actions testsuite.

Which testsuites were triggered? I looked at it yesterday and it was only the WSL one, which is deactivated with #30910.

that's right, only Build & Test WSL were activated. Should we wait for #30910 to be merged?

comment:16 in reply to: ↑ 13 ; follow-up: Changed 10 months ago by dimpase

Replying to gh-tobiasdiez:

Replying to dimpase:

GitHub's "select actions to allow" looks like ... Could you provide a list of actions to enable this way, in this format?

To my knowledge, that's for specifying which actions are allowed in the workflows (i.e. as steps in the workflow, e.g. checkout), but not the workflows itself. The trigger for the workflows are specified at the beginning of the workflow file.

well, you know much more about Actions than me. Are you saying that after #30910, and #30404, if we enable all actions on the repo, then only linters will be run?

comment:17 in reply to: ↑ 16 Changed 10 months ago by gh-tobiasdiez

Replying to dimpase:

well, you know much more about Actions than me. Are you saying that after #30910, and #30404, if we enable all actions on the repo, then only linters will be run?

Yes, the linters are then the only workflows that run on push. It's a good idea to wait until #30910 is merged to reenable the actions.

Is there something I can help with concerning the trac modifications that are necessary? Who would be the right person to talk with about these things?

comment:18 Changed 10 months ago by dimpase

@embray (in cc on this ticket, I also sent an email) knows all about the settings of trac, and I just spent some time looking at the configs etc there, but could not see where the structure of the ticket page is set up.

comment:19 Changed 10 months ago by dimpase

  • Milestone changed from sage-wishlist to sage-9.3

comment:20 follow-up: Changed 10 months ago by gh-tobiasdiez

@dimpase, #30910 is now merged so it should be ok to activate the github actions again (some older branches might still trigger this workflow, but that shouldn't be a problem). Thanks!

@embray, please let me know if I can help with the trac integration!

comment:21 in reply to: ↑ 20 Changed 10 months ago by dimpase

Replying to gh-tobiasdiez:

@dimpase, #30910 is now merged so it should be ok to activate the github actions again (some older branches might still trigger this workflow, but that shouldn't be a problem). Thanks!

ok, done.

comment:22 Changed 10 months ago by gh-tobiasdiez

Thanks!

comment:23 Changed 7 months ago by mkoeppe

  • Milestone changed from sage-9.3 to sage-9.4

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

comment:24 Changed 7 months ago by gh-tobiasdiez

  • Status changed from needs_work to positive_review

Thanks to embray, this is now implemented.

(Not sure what is the workflow for "resolved but doesn't need merge", so I'll set it simply to positive review.)

comment:25 Changed 7 months ago by embray

  • Milestone changed from sage-9.4 to sage-duplicate/invalid/wontfix
  • Resolution set to worksforme
  • Status changed from positive_review to closed

comment:26 follow-up: Changed 7 months ago by tmonteil

Does this mean that now Microsoft knows at what time i connect to trac, from which location, which tickets i am interested in, etc ?

If it is the case, i think this should be made optional and disabled by default, or the plugin should do some caching so that trac serves the picture, not github.

comment:27 in reply to: ↑ 26 Changed 7 months ago by embray

Replying to tmonteil:

Does this mean that now Microsoft knows at what time i connect to trac, from which location, which tickets i am interested in, etc ?

If it is the case, i think this should be made optional and disabled by default, or the plugin should do some caching so that trac serves the picture, not github.

Grains of sand on a beach. If you're that paranoid about it you can connect through an anonymous VPN and disable tracking cookies which I'm sure you (and I as well) already do.

Note: See TracTickets for help on using tickets.