adamburmister / gitprint.com

Render Github markdown documents for printing
345 stars 28 forks source link

An updated markdown file, it is not reflected on git print #41

Open jonleung opened 9 years ago

jonleung commented 9 years ago

See

https://github.com/jonleung/book-of-faces/blob/master/README.md

vs

http://gitprint.com/jonleung/book-of-faces/blob/master/README.md

davegoopot commented 9 years ago

If your request is for some way to overwrite the file then I have the same request. Here's my use case:

(1) Generate file PDF (2) Print file (3) Notice typo (4) Update github (5) Request the gitprint link again

Expected: Gitprint to notice that the github file version has changed and re-create the PDF Actual: Gitprint pulls the PDF from the disk cache which is now a stale version

adamburmister commented 9 years ago

The code should currently check the etags for the GitHub version... So I'm unsure what the root cause is here.

Sent from my iPhone

On Jun 12, 2015, at 2:07 PM, Dave Potts notifications@github.com wrote:

If your request is for some way to overwrite the file then I have the same request. Here's my use case:

(1) Generate file PDF (2) Print file (3) Notice typo (4) Update github (5) Request the gitprint link again

Expected: Gitprint to notice that the github file version has changed and re-create the PDF Actual: Gitprint pulls the PDF from the disk cache which is now a stale version

— Reply to this email directly or view it on GitHub.

davegoopot commented 9 years ago

So the ETAG is in the header from the GitHub page right? I'll see if I can get a mo to check that it is updated correctly.

Which github branch is running on the live server?

Dave.

On 12 June 2015 at 22:12, Adam Burmister notifications@github.com wrote:

The code should currently check the etags for the GitHub version... So I'm unsure what the root cause is here.

Sent from my iPhone

On Jun 12, 2015, at 2:07 PM, Dave Potts notifications@github.com wrote:

If your request is for some way to overwrite the file then I have the same request. Here's my use case:

(1) Generate file PDF (2) Print file (3) Notice typo (4) Update github (5) Request the gitprint link again

Expected: Gitprint to notice that the github file version has changed and re-create the PDF Actual: Gitprint pulls the PDF from the disk cache which is now a stale version

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111620418 .

adamburmister commented 9 years ago

It's been a while, but should be master

Sent from my iPhone

On Jun 12, 2015, at 2:23 PM, Dave Potts notifications@github.com wrote:

So the ETAG is in the header from the GitHub page right? I'll see if I can get a mo to check that it is updated correctly.

Which github branch is running on the live server?

Dave.

On 12 June 2015 at 22:12, Adam Burmister notifications@github.com wrote:

The code should currently check the etags for the GitHub version... So I'm unsure what the root cause is here.

Sent from my iPhone

On Jun 12, 2015, at 2:07 PM, Dave Potts notifications@github.com wrote:

If your request is for some way to overwrite the file then I have the same request. Here's my use case:

(1) Generate file PDF (2) Print file (3) Notice typo (4) Update github (5) Request the gitprint link again

Expected: Gitprint to notice that the github file version has changed and re-create the PDF Actual: Gitprint pulls the PDF from the disk cache which is now a stale version

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111620418 .

— Reply to this email directly or view it on GitHub.

davegoopot commented 9 years ago

I'm not seeing any etag header being set by github.

E.g. https://github.com/McrCoderDojo/MadLabMiners/blob/master/README.md

Dave.

On 12 June 2015 at 22:24, Adam Burmister notifications@github.com wrote:

It's been a while, but should be master

Sent from my iPhone

On Jun 12, 2015, at 2:23 PM, Dave Potts notifications@github.com wrote:

So the ETAG is in the header from the GitHub page right? I'll see if I can get a mo to check that it is updated correctly.

Which github branch is running on the live server?

Dave.

On 12 June 2015 at 22:12, Adam Burmister notifications@github.com wrote:

The code should currently check the etags for the GitHub version... So I'm unsure what the root cause is here.

Sent from my iPhone

On Jun 12, 2015, at 2:07 PM, Dave Potts notifications@github.com wrote:

If your request is for some way to overwrite the file then I have the same request. Here's my use case:

(1) Generate file PDF (2) Print file (3) Notice typo (4) Update github (5) Request the gitprint link again

Expected: Gitprint to notice that the github file version has changed and re-create the PDF Actual: Gitprint pulls the PDF from the disk cache which is now a stale version

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub < https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111620418

.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111622212 .

adamburmister commented 9 years ago

This is the check it's doing on the source file (not the same as the URL you posted above... we have to massage the URL to get the raw data file).

https://github.com/adamburmister/gitprint.com/blob/master/routes/index.js#L80

On 12 June 2015 at 14:39, Dave Potts notifications@github.com wrote:

I'm not seeing any etag header being set by github.

E.g. https://github.com/McrCoderDojo/MadLabMiners/blob/master/README.md

Dave.

On 12 June 2015 at 22:24, Adam Burmister notifications@github.com wrote:

It's been a while, but should be master

Sent from my iPhone

On Jun 12, 2015, at 2:23 PM, Dave Potts notifications@github.com wrote:

So the ETAG is in the header from the GitHub page right? I'll see if I can get a mo to check that it is updated correctly.

Which github branch is running on the live server?

Dave.

On 12 June 2015 at 22:12, Adam Burmister notifications@github.com wrote:

The code should currently check the etags for the GitHub version... So I'm unsure what the root cause is here.

Sent from my iPhone

On Jun 12, 2015, at 2:07 PM, Dave Potts notifications@github.com wrote:

If your request is for some way to overwrite the file then I have the same request. Here's my use case:

(1) Generate file PDF (2) Print file (3) Notice typo (4) Update github (5) Request the gitprint link again

Expected: Gitprint to notice that the github file version has changed and re-create the PDF Actual: Gitprint pulls the PDF from the disk cache which is now a stale version

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub <

https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111620418

.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub < https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111622212

.

— Reply to this email directly or view it on GitHub https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111625709 .

davegoopot commented 9 years ago

Ah, I see the etag in the raw version.

Now THIS is interesting: if I edit the md file using the Github web ui and commit the change I see the change in the regular URL but the GitHub raw link doesn't reflect the change. GitHub must be caching the raw response and not invalidating the cache on the change...or I've missed something.

Dave.

On 12 June 2015 at 22:48, Adam Burmister notifications@github.com wrote:

This is the check it's doing on the source file (not the same as the URL you posted above... we have to massage the URL to get the raw data file).

https://github.com/adamburmister/gitprint.com/blob/master/routes/index.js#L80

On 12 June 2015 at 14:39, Dave Potts notifications@github.com wrote:

I'm not seeing any etag header being set by github.

E.g. https://github.com/McrCoderDojo/MadLabMiners/blob/master/README.md

Dave.

On 12 June 2015 at 22:24, Adam Burmister notifications@github.com wrote:

It's been a while, but should be master

Sent from my iPhone

On Jun 12, 2015, at 2:23 PM, Dave Potts notifications@github.com wrote:

So the ETAG is in the header from the GitHub page right? I'll see if I can get a mo to check that it is updated correctly.

Which github branch is running on the live server?

Dave.

On 12 June 2015 at 22:12, Adam Burmister notifications@github.com wrote:

The code should currently check the etags for the GitHub version... So I'm unsure what the root cause is here.

Sent from my iPhone

On Jun 12, 2015, at 2:07 PM, Dave Potts < notifications@github.com> wrote:

If your request is for some way to overwrite the file then I have the same request. Here's my use case:

(1) Generate file PDF (2) Print file (3) Notice typo (4) Update github (5) Request the gitprint link again

Expected: Gitprint to notice that the github file version has changed and re-create the PDF Actual: Gitprint pulls the PDF from the disk cache which is now a stale version

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub <

https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111620418

.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub <

https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111622212

.

— Reply to this email directly or view it on GitHub < https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111625709

.

— Reply to this email directly or view it on GitHub https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111626997 .

adamburmister commented 9 years ago

It sounds like GitHub might have changed some behaviour then?

On 12 June 2015 at 14:54, Dave Potts notifications@github.com wrote:

Ah, I see the etag in the raw version.

Now THIS is interesting: if I edit the md file using the Github web ui and commit the change I see the change in the regular URL but the GitHub raw link doesn't reflect the change. GitHub must be caching the raw response and not invalidating the cache on the change...or I've missed something.

Dave.

On 12 June 2015 at 22:48, Adam Burmister notifications@github.com wrote:

This is the check it's doing on the source file (not the same as the URL you posted above... we have to massage the URL to get the raw data file).

https://github.com/adamburmister/gitprint.com/blob/master/routes/index.js#L80

On 12 June 2015 at 14:39, Dave Potts notifications@github.com wrote:

I'm not seeing any etag header being set by github.

E.g. https://github.com/McrCoderDojo/MadLabMiners/blob/master/README.md

Dave.

On 12 June 2015 at 22:24, Adam Burmister notifications@github.com wrote:

It's been a while, but should be master

Sent from my iPhone

On Jun 12, 2015, at 2:23 PM, Dave Potts notifications@github.com wrote:

So the ETAG is in the header from the GitHub page right? I'll see if I can get a mo to check that it is updated correctly.

Which github branch is running on the live server?

Dave.

On 12 June 2015 at 22:12, Adam Burmister <notifications@github.com

wrote:

The code should currently check the etags for the GitHub version... So I'm unsure what the root cause is here.

Sent from my iPhone

On Jun 12, 2015, at 2:07 PM, Dave Potts < notifications@github.com> wrote:

If your request is for some way to overwrite the file then I have the same request. Here's my use case:

(1) Generate file PDF (2) Print file (3) Notice typo (4) Update github (5) Request the gitprint link again

Expected: Gitprint to notice that the github file version has changed and re-create the PDF Actual: Gitprint pulls the PDF from the disk cache which is now a stale version

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub <

https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111620418

.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub <

https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111622212

.

— Reply to this email directly or view it on GitHub <

https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111625709

.

— Reply to this email directly or view it on GitHub < https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111626997

.

— Reply to this email directly or view it on GitHub https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111628275 .

davegoopot commented 9 years ago

By this morning it had updated. I had gone to bed last night so I don't know exactly how long it took. Certainly >5 mins delay between change to the git repo and the raw URL picking up the change.

Dave.

On 12 June 2015 at 23:00, Adam Burmister notifications@github.com wrote:

It sounds like GitHub might have changed some behaviour then?

On 12 June 2015 at 14:54, Dave Potts notifications@github.com wrote:

Ah, I see the etag in the raw version.

Now THIS is interesting: if I edit the md file using the Github web ui and commit the change I see the change in the regular URL but the GitHub raw link doesn't reflect the change. GitHub must be caching the raw response and not invalidating the cache on the change...or I've missed something.

Dave.

On 12 June 2015 at 22:48, Adam Burmister notifications@github.com wrote:

This is the check it's doing on the source file (not the same as the URL you posted above... we have to massage the URL to get the raw data file).

https://github.com/adamburmister/gitprint.com/blob/master/routes/index.js#L80

On 12 June 2015 at 14:39, Dave Potts notifications@github.com wrote:

I'm not seeing any etag header being set by github.

E.g. https://github.com/McrCoderDojo/MadLabMiners/blob/master/README.md

Dave.

On 12 June 2015 at 22:24, Adam Burmister notifications@github.com wrote:

It's been a while, but should be master

Sent from my iPhone

On Jun 12, 2015, at 2:23 PM, Dave Potts < notifications@github.com> wrote:

So the ETAG is in the header from the GitHub page right? I'll see if I can get a mo to check that it is updated correctly.

Which github branch is running on the live server?

Dave.

On 12 June 2015 at 22:12, Adam Burmister < notifications@github.com

wrote:

The code should currently check the etags for the GitHub version... So I'm unsure what the root cause is here.

Sent from my iPhone

On Jun 12, 2015, at 2:07 PM, Dave Potts < notifications@github.com> wrote:

If your request is for some way to overwrite the file then I have the same request. Here's my use case:

(1) Generate file PDF (2) Print file (3) Notice typo (4) Update github (5) Request the gitprint link again

Expected: Gitprint to notice that the github file version has changed and re-create the PDF Actual: Gitprint pulls the PDF from the disk cache which is now a stale version

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub <

https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111620418

.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHub <

https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111622212

.

— Reply to this email directly or view it on GitHub <

https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111625709

.

— Reply to this email directly or view it on GitHub <

https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111626997

.

— Reply to this email directly or view it on GitHub < https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111628275

.

— Reply to this email directly or view it on GitHub https://github.com/adamburmister/gitprint.com/issues/41#issuecomment-111629082 .