Skip to content
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

Only run "Debug Client" workflow on dev-2.x branch #6402

Open
wants to merge 2 commits into
base: dev-2.x
Choose a base branch
from

Conversation

t2gran
Copy link
Member

@t2gran t2gran commented Jan 22, 2025

Summary

This action is run today in entur downstream fork when someone changes a file under /client/**. The action is aborted, but it clutter up the list of run actions. I am not an expert on workflows, but I chaned it slightly so the trigger now filter on both path and branch for pushes. This also make the script a bit cleaner, since the branch filter does not need to be repeated in the run section.

Note! If you use dev-2.x in the fork as a active branch the this PR will not prevent this workflow from running, as @optionsome mentions in a comment below.

Issue

🟥 There is no issue for this.

Unit tests

🟥 This is CI config change, we do not have tests for this.

Documentation

🟥 I have not changed/added doc.

Changelog

🟥 Not relevant

Bumping the serialization version id

🟥 There is no changes to the OTP code.

@t2gran t2gran added this to the 2.7 (next release) milestone Jan 22, 2025
@t2gran t2gran requested a review from a team as a code owner January 22, 2025 15:05
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.84%. Comparing base (5ab75af) to head (6e5a95a).
Report is 122 commits behind head on dev-2.x.

Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #6402      +/-   ##
=============================================
+ Coverage      69.73%   69.84%   +0.10%     
- Complexity     18023    18123     +100     
=============================================
  Files           2057     2069      +12     
  Lines          76978    77268     +290     
  Branches        7845     7855      +10     
=============================================
+ Hits           53678    53964     +286     
+ Misses         20550    20547       -3     
- Partials        2750     2757       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@leonardehrenfried leonardehrenfried changed the title Prevent this action from showing up in forked OTP projects Prevent debug UI action from showing up in forked OTP projects Jan 24, 2025
Copy link
Member

@optionsome optionsome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title is slightly misleading as this only prevents the workflow being run in a fork if the fork doesn't use the same branch naming convention as upstream. Unfortunately I don't think there is a way to define on which repositories the action should run on (apart from the repository owner check that we already do here but with that solution the workflow still starts but is then aborted).

.github/workflows/debug-client.yml Show resolved Hide resolved
@t2gran t2gran added the Entur Test This is currently being tested at Entur label Jan 28, 2025
@t2gran t2gran changed the title Prevent debug UI action from showing up in forked OTP projects Prevent Debug UI action from showing up in forked OTP projects Jan 29, 2025
@t2gran
Copy link
Member Author

t2gran commented Jan 29, 2025

In general I would recommend using a different name to the master/development branch in a fork - to avoid misstakes. For example will git automatically set the upstream repository matching the branch name in some cases. This could lead to pushing changes to the wrong repository.

We reasently switch over pipeline from a fork of HSLs repo to using the main opentripplanner repo and changing the entur release branch from entur_develop to main - this switch was surprisingly easy and fast to do.

@t2gran t2gran changed the title Prevent Debug UI action from showing up in forked OTP projects Only run "Debug Client" workflow on dev-2.x branch Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Entur Test This is currently being tested at Entur Skip Changelog Technical Debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants