Giter Site home page Giter Site logo

Comments (6)

sockeqwe avatar sockeqwe commented on May 30, 2024

from thecontext-podcast.

sockeqwe avatar sockeqwe commented on May 30, 2024

So I have played around with the idea of auto generating and validating stuff for podcast here: https://github.com/sockeqwe/gitpodcaster

@artem-zinnatullin do you think this is going in the right direction and we should investigate further on this approach?
Summary: idea is to define episodes as kotlin classes in a typesafe manner incl. show notes (as markdown). Workflow is currently the following:

  1. Record new episode
  2. Create new branch for new episode (forked from master)
  3. Create kotlin file for new episode with all episode data (guest, show notes, etc.). Commit and push this new file.
  4. Create pull request
  5. CI (travis) kicks in and evaluates file and generates feed.rss and shownotes.md and updates readme.md file. Travis will push those changes (generated files) back to same pull request branch, so that the auto generated / updated stuff can be reviewed as part of the pull requeat review.
  6. Other cohost reviews pull request (after CI completed) and merges into master (which means publishing) or requests changes.

Advantages of this approach:

  • automatic validation of Feed etc. Actually I would like to implement further checks like checking url's, auto download mp3 file of the episode to check for valid url and extract information like length (minutes / seconds) and size (bytes) for feed.rss
  • fully visible which changes has been made by CI and also reviewable in pull request.
  • changes by host can be made easily. I.e. fixing typo, because all files will be regenerated from scratch (not appending i.e. to feed.rss file). Just edit epsiode file, commit and push it.
  • "hotfixes" can be applied directly by hosts on master branch
  • Since everything is generated on the fly on each change, whole system is stateless which is nice and avoid struggling with "previous artifacts"

Disadvantages:

  • feed.rss have to be generated by scanning all episodes file. There is no "appending" option (or at least O can't think of a good idea how to implement such a mechanism). This means that also all urls also of old episodes etc. will be validated on each pull request while generating feed which seems like wasting time and resources. Maybe this can be fixed somehow (Im not sure how yet, maybe assigning id for each epsiode and keep track of latest episode and only validate that one, but seems error prone). Maybe we can detect via git which file has been changed to determine which epsiode should be evaluated (may require a naming convention for episode file in kotlin)
  • Automatically create github issue for discussion via CI is possible, however renaming of episodes might be challenging but still possible tho if keeping track of episodes (i.e. via episode id) works somehow.
  • after merged to master we also want to create a git tag and upload mp3 file to release section. This should be done by CI (automate all the things). However, that is not super easy because requires of keeping track which episode has been released. Might work by providing additional info for CI as commit message (like the id of the episode that has been released so that CI knows which episode should be uploaded to release section and which git tag).
  • I would also like to generate a small website (i.e. github page with jekyll) which might requires some "after merged to master action" as described in point above (git tag). I think such a little website would help a lot to reach mor listeners (i would like to add a very simple js web player to listen to the episode directly) and makes it easier to link to our podcast or a concrete episode (i.e. reddit, android weekly, etc.). Not sure how this could be implemented with our desired git flow / review process (maybe we don't want to review generated html at all).

While I really would like to automate all this things and integrate it with the git flow / pull request / review , I'm not sure if the current prototype implementation is going in the right direction. Unfortunately, I can't think of a better implementation right now. Any thoughts / ideas?

from thecontext-podcast.

artem-zinnatullin avatar artem-zinnatullin commented on May 30, 2024

Sorry that it took me so long to answer, here is the feedback:

I've cloned the repo and reviewed code, in general, I like the implementation, especially knowing our hugest constraint β€” podcast hosting as a git repo on GitHub.

I was mostly thinking about one thing β€” commiting autogenerated files into the repo, which is usually a wrong thing to do.

So I was looking into ways to migrate hosting of our rss feed files to some real hosting but since we can't change GitHub response for a particular file to a 301 HTTP redirect we only can automatically migrate iTunes listeners (and those who use apps that implement iTunes new-feed-url directive).

So knowing all that I think your implementation is good enough (we'll do some PRs haha) and should be used for new episodes! πŸŽ‰

from thecontext-podcast.

sockeqwe avatar sockeqwe commented on May 30, 2024

commiting autogenerated files into the repo, which is usually a wrong thing to do.

Agreed, this feels wrong. Maybe we should use master branch to only "host" generated files and a "develop" branch where we commit our episode kotlin files. Then we deploy this to master.
However, not sure how this could work exactly with pull request or to be more precise: when do we generate files? After the pull requst has accepted and merged to develop? So workflow like this:

  1. Create branch episodeXY (fork from develop branch)
  2. Create kotlin file for episodeXY, commit and create pull request for episodeXY. Target branch of pull request is develop.
  3. Our tool validates kotlin file for episodeXY, but doesn't generate files
  4. After reviewing and validation, pull request get merged on "develop" branch
  5. Our tool listens for commits on develop branch and generates files from it which then will be pushed to master branch

from thecontext-podcast.

artem-zinnatullin avatar artem-zinnatullin commented on May 30, 2024

Another option is to use this git repo as production deployed by git pushes with full history of what was deployed and another repo for just Kotlin source files.

So whenever we put a tag in another repo it launches CI that deploys generated files to this repo!

from thecontext-podcast.

sockeqwe avatar sockeqwe commented on May 30, 2024

from thecontext-podcast.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.