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

Show a warning annotation when "master" branch usage is detected #270

Merged
merged 1 commit into from
Feb 11, 2024

Conversation

stronk7
Copy link
Member

@stronk7 stronk7 commented Feb 7, 2024

That way, both the web UI and the email from GitHub will show the recommendation about to move to the new "main" branch.

Also, unrelated, exclude some unreachable code from code coverage analysis.

Here there is an example to show how the annotation looks like (at the bottom):

https://github.com/stronk7/moodle-plugin-ci/actions/runs/7812729398

Note that an unrelated 2nd commit has been added about to try to keep Travis working, because it has started to fail recently (maybe they changed the PostgreSQL ports again, grrr).

Copy link

codecov bot commented Feb 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8124fe7) 84.77% compared to head (28605ed) 85.10%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #270      +/-   ##
============================================
+ Coverage     84.77%   85.10%   +0.33%     
- Complexity      720      722       +2     
============================================
  Files            75       75              
  Lines          2226     2216      -10     
============================================
- Hits           1887     1886       -1     
+ Misses          339      330       -9     

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

@stronk7 stronk7 force-pushed the warn_on_master_usage branch 4 times, most recently from 6dd9178 to 25276e2 Compare February 7, 2024 10:11
@stronk7
Copy link
Member Author

stronk7 commented Feb 7, 2024

Side note, I'm not sure what's going with Travis since 1-2 weeks ago, maybe they are upgrading their environments because all our PostgreSQL related tests are failing with different errors (not package available, not running @ port xxxx, ...).

I'll take a look to that, but apart from this issue, just sharing why it's failing.

Ciao :-)

@stronk7 stronk7 marked this pull request as ready for review February 7, 2024 10:38
@stronk7
Copy link
Member Author

stronk7 commented Feb 7, 2024

Other than that, I think this is ready for review as far as it seems to be working ok. Feel free to suggest a better wording or whatever (I'm not good there!).

Ciao :-)

@stronk7 stronk7 marked this pull request as draft February 8, 2024 10:52
@stronk7
Copy link
Member Author

stronk7 commented Feb 8, 2024

Ok,

confirmed, Travis has changed PostgreSQL default port from the exceptional 5432 that it had since last year to the usual 5433 that they have for all versions since v10.

This run (that uses the 2nd commit added here) is now running ok:

https://app.travis-ci.com/github/moodlehq/moodle-plugin-ci/builds/268805831

So, if we get everything green, we can go with this. 2 issues fixed in 1 PR.

Ciao :-)

@stronk7 stronk7 force-pushed the warn_on_master_usage branch from ec2171c to 9d261ff Compare February 8, 2024 11:05
@stronk7 stronk7 marked this pull request as ready for review February 8, 2024 11:37
@stronk7 stronk7 force-pushed the warn_on_master_usage branch from 9d261ff to 9d29aa1 Compare February 8, 2024 13:04
@stronk7
Copy link
Member Author

stronk7 commented Feb 8, 2024

Grrr, it's flip.flopping (the PostgreSQL 13 port). Last run failed with the change back to 5433. And now it's showing 5432 again:

$ ls -al /var/run/postgres*
total 8
drwxrwsr-x  3 postgres postgres  120 Feb  8 15:42 .
drwxr-xr-x 34 root     root     1100 Feb  8 15:42 ..
drwxr-s---  2 postgres postgres   80 Feb  8 15:42 13-main.pg_stat_tmp
-rw-r--r--  1 postgres postgres    5 Feb  8 15:42 13-main.pid
srwxrwxrwx  1 postgres postgres    0 Feb  8 15:42 .s.PGSQL.5432
-rw-------  1 postgres postgres   69 Feb  8 15:42 .s.PGSQL.5432.lock

(yesterday it was showing 5433, that's the reason I added the 2nd commit)

I'm going to switch back to 5432, removing the second commit in this PR and doing a few more tests... grrr.

Ciao :-)

@stronk7 stronk7 force-pushed the warn_on_master_usage branch from 9d29aa1 to 25276e2 Compare February 8, 2024 16:22
That way, both the web UI and the email from GitHub will show
the recommendation about to move to the new "main" branch.

Also, unrelated, exclude some unreachable code from code coverage
analysis.
@stronk7 stronk7 force-pushed the warn_on_master_usage branch from 25276e2 to 28605ed Compare February 8, 2024 16:27
@stronk7
Copy link
Member Author

stronk7 commented Feb 8, 2024

Ok, back to port 5432 (the original one). Seems to be working now. What a waste of time!

Copy link
Member

@kabalin kabalin left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@stronk7
Copy link
Member Author

stronk7 commented Feb 11, 2024

Thanks Mr. @kabalin !

@stronk7 stronk7 merged commit d5d6054 into moodlehq:main Feb 11, 2024
18 checks passed
@stronk7 stronk7 deleted the warn_on_master_usage branch February 11, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants