Skip to content

coverage: add the needed CSS from the main site - #1947

Merged
mhdawson merged 2 commits into
nodejs:masterfrom
XhmikosR:master
Jan 30, 2020
Merged

coverage: add the needed CSS from the main site#1947
mhdawson merged 2 commits into
nodejs:masterfrom
XhmikosR:master

Conversation

@XhmikosR

@XhmikosR XhmikosR commented Oct 9, 2019

Copy link
Copy Markdown
Contributor

This unties the site from the upstream CSS

I need some help actually copying the CSS file. Any help welcome.

Preview: https://relaxed-ptolemy-556131.netlify.com/

Refs nodejs/nodejs.org#2635

TODO:

  • Adapt the python script to copy styles.css too
  • Move the other assets too like favicons, logo etc?

Note that the CSS is only the required. Which means that if more elements are added at some point, their rules should be added manually here again.

@XhmikosR

Copy link
Copy Markdown
Contributor Author

Can someone help me out with the above 2 TODO? Mostly the python script change to include the new styles.css.

@XhmikosR

XhmikosR commented Oct 12, 2019

Copy link
Copy Markdown
Contributor Author

I still think we should also move the other assets like the logo and favicons so that this is completely independent from the main site. It will also be faster since there won't be any redirects.

Edit: we already changed this and we use the assets directly. Regardless this should be better, everything will be isolated.

@XhmikosR

Copy link
Copy Markdown
Contributor Author

@rvagg maybe you can give me a hand here?

@rvagg

rvagg commented Oct 15, 2019

Copy link
Copy Markdown
Member

python aint' my thing, the original author isn't around anymore, and we've lost a bunch of Python folks, so I'm not sure who else to call on other than @cclauss.

@XhmikosR

Copy link
Copy Markdown
Contributor Author

Can we get some help here please?

@cclauss

cclauss commented Oct 30, 2019

Copy link
Copy Markdown
Contributor

Adapt the python script to copy styles.css too

Which Python script?

@XhmikosR

Copy link
Copy Markdown
Contributor Author

@cclauss

cclauss commented Oct 30, 2019

Copy link
Copy Markdown
Contributor

Something like:

with open('jenkins/scripts/coverage/styles.css') as in_file:
  with open('out/styles.css') as out_file:
    out_file.write(in_file.read())

@XhmikosR

Copy link
Copy Markdown
Contributor Author

Can you push to this branch? People with push rights can push to a fork's PR branch.

I cannot try it nor confirm the fix, hence why I suggest someone else to do it.

@cclauss

cclauss commented Oct 30, 2019

Copy link
Copy Markdown
Contributor

That code seem like the desired functionality? I am on an iPhone so I will not push for several hours.

@XhmikosR

Copy link
Copy Markdown
Contributor Author

There's no hurry :) I just want someone to test this beforehand, and also take the responsibility of the change :P

@mhdawson

Copy link
Copy Markdown
Member

The similar change for benchmarking broken things because the SCP copies need to be updated as well. Just an FYI that before this lands we should double check if a similar change is needed.

.

@XhmikosR

Copy link
Copy Markdown
Contributor Author

So, any news? Anyone who can help with the python script?

@rvagg

rvagg commented Jan 1, 2020

Copy link
Copy Markdown
Member

@nodejs/coverage-admins @nodejs/testing we seem to have a void in our working knowledge of how coverage.nodejs.org is built and updated. benchmarking.nodejs.org is similar but gets more attention. This PR appears to be touching code that was originally authored by folks who are no longer with us or whose attention is elsewhere. Perhaps we need to do some more radical surgery here and replace what's being done here with code that more people understand and can maintain? (IMO the choice of Python for our tooling should be a last resort, we don't have many active folks who are handy enough with Python). Is coverage.nodejs.org even something that should be actively maintained as it is or are we migrating to this new third-party hosted tool?

@Trott

Trott commented Jan 1, 2020

Copy link
Copy Markdown
Member

Is coverage.nodejs.org even something that should be actively maintained as it is or are we migrating to this new third-party hosted tool?

I think we need to keep it for a while, although it would be nice to eventually rely on codecov.io instead, I think. @bcoe

@cclauss

cclauss commented Jan 1, 2020

Copy link
Copy Markdown
Contributor

Sorry. I will complete this one.

I do agree that in general we should keep converting Python code to JS code.

@XhmikosR

XhmikosR commented Jan 1, 2020

Copy link
Copy Markdown
Contributor Author

Should I move the rest of the assets like favicons to the repo too?

@bcoe

bcoe commented Jan 2, 2020

Copy link
Copy Markdown

@rvagg @Trott I think we can consider migrating to codecov.io sometime in the new year, but there are a few bugs on their end that I'm working with them to sort out:

  1. we don't yet see block level coverage.
  2. we need to figure out how to combine our C++ and JavaScript coverage output (this feature might already exist, but @Trott and need to wire it up).
  3. it seems like we lose line counts when reports are merged, it would be nice if we could see both how many times a line is executed, and which uploaded coverage it's executed for.

CC: @thomasrockhu, do you think you'll have any cycles in the new year to address the block coverage issues?

@Trott

Trott commented Jan 16, 2020

Copy link
Copy Markdown
Member

This is blocking other work (particularly nodejs/nodejs.org#2635) so I'm adding to the meeting agenda in the hopes that we can move this forward.

This unties the site from the upstream CSS
@XhmikosR

Copy link
Copy Markdown
Contributor Author

Do note that the current live site on https://coverage.nodejs.org has its footer broken already.

@XhmikosR
XhmikosR marked this pull request as ready for review January 25, 2020 09:32
@sam-github

Copy link
Copy Markdown
Contributor

I'm not clear on what it takes to move this forward, or who is involved with it.

@mhdawson do you know who uses coverage? Does this help? Can we give someone who is interested enough permissions to maintain it, like @XhmikosR ?

@XhmikosR

Copy link
Copy Markdown
Contributor Author

I don't want to maintain it :P

This is just the proper way moving forward so that child sites do not use the upstream CSS thus avoiding breakage.

This patch just needs a few lines in the python script to copy the newly added styles.css file.

Personally, I'd even add all the assets like the favicons too, but that's for another day.

@sam-github

Copy link
Copy Markdown
Contributor

So, I've never personally looked at the coverage site (until an hour ago). I've no idea who maintains it, or how it works, what a "child site" is, what the "upstream CSS" is, or what would happen if this PR merged (if anything, maybe some kind of follow steps are needed?).

I'm sorry, I'm sure that is not so satisfying, but basically, you'll need to find someone who is involved with maintaining that site to review this. Do you know who the right person to bug is?

If the site isn't maintained by anybody, it unfortunately might need to be removed, or just left as-is if it offers some value.

@XhmikosR

Copy link
Copy Markdown
Contributor Author

I don't understand why "I" have to do all this?

I simply submitted a patch to fix something that's known to break.

I don't have the time nor the knowledge to do something more.

@cclauss

cclauss commented Jan 28, 2020

Copy link
Copy Markdown
Contributor

@XhmikosR I can not push to your fork but if you can please paste this code just above line 6 of the Python file? We can then see if that achieves your objective.

@XhmikosR

XhmikosR commented Jan 28, 2020 via email

Copy link
Copy Markdown
Contributor Author

@cclauss

cclauss commented Jan 28, 2020

Copy link
Copy Markdown
Contributor

I am not in @nodejs/build but I believe that you and I can work this together.

@XhmikosR

Copy link
Copy Markdown
Contributor Author

@cclauss done, can you test it?

@cclauss

cclauss commented Jan 29, 2020

Copy link
Copy Markdown
Contributor

It is not clear to me how to test this because jenkins/scripts/coverage/generate-index-html.py needs to be executed in a Jenkins run and this PR only does GitHub Action runs, not Jenkins runs.

Ideas from the others on how to test this change?

@rvagg

rvagg commented Jan 30, 2020

Copy link
Copy Markdown
Member

this thread keeps on making it clear that there is no owner for this stuff. It's probably time to remove all of the scripting, and probably styling (directory listings are perfectly usable), from it, anything that carries a maintenance burden that there's nobody to shoulder.

@XhmikosR

Copy link
Copy Markdown
Contributor Author

Maybe @mhdawson knows more?

Either way, this patch is a good change for as you can see the current live site has its footer already broken.

@mhdawson

Copy link
Copy Markdown
Member

I don't really think we need to go deleting things. The main reason I've not landed this is that nothing is currently broken, the PR is a suggested improvement.

When I land I want to have time to validate things are ok. That has just not lined up in terms of having to do it at a good time, and since nothing is actually broken I've not made it a priority.

@mhdawson

mhdawson commented Jan 30, 2020

Copy link
Copy Markdown
Member

Landing this may just work, but will have to check first it the scripts copy everything from the directory of specific files.

To be honest given that the end goal is to migrate to codecov.io I'd prefer to just leave things as are as opposed to having to spend time to update and possibly investigate if things are broken.

@mhdawson

Copy link
Copy Markdown
Member

I'll also add that I've not been completely ignoring the coverage site as I recently did a cleanup after it was reported that we were not getting data...

@cclauss

cclauss commented Jan 30, 2020

Copy link
Copy Markdown
Contributor

What was #1947 (comment) all about??

@mhdawson

Copy link
Copy Markdown
Member

@cclauss that is newish info that I'd not picked up.

@mhdawson

Copy link
Copy Markdown
Member

I just checked and the full out directory should be copied over. That means that this should likely be ok.

Given that I suggest we just land and then check its ok (I think it runs 4 times a day from the cron job). Not a great time since tomorrow is my last day before heading off on vacation but I assume somebody else can back it out if there is a problem and I can't get to it.

@mhdawson mhdawson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@mhdawson
mhdawson merged commit 238656b into nodejs:master Jan 30, 2020
@mhdawson

Copy link
Copy Markdown
Member

Coverage run so that we find out if its ok sooner than later: https://ci.nodejs.org/view/Node.js%20Daily/job/node-test-commit-linux-coverage-daily/415/

@mhdawson

Copy link
Copy Markdown
Member

The copy failed unfortunately. Going to move copy of styles file to the ci job instead.

@mhdawson

Copy link
Copy Markdown
Member

@mhdawson

Copy link
Copy Markdown
Member

One more time after tweaking job to get the copy to the right directory: https://ci.nodejs.org/view/Node.js%20Daily/job/node-test-commit-linux-coverage-daily/417/

@mhdawson

Copy link
Copy Markdown
Member

All good now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants