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

ci: fix broken CI pipeline #95

Merged
merged 2 commits into from
Dec 19, 2024
Merged

ci: fix broken CI pipeline #95

merged 2 commits into from
Dec 19, 2024

Conversation

JaeAeich
Copy link
Contributor

@JaeAeich JaeAeich commented Dec 19, 2024

Summary by Sourcery

Update Docker Compose command, pin pip version to <24.1, and add type hints.

Build:

  • Pin pip version to <24.1 in the build process.

Pinning pip version because of dependency resolution issues in CI, since sooner or later this will be revisited and updated with pyproject, that will eventually update all the deps.

Chores:

  • Update the Docker Compose command to use the new syntax.
  • Add type hints to improve code maintainability.

Copy link

sourcery-ai bot commented Dec 19, 2024

Reviewer's Guide by Sourcery

This pull request deprecates the use of docker-compose in favor of docker compose and adds type hints to the _validate_run_request function. It also pins the foca dependency to version 0.12.1.

Sequence diagram for CI/CD workflow changes

sequenceDiagram
    participant GH as GitHub Actions
    participant Docker as Docker
    participant App as Application

    Note over GH: Updated deployment flow
    GH->>Docker: docker compose up -d --build
    Note right of Docker: Replaced 'docker-compose' with 'docker compose'
    Docker->>App: Build and start containers
    GH->>App: Wait 20s for startup
    GH->>App: Probe endpoint
Loading

Class diagram showing type hint addition to _validate_run_request

classDiagram
    class RunRequest {
        +validate()
    }
    class dict_atomic {
        <<dict>>
        +str key
        +Any value
    }
    note for dict_atomic "Added type hint: dict"
    RunRequest ..> dict_atomic: uses
Loading

File-Level Changes

Change Details Files
Replaced docker-compose with docker compose.
  • Updated the deployment script to use docker compose instead of docker-compose.
.github/workflows/main.yml
Added type hints to the _validate_run_request function.
  • Added type hints to the dict_atomic variable, specifying it as a dictionary.
pro_wes/ga4gh/wes/workflow_runs.py
Pinned the foca dependency to version 0.12.1.
  • Changed the foca dependency from >=0.12.1 to ==0.12.1.
requirements.txt

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @JaeAeich - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider splitting different types of changes (type hints, dependency updates, docker compose changes) into separate PRs for better review granularity
  • What's the rationale for strictly pinning foca to version 0.12.1? Using exact version pinning (==) instead of minimum version (>=) can make security updates more difficult
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@JaeAeich
Copy link
Contributor Author

@sourcery-ai review

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @JaeAeich - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider explaining the rationale for pinning pip to version <24.1 in the PR description. If this is addressing a specific issue, it might be better to fix the root cause rather than artificially constraining the pip version.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@JaeAeich JaeAeich requested a review from uniqueg December 19, 2024 14:50
@uniqueg
Copy link
Member

uniqueg commented Dec 19, 2024

Hey @JaeAeich - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider splitting different types of changes (type hints, dependency updates, docker compose changes) into separate PRs for better review granularity
  • What's the rationale for strictly pinning foca to version 0.12.1? Using exact version pinning (==) instead of minimum version (>=) can make security updates more difficult
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Generally a good comment, but in this case, we want to repair a broken CI because of outdated code. It makes sense to do so in one PR, especially since the changes are small.

@uniqueg
Copy link
Member

uniqueg commented Dec 19, 2024

Hey @JaeAeich - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider explaining the rationale for pinning pip to version <24.1 in the PR description. If this is addressing a specific issue, it might be better to fix the root cause rather than artificially constraining the pip version.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

It may indeed be good to explain this. But no, we're gonna stick with the workaround for now.

Copy link
Member

@uniqueg uniqueg left a comment

Choose a reason for hiding this comment

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

Thanks for splitting up the PRs 👍 Please merge this first, then update the other PR.

And please address the one Sourcery comment by increasing your PR description (but that does not need re-review from my side).

@uniqueg uniqueg changed the title chore: depricate docker-compose, lint and type hint ci: fix broken CI pipeline Dec 19, 2024
@JaeAeich
Copy link
Contributor Author

Consider explaining the rationale for pinning pip to version <24.1 in the PR description. If this is addressing a specific issue, it might be better to fix the root cause rather than artificially constraining the pip version.

pining pip version because of dependency resolution issues in CI, since sooner or later this will be revisited and updated with pyproject, that will eventually update all the deps.

@JaeAeich JaeAeich merged commit bcf8d1d into dev Dec 19, 2024
3 checks passed
@JaeAeich JaeAeich deleted the minor branch December 19, 2024 17:37
@JaeAeich JaeAeich mentioned this pull request Dec 19, 2024
lvarin pushed a commit that referenced this pull request Jan 8, 2025
* minor changes

* pin pip version
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