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

Cache doesn't work when the project is not in the root of the repository. #476

Open
atayardimci opened this issue Aug 5, 2022 · 12 comments
Labels
feature request New feature or request to improve the current logic

Comments

@atayardimci
Copy link

atayardimci commented Aug 5, 2022

Description:
Add an input to the action (working-directory or project-directory) to specify the path to the project, where the pyproject.toml file is located. Use this directory to look for the pyproject.toml and cached deps.

Justification:
Caching doesn't work for projects where the project is not in the root of the repository.

@atayardimci atayardimci added feature request New feature or request to improve the current logic needs triage labels Aug 5, 2022
@IvanZosimov
Copy link
Contributor

Hi, @atayardimci 👋 Thank you for the feature request, we will take a look at it and get back to you with updates.

@dongho-jung
Copy link

dongho-jung commented Aug 22, 2022

I've been workarounding it as follows for now

-      - uses: actions/setup-python@v4
-        with:
-          python-version: 3.9
-          cache: poetry
-          cache-dependency-path: foo/poetry.lock
-      - run: poetry install

+      - uses: actions/cache@v3
+        with:
+          path: /home/runner/.cache/pypoetry/virtualenvs
+          key: hashFiles('foo/poetry.lock')

I hope this feature request be integrated into setup-python : )

@dmitry-shibanov
Copy link
Contributor

Hello @atayardimci. Sorry for the late response. Could you please try to specify cache-dependency-path with the path to pyproject.toml ?

@atayardimci
Copy link
Author

atayardimci commented Oct 3, 2022

Hi @dmitry-shibanov. I had already tried that, but it didn't work as expected.

@dmitry-shibanov
Copy link
Contributor

Hello @atayardimci. Could you please provide a public repository to reproduce the issue ?

@nschonni
Copy link

nschonni commented Oct 3, 2022

@dmitry-shibanov you can find an example with a poetry.lock in mdn/yari#7236

@stalkerg
Copy link

I have a totally same issue because using monorepo. My root is not the root of the project.

@jbacon-cfs
Copy link

Same issue!

@MaksimZhukov
Copy link
Contributor

Hello everyone!
We've released v4.5.0 action version. Could you please try using it and check that everything is working as expected and the issue is fixed?

@MaksimZhukov
Copy link
Contributor

I am closing the issue, since the new release should fix it.
Please let us know if you are still facing this issue.
Thanks!

@stalkerg
Copy link

stalkerg commented Feb 7, 2023

@MaksimZhukov seems like still not fixed because we can't specify working-directory or project-directory.
If you have monorepo with 20 different projects, have no sense to run find by **/poetry.lock pattern.
Basically, you are solving a different issue - you have one project but not at the root. This issue is about - in your root folder you have multiple projects and you should pick up one.

Base on this PR #447

@MaksimZhukov MaksimZhukov reopened this Feb 7, 2023
@stalkerg
Copy link

Any progress?

mrrajamanickam-coveo added a commit to coveo/ui-kit that referenced this issue Aug 11, 2023
* setup ssr sub-package

https://coveord.atlassian.net/browse/KIT-2600

* wip: add define search engine and related types

https://coveord.atlassian.net/browse/KIT-2600

* copy more type defs from benjamin's branch

https://coveord.atlassian.net/browse/KIT-2600

* specify node version to fix eslint errors reg unsupported node features

node version as per headless doc https://docs.coveo.com/en/headless/latest/usage/
https://coveord.atlassian.net/browse/KIT-2600

* complete copying over all required types

https://coveord.atlassian.net/browse/KIT-2600

* rename couple of types to match underlying names

https://coveord.atlassian.net/browse/KIT-2600

* reorder types based on usage

https://coveord.atlassian.net/browse/KIT-2600

* add headless ssr import path to atomic dev build

https://coveord.atlassian.net/browse/KIT-2600

* add nextjs app for headless ssr example

https://coveord.atlassian.net/browse/KIT-2600

* trim generated files to simplify

https://coveord.atlassian.net/browse/KIT-2600

* add headless as dep

https://coveord.atlassian.net/browse/KIT-2600

* export define search engine from headless ssr

https://coveord.atlassian.net/browse/KIT-2600

* remove async from hydrate as it can't be used with CSR

https://coveord.atlassian.net/browse/KIT-2600

* add sample page using headless ssr utils

https://coveord.atlassian.net/browse/KIT-2600

* simplify result list render, move engine to common dir

https://coveord.atlassian.net/browse/KIT-2600

* fix no-async-promise-executor eslint error

https://coveord.atlassian.net/browse/KIT-2600

* update todos

https://coveord.atlassian.net/browse/KIT-2600

* Revert "remove async from hydrate as it can't be used with CSR"

This reverts commit 256aaab.
https://coveord.atlassian.net/browse/KIT-2600

* render sample with async hydrate

https://coveord.atlassian.net/browse/KIT-2600

* add unit tests

https://coveord.atlassian.net/browse/KIT-2600

* Fix headless isExpiredTokenError (KIT-2620)

https://coveord.atlassian.net/browse/KIT-2600

* add test for results

https://coveord.atlassian.net/browse/KIT-2600

* update comments

* update name, desc of sample pkg

* add a project json to headless ssr pkg

* update headless

* remove pkg lock

* regen root pkg lock

https://coveord.atlassian.net/browse/KIT-2600

* Revert "add headless ssr import path to atomic dev build"

This reverts commit 19c4196.

* pkg json update after build

https://coveord.atlassian.net/browse/KIT-2600

* reorg files under /src/

* add root to eslint config

https://coveord.atlassian.net/browse/KIT-2600

* fix dep list for effect

https://coveord.atlassian.net/browse/KIT-2600

* use suspense when loading

https://coveord.atlassian.net/browse/KIT-2600

* use any action type from redux

https://coveord.atlassian.net/browse/KIT-2600

* add eslint config to ignore unused vars/args starting with underscore

https://coveord.atlassian.net/browse/KIT-2600

* mark exports as @internal

https://coveord.atlassian.net/browse/KIT-2600

* split types into smaller files

https://coveord.atlassian.net/browse/KIT-2600

* split types part 2

https://coveord.atlassian.net/browse/KIT-2600

* change internal tag to beta

https://coveord.atlassian.net/browse/KIT-2600

* move map obj to utils file

https://coveord.atlassian.net/browse/KIT-2600

* move type files under a types/ dir

https://coveord.atlassian.net/browse/KIT-2600

* split types part 3

https://coveord.atlassian.net/browse/KIT-2600

* add loading page for automatic suspense

https://nextjs.org/docs/app/building-your-application/routing/loading-ui-and-streaming
https://coveord.atlassian.net/browse/KIT-2600

* remove loading cmp

https://coveord.atlassian.net/browse/KIT-2600

* render results directly

https://coveord.atlassian.net/browse/KIT-2600

* rename initial state in controller snapshot to remove redundancy/confusion

https://coveord.atlassian.net/browse/KIT-2600

* add custom controller to fetch results from snapshot

https://coveord.atlassian.net/browse/KIT-2600

* mark SSR exported members as @internal

https://coveord.atlassian.net/browse/KIT-2600

* move map object into headless utils

https://coveord.atlassian.net/browse/KIT-2600

* move search engine types to its own file

https://coveord.atlassian.net/browse/KIT-2600

* rename to remove redundant suffix from type files

https://coveord.atlassian.net/browse/KIT-2600

* add new line

https://coveord.atlassian.net/browse/KIT-2600

* update pkg lock

* rename snapshot to initial state

https://coveord.atlassian.net/browse/KIT-2600

* fix eslint no async promise executor

https://coveord.atlassian.net/browse/KIT-2600

* add cypress

https://coveord.atlassian.net/browse/KIT-2643

* add csr smoke test

https://coveord.atlassian.net/browse/KIT-2643

* add web vitals check

https://coveord.atlassian.net/browse/KIT-2643

* add gh action for e2e

https://coveord.atlassian.net/browse/KIT-2643

* add base url config

https://coveord.atlassian.net/browse/KIT-2643

* add specific vitals thresholds based on current stats

https://coveord.atlassian.net/browse/KIT-2643

* add timestamp to rendered results

https://coveord.atlassian.net/browse/KIT-2643

* add ssr smoke test

https://coveord.atlassian.net/browse/KIT-2643

* add test

https://coveord.atlassian.net/browse/KIT-2643

* add note

https://coveord.atlassian.net/browse/KIT-2643

* add span for hydrated msg

https://coveord.atlassian.net/browse/KIT-2643

* modify web vitals thresholds to accommodate CI env

https://coveord.atlassian.net/browse/KIT-2643

* remove unused autogenerated file

https://coveord.atlassian.net/browse/KIT-2643

* remove autogenerated unused e2e file

https://coveord.atlassian.net/browse/KIT-2643

* add cypress config to disable support file

https://coveord.atlassian.net/browse/KIT-2643

* update cypress to v12 and update other deps as well

https://coveord.atlassian.net/browse/KIT-2643

* update test to work with cy12, turn off video

https://coveord.atlassian.net/browse/KIT-2643

* ci: add next cache, enable cy install

https://coveord.atlassian.net/browse/KIT-2643

* revert next to previous patch version

to workaround err UND_ERR_REQ_CONTENT_LENGTH_MISMATCH
https://coveord.atlassian.net/browse/KIT-2643

* ci: remove next cache

actions/setup-python#476
https://coveord.atlassian.net/browse/KIT-2643

* use project instead of working dir

to fix Error: Action failed. Missing package manager lockfile.
https://coveord.atlassian.net/browse/KIT-2643

* revert to using working dir with install false

https://coveord.atlassian.net/browse/KIT-2643
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

8 participants