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

Bump and unify PDM in the api/ and indexer_worker/ to 2.21 #5250

Merged
merged 5 commits into from
Dec 5, 2024
Merged

Conversation

krysal
Copy link
Member

@krysal krysal commented Dec 4, 2024

Description

Follows the series of dependency updates covering Renovate missings.

Testing Instructions

Confirm the API continues to run normally. Watch the CI workflow passing.

Checklist

  • My pull request has a descriptive title (not a vague title likeUpdate index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.
  • I ran the DAG documentation generator (ov just catalog/generate-docs for catalog
    PRs) or the media properties generator (ov just catalog/generate-docs media-props
    for the catalog or ov just api/generate-docs for the API) where applicable.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@krysal krysal added 🟨 priority: medium Not blocking but should be addressed soon 💻 aspect: code Concerns the software code in the repository dependencies Pull requests that update a dependency file 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🧱 stack: api Related to the Django API labels Dec 4, 2024
@krysal krysal requested review from a team as code owners December 4, 2024 16:38
@krysal krysal requested review from obulat and dhruvkb and removed request for a team December 4, 2024 16:38
Base automatically changed from bump_2 to main December 4, 2024 18:21
Copy link
Collaborator

@AetherUnbound AetherUnbound left a comment

Choose a reason for hiding this comment

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

One note on version placement, but otherwise this works locally for me and looks good!

api/Dockerfile Outdated
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& pip install pdm~=2.19
&& pip install --upgrade pip \
&& pip install pdm~=2.21
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have the Python version defined as API_PY_VERSION on Line 5, does it maybe make sense to make this package version an similar argument in the same place in the Dockerfile? Even if it just has a default to the pinned version.

Copy link
Member

Choose a reason for hiding this comment

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

That makes sense, it would also make it easier to bump PDM everywhere by changing it in one place!

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried to do that and pass the version from the just file (then compose.yml -> Dockerfile), but it wasn't taking the value from the env var. As you suggest, I can add it here anyway with the default value. It would make it easy to find the values to replace later!

Copy link
Member

@dhruvkb dhruvkb left a comment

Choose a reason for hiding this comment

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

Approving this, but with a +1 to @AetherUnbound's idea. Up to you if you want to pursue that as a separate PR.

@krysal krysal requested a review from a team as a code owner December 5, 2024 15:24
@krysal krysal removed request for obulat and a team December 5, 2024 15:48
@krysal
Copy link
Member Author

krysal commented Dec 5, 2024

Folks, I managed to centralize the version in an env var from the justfile. It was all about the placement since, in the Dockerfile, each FROM line starts a new image and resets the build environment. I was placing it in the previous context. Thanks for making the suggestion! This is a much better solution 😄

Copy link

github-actions bot commented Dec 5, 2024

Latest k6 run output1

     ✓ status was 200

     checks.........................: 100.00% ✓ 410      ✗ 0   
     data_received..................: 96 MB   398 kB/s
     data_sent......................: 54 kB   223 B/s
     http_req_blocked...............: avg=33.77µs  min=2.42µs   med=4.67µs   max=290.03µs p(90)=146.7µs  p(95)=167.14µs
     http_req_connecting............: avg=20.88µs  min=0s       med=0s       max=229.7µs  p(90)=99.86µs  p(95)=115.54µs
     http_req_duration..............: avg=207.16ms min=30.54ms  med=166.71ms max=1.4s     p(90)=364.23ms p(95)=413.72ms
       { expected_response:true }...: avg=207.16ms min=30.54ms  med=166.71ms max=1.4s     p(90)=364.23ms p(95)=413.72ms
   ✓ http_req_failed................: 0.00%   ✓ 0        ✗ 410 
     http_req_receiving.............: avg=161.49µs min=60.06µs  med=135.29µs max=567.96µs p(90)=270.42µs p(95)=351.14µs
     http_req_sending...............: avg=26.8µs   min=9.31µs   med=22.74µs  max=1.12ms   p(90)=36.27µs  p(95)=40.99µs 
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=206.97ms min=30.45ms  med=166.51ms max=1.4s     p(90)=363.82ms p(95)=413.36ms
     http_reqs......................: 410     1.700716/s
     iteration_duration.............: avg=1.1s     min=547.21ms med=1.16s    max=2.52s    p(90)=1.47s    p(95)=1.86s   
     iterations.....................: 77      0.319403/s
     vus............................: 2       min=0      max=6 
     vus_max........................: 60      min=60     max=60

Footnotes

  1. This comment will automatically update with new output each time k6 runs for this PR

Copy link
Member

@dhruvkb dhruvkb left a comment

Choose a reason for hiding this comment

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

This is great!

We will need to manually remember to update PDM from time to time because Renovate would not look for the version number in justfile.

@krysal
Copy link
Member Author

krysal commented Dec 5, 2024

@dhruvkb Correct, the same situation as currently because renovate wasn't updating PDM anyway.

@krysal krysal merged commit 81f0edb into main Dec 5, 2024
55 checks passed
@krysal krysal deleted the bump_3_pdm branch December 5, 2024 17:54
@dhruvkb
Copy link
Member

dhruvkb commented Dec 5, 2024

True, that was just a mental note and not even remotely a critique of this PR.

@AetherUnbound
Copy link
Collaborator

Ahhh, that's excellent! I'm glad it was possible to centralize that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository dependencies Pull requests that update a dependency file 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: api Related to the Django API
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants