Skip to content

Keep workflows active #293

Open
Open

Description

@delucchi-cmu

Github will disable workflows for inactive projects, and a project goes inactive after 60 days with no commits.

This will stop smoke tests from detecting breaking changes from upstream package updates.

One solution (which I don't like, but I'm just leaving here to show there are automated solutions): https://github.com/marketplace/actions/keepalive-workflow

Alternatively, you have to pay attention to the github notifications and re-activate workflows each time you get an alert that they're being de-activated. From @DinoBektesevic:

Every 60 days or so without a commit, you just have to go to the actions tab and press "Enable worfklow" again. The issue I have with the automatic disable isn't that it happens it's that the notifications are by default enabled just for the person that made the workflow - not all "admins" or "maintainers" of the repo. This is how sometimes these things go by unnoticed unfortunately because people don't subscribe or watch the action (which I don't think you can do). There's an email GA that can be used as a replacement I believe.

Activity

  1. drewoldag commented on Nov 17, 2023

    @drewoldag
    Collaborator

    Long term maintainability is one of the selling points for using the Python Project Template. We should really try to find a way to keep the smoke test active in the long term.

  2. added this to the Release tag 2.0 milestone on Feb 1, 2024
  3. self-assigned this
    on Feb 1, 2024
  4. drewoldag commented on Feb 1, 2024

    @drewoldag
    Collaborator

    I've looked around, and it seems like the correct path forward that would allow users to be pretty long term hands off would be use a github action that pushes an empty commit to the repo.

    The github action mentioned in the first comment seems to be the most popular one that I've been able to find after searching around in the marketplace. Though to be fair, it's hard to find anything there.

    I've run some tests in my personal repo, and it seems ok. It does require the user to set a particular repository setting, which is just one more thing that a user has to do to get up and running.

    Aside from that though, inserting it into the smoke-test.yml file would be fairly straightforward.

    name: Unit test smoke test
    
    on:
    
      # Runs this workflow automatically
      schedule:
        - cron: 45 6 * * *
        
      # Allows you to run this workflow manually from the Actions tab
      workflow_dispatch:
    
    jobs:
      build:
    
        runs-on: ubuntu-latest
        strategy:
          matrix:
            python-version: ['3.8', '3.9', '3.10']
    
        steps:
        - uses: actions/checkout@v3
        - name: Set up Python ${{ matrix.python-version }}
          uses: actions/setup-python@v4
          with:
            python-version: ${{ matrix.python-version }}
        - name: Install dependencies
          run: |
            sudo apt-get update
            python -m pip install --upgrade pip
            pip install .
            pip install .[dev]
            if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
        - name: List dependencies
          run: |
            pip list
        - name: Run unit tests with pytest
          run: |
            python -m pytest
        - uses: gautamkrishnar/keepalive-workflow
          with:
            commit_message: Keeping project active with empty commit
            committer_username: keep-alive-bot
            committer_email: {user_email} # taken from the copier answers
    
  5. removed this from the Release tag 2.0 milestone on Feb 2, 2024
  6. hombit commented on Feb 4, 2024

    @hombit
    Contributor

    GitHub sends an email before disabling smoke tests, and this email has a big green link to a page with "Continue running workflow" button. Of course it is still easy to miss the email, but I believe it is not as bad as we expected it to be

  7. removed their assignment
    on Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions