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

feat(#9): home endpoints #10

Merged
merged 10 commits into from
Jun 5, 2024
Merged

feat(#9): home endpoints #10

merged 10 commits into from
Jun 5, 2024

Conversation

h1alexbel
Copy link
Owner

@h1alexbel h1alexbel commented Jun 1, 2024

@l3r8yJ take a look, please

ref #9


PR-Codex overview

The focus of this PR is to add new dependencies, implement routes for home endpoints, and create error handling structures.

Detailed summary

  • Added serde_json dependency
  • Added axum and tokio dependencies
  • Implemented routes for home endpoints
  • Created error handling structures for route errors

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@h1alexbel h1alexbel requested a review from l3r8yJ June 1, 2024 09:58
Copy link
Collaborator

@l3r8yJ l3r8yJ left a comment

Choose a reason for hiding this comment

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

@h1alexbel i think that it would be better to move home.rs and rs_err.rs to different folders and include them from modules

clippy.toml Outdated
disallowed-names = ["not-jeff"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

@h1alexbel this one was like an example

Copy link
Owner Author

Choose a reason for hiding this comment

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

@l3r8yJ fixed

@h1alexbel h1alexbel requested a review from l3r8yJ June 1, 2024 12:04
Copy link
Collaborator

@l3r8yJ l3r8yJ left a comment

Choose a reason for hiding this comment

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

@h1alexbel looks good to me!

@h1alexbel
Copy link
Owner Author

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Jun 1, 2024

@rultor merge

@h1alexbel OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Jun 1, 2024

@rultor merge

@h1alexbel Oops, I failed. You can see the full log here (spent 10min)

Reading .yamllint.yml ...
    Updating crates.io index
 Downloading crates ...
  Downloaded hyper v1.3.1
  Downloaded httpdate v1.0.3
  Downloaded axum-core v0.4.3
  Downloaded num_cpus v1.16.0
  Downloaded futures-task v0.3.30
  Downloaded anyhow v1.0.86
  Downloaded tower-layer v0.3.2
  Downloaded pin-project-internal v1.1.5
  Downloaded futures-util v0.3.30
  Downloaded futures-core v0.3.30
  Downloaded httparse v1.8.0
  Downloaded pin-project-lite v0.2.14
  Downloaded tower-service v0.3.2
  Downloaded matchit v0.7.3
  Downloaded form_urlencoded v1.2.1
  Downloaded hyper-util v0.1.5
  Downloaded mime v0.3.17
  Downloaded rustversion v1.0.17
  Downloaded bytes v1.6.0
  Downloaded itoa v1.0.11
  Downloaded http-body-util v0.1.1
  Downloaded async-trait v0.1.80
  Downloaded fnv v1.0.7
  Downloaded quote v1.0.36
  Downloaded http-body v1.0.0
  Downloaded percent-encoding v2.3.1
  Downloaded log v0.4.21
  Downloaded ryu v1.0.18
  Downloaded memchr v2.7.2
  Downloaded proc-macro2 v1.0.84
  Downloaded serde v1.0.203
  Downloaded sync_wrapper v1.0.1
  Downloaded sync_wrapper v0.1.2
  Downloaded http v1.1.0
  Downloaded serde_path_to_error v0.1.16
  Downloaded mio v0.8.11
  Downloaded axum v0.7.5
  Downloaded once_cell v1.19.0
  Downloaded pin-utils v0.1.0
  Downloaded unicode-ident v1.0.12
  Downloaded pin-project v1.1.5
  Downloaded tokio-macros v2.3.0
  Downloaded serde_urlencoded v0.7.1
  Downloaded smallvec v1.13.2
  Downloaded futures-channel v0.3.30
  Downloaded serde_derive v1.0.203
  Downloaded socket2 v0.5.7
  Downloaded tracing v0.1.40
  Downloaded tracing-core v0.1.32
  Downloaded tower v0.4.13
  Downloaded serde_json v1.0.117
  Downloaded syn v2.0.66
  Downloaded tokio v1.38.0
  Downloaded libc v0.2.155
error: package `axum v0.7.5` cannot be built because it requires rustc 1.66 or newer, while the currently active rustc version is 1.63.0
container 6b03671e10d8743b3b0206ea116fd615e077280f354b309125cbbc17e8ab6c1b is dead
Sat Jun  1 15:25:06 UTC 2024

@l3r8yJ
Copy link
Collaborator

l3r8yJ commented Jun 1, 2024

blocked by #11

@h1alexbel
Copy link
Owner Author

h1alexbel commented Jun 1, 2024

@l3r8yJ can we try to install required rustc in install section right inside .rultor.yml?

@h1alexbel
Copy link
Owner Author

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Jun 2, 2024

@rultor merge

@h1alexbel OK, I'll try to merge now. You can check the progress of the merge here

@h1alexbel
Copy link
Owner Author

@rultor stop

@h1alexbel
Copy link
Owner Author

@rultor merge

@rultor
Copy link
Collaborator

rultor commented Jun 2, 2024

@rultor stop

@h1alexbel OK, I'll try to stop current task.

@rultor
Copy link
Collaborator

rultor commented Jun 2, 2024

@rultor stop

@h1alexbel Sorry, I failed to stop the previous command, however it has the following result: Oops, I failed. You can see the full log here (spent 2hr)

set -o pipefail
if [ -e /home/r/.profile ]; then source /home/r/.profile; fi
shopt -s expand_aliases
alias 'sudo=sudo -i'
export HOME=/home/r
cd "${HOME}/repo"
export '[email protected]:h1alexbel/fakehub.git' ; export 'pull_id=10' ; export '[email protected]:h1alexbel/fakehub.git' ; export 'fork_branch=ghas' ; export 'head_branch=master' ; export 'pull_title=feat(#9): home endpoints' ; export 'author=h1alexbel' ; pdd --file=/dev/null ; sudo apt install rustc ; rustc -V ; cargo --color=never test -vv ; cargo --color=never fmt --check ; cargo doc --no-deps ; cargo clippy ;
+ su --login r --command /home/r/script.sh
Found 7 lines in /home/r/repo/.pdd
My version is 0.21.3
Ruby version is 2.7.0 at x86_64-linux
Reading from root dir .
Excluding target/**
Excluding xargs/**
/home/r/repo/resources/home.json is a binary file (2428 bytes)
/home/r/repo/.xcop is a binary file (0 bytes)
/home/r/repo/renovate.json is a binary file (106 bytes)
Reading .pdd ...
Reading src/main.rs ...
Reading src/routes/home.rs ...
Puzzle 9-8508d2b5 25/DEV at src/routes/home.rs
Reading src/routes/rs_err.rs ...
Reading src/routes/mod.rs ...
Reading clippy.toml ...
Reading .gitattributes ...
Reading .gitignore ...
Reading .github/workflows/reports-check.yml ...
Reading .github/workflows/license.yml ...
Reading .github/workflows/typos.yml ...
Reading .github/workflows/xcop.yml ...
Reading .github/workflows/actionlint.yml ...
Reading .github/workflows/yamllint.yml ...
Reading .github/workflows/year.yml ...
Reading .github/workflows/pdd.yml ...
Reading .github/workflows/cargo.yml ...
Reading README.md ...
Reading .rultor.yml ...
Reading Cargo.toml ...
Reading .markdownlint.yml ...
Reading .0pdd.yml ...
Reading LICENSE.txt ...
Reading .yamllint.yml ...

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 5%

Reading package lists... 5%

Reading package lists... 5%

Reading package lists... 5%

Reading package lists... 53%

Reading package lists... 53%

Reading package lists... 54%

Reading package lists... 54%

Reading package lists... 60%

Reading package lists... 65%

Reading package lists... 65%

Reading package lists... 72%

Reading package lists... 72%

Reading package lists... 77%

Reading package lists... 77%

Reading package lists... 77%

Reading package lists... 77%

Reading package lists... 78%

Reading package lists... 78%

Reading package lists... 78%

Reading package lists... 78%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 93%

Reading package lists... 93%

Reading package lists... 97%

Reading package lists... 97%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... Done


Building dependency tree... 0%

Building dependency tree... 0%

Building dependency tree... 50%

Building dependency tree... 50%

Building dependency tree       


Reading state information... 0%

Reading state information... 0%

Reading state information... Done

The following additional packages will be installed:
  libstd-rust-1.59 libstd-rust-dev
Suggested packages:
  cargo lld-13 clang-13
Recommended packages:
  llvm-13
The following NEW packages will be installed:
  libstd-rust-1.59 libstd-rust-dev rustc
0 upgraded, 3 newly installed, 0 to remove and 6 not upgraded.
Need to get 76.3 MB of archives.
After this operation, 349 MB of additional disk space will be used.
Do you want to continue? [Y/n] 11c3d63bbcb3c9596431127354c0a211faecc5a869b7b49a5e7a24691f936c2f
Error response from daemon: Cannot kill container: 11c3d63bbcb3c9596431127354c0a211faecc5a869b7b49a5e7a24691f936c2f: container 11c3d63bbcb3c9596431127354c0a211faecc5a869b7b49a5e7a24691f936c2f is not running
container 11c3d63bbcb3c9596431127354c0a211faecc5a869b7b49a5e7a24691f936c2f is dead
Sun Jun  2 12:13:08 UTC 2024

@rultor
Copy link
Collaborator

rultor commented Jun 2, 2024

@rultor merge

@h1alexbel OK, I'll try to merge now. You can check the progress of the merge here

@rultor
Copy link
Collaborator

rultor commented Jun 2, 2024

@rultor merge

@h1alexbel Oops, I failed. You can see the full log here (spent 8min)

My version is 0.21.3
Ruby version is 2.7.0 at x86_64-linux
Reading from root dir .
Excluding target/**
Excluding xargs/**
/home/r/repo/resources/home.json is a binary file (2428 bytes)
/home/r/repo/.xcop is a binary file (0 bytes)
/home/r/repo/renovate.json is a binary file (106 bytes)
Reading .pdd ...
Reading src/main.rs ...
Reading src/routes/home.rs ...
Puzzle 9-8508d2b5 25/DEV at src/routes/home.rs
Reading src/routes/rs_err.rs ...
Reading src/routes/mod.rs ...
Reading clippy.toml ...
Reading .gitattributes ...
Reading .gitignore ...
Reading .github/workflows/reports-check.yml ...
Reading .github/workflows/license.yml ...
Reading .github/workflows/typos.yml ...
Reading .github/workflows/xcop.yml ...
Reading .github/workflows/actionlint.yml ...
Reading .github/workflows/yamllint.yml ...
Reading .github/workflows/year.yml ...
Reading .github/workflows/pdd.yml ...
Reading .github/workflows/cargo.yml ...
Reading README.md ...
Reading .rultor.yml ...
Reading Cargo.toml ...
Reading .markdownlint.yml ...
Reading .0pdd.yml ...
Reading LICENSE.txt ...
Reading .yamllint.yml ...

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 0%

Reading package lists... 5%

Reading package lists... 5%

Reading package lists... 5%

Reading package lists... 5%

Reading package lists... 53%

Reading package lists... 53%

Reading package lists... 54%

Reading package lists... 54%

Reading package lists... 61%

Reading package lists... 65%

Reading package lists... 65%

Reading package lists... 72%

Reading package lists... 72%

Reading package lists... 77%

Reading package lists... 77%

Reading package lists... 77%

Reading package lists... 77%

Reading package lists... 78%

Reading package lists... 78%

Reading package lists... 78%

Reading package lists... 78%

Reading package lists... 87%

Reading package lists... 87%

Reading package lists... 93%

Reading package lists... 93%

Reading package lists... 97%

Reading package lists... 97%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... 98%

Reading package lists... Done


Building dependency tree... 0%

Building dependency tree... 0%

Building dependency tree... 50%

Building dependency tree... 50%

Building dependency tree       


Reading state information... 0%

Reading state information... 0%

Reading state information... Done

The following additional packages will be installed:
  libstd-rust-1.59 libstd-rust-dev
Suggested packages:
  cargo lld-13 clang-13
Recommended packages:
  llvm-13
The following NEW packages will be installed:
  libstd-rust-1.59 libstd-rust-dev rustc
0 upgraded, 3 newly installed, 0 to remove and 6 not upgraded.
Need to get 76.3 MB of archives.
After this operation, 349 MB of additional disk space will be used.
\u001b[33m
0% [Working]\u001b[0m
            
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 libstd-rust-1.59 amd64 1.59.0+dfsg1~ubuntu1~llvm-1~ubuntu1~20.04.2 [39.6 MB]
\u001b[33m
0% [1 libstd-rust-1.59 0 B/39.6 MB 0%]\u001b[0m\u001b[33m
1% [1 libstd-rust-1.59 1,291 kB/39.6 MB 3%]\u001b[0m\u001b[33m
12% [1 libstd-rust-1.59 11.8 MB/39.6 MB 30%]\u001b[0m\u001b[33m
24% [1 libstd-rust-1.59 22.6 MB/39.6 MB 57%]\u001b[0m\u001b[33m
35% [1 libstd-rust-1.59 33.4 MB/39.6 MB 84%]\u001b[0m\u001b[33m
                                            
48% [Working]\u001b[0m
             
Ign:2 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 libstd-rust-dev amd64 1.59.0+dfsg1~ubuntu1~llvm-1~ubuntu1~20.04.2
\u001b[33m
48% [Working]\u001b[0m
             
Ign:3 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 rustc amd64 1.59.0+dfsg1~ubuntu1~llvm-1~ubuntu1~20.04.2
\u001b[33m
48% [Working]\u001b[0m
             
Err:2 http://security.ubuntu.com/ubuntu focal-updates/universe amd64 libstd-rust-dev amd64 1.59.0+dfsg1~ubuntu1~llvm-1~ubuntu1~20.04.2
  404  Not Found [IP: 185.125.190.39 80]
\u001b[33m
48% [Working]\u001b[0m
             
Err:3 http://security.ubuntu.com/ubuntu focal-updates/universe amd64 rustc amd64 1.59.0+dfsg1~ubuntu1~llvm-1~ubuntu1~20.04.2
  404  Not Found [IP: 185.125.190.39 80]
\u001b[33m
48% [Working]\u001b[0m
             
Fetched 39.6 MB in 3s (14.5 MB/s)
\u001b[1;31mE: \u001b[0mFailed to fetch http://security.ubuntu.com/ubuntu/pool/universe/r/rustc/libstd-rust-dev_1.59.0+dfsg1~ubuntu1~llvm-1~ubuntu1~20.04.2_amd64.deb  404  Not Found [IP: 185.125.190.39 80]\u001b[0m
\u001b[1;31mE: \u001b[0mFailed to fetch http://security.ubuntu.com/ubuntu/pool/universe/r/rustc/rustc_1.59.0+dfsg1~ubuntu1~llvm-1~ubuntu1~20.04.2_amd64.deb  404  Not Found [IP: 185.125.190.39 80]\u001b[0m
\u001b[1;31mE: \u001b[0mUnable to fetch some archives, maybe run apt-get update or try with --fix-missing?\u001b[0m
container 7fddee71207626c13dd09b05ece9558b9d4ea3671d07d00590dcdbfa66dc4c01 is dead
Sun Jun  2 12:25:36 UTC 2024

@h1alexbel
Copy link
Owner Author

@rultor merge

1 similar comment
@h1alexbel
Copy link
Owner Author

@rultor merge

@l3r8yJ
Copy link
Collaborator

l3r8yJ commented Jun 4, 2024

@h1alexbel looks like we need to debug rultor...

@h1alexbel
Copy link
Owner Author

@l3r8yJ it's in outage for now

@l3r8yJ
Copy link
Collaborator

l3r8yJ commented Jun 4, 2024

@h1alexbel you can close this pr, remove remote branch and reopen pr, maybe it will help

@h1alexbel
Copy link
Owner Author

h1alexbel commented Jun 4, 2024

@l3r8yJ this repository is not connected with this outage, we can only wait for now

@l3r8yJ
Copy link
Collaborator

l3r8yJ commented Jun 5, 2024

@h1alexbel whatsupp here?

@h1alexbel
Copy link
Owner Author

@l3r8yJ @rultor still in the outage. we can merge this pr manually

@l3r8yJ
Copy link
Collaborator

l3r8yJ commented Jun 5, 2024

@h1alexbel sure, wont wait

@l3r8yJ l3r8yJ merged commit 738d065 into master Jun 5, 2024
9 checks passed
@l3r8yJ l3r8yJ deleted the ghas branch June 5, 2024 10:10
h1alexbel added a commit that referenced this pull request Sep 24, 2024
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.

3 participants