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

Implement .q-ignore functionality for Amazon Q uploads #5664

Open
selenehyun opened this issue Sep 25, 2024 · 4 comments
Open

Implement .q-ignore functionality for Amazon Q uploads #5664

selenehyun opened this issue Sep 25, 2024 · 4 comments
Labels
amazonq codewhisperer feature-request New feature or enhancement. May require GitHub community feedback.

Comments

@selenehyun
Copy link

Problem

The current implementation of the Amazon Q feature in the AWS Toolkit for VS Code does not provide a way to exclude certain files or directories when uploading a project. This becomes problematic for users working with monorepo structures or projects that exceed the 200MB upload limit.

Specifically:

  1. The 200MB upload limit can be quickly reached, especially in monorepo setups.
  2. Files unrelated to the actual code (e.g., build artifacts, large data files) are unnecessarily included in the upload.
  3. There's no built-in mechanism to selectively ignore files or directories during the upload process.

This situation leads to inefficient use of the upload capacity and potentially prevents users from utilizing Amazon Q for larger projects.

Expected behavior

We propose implementing a .q-ignore file functionality, similar to how .gitignore works for Git. This feature would allow users to:

  1. Create a .q-ignore file in their project root.
  2. Specify files, directories, or patterns to be excluded from the Amazon Q upload.
  3. Reduce the upload size by excluding unnecessary files, thus staying within the 200MB limit.
  4. Customize the upload content to focus on relevant code and documentation.

Example of a potential .q-ignore file:

# Ignore node modules
node_modules/

# Ignore build artifacts
build/
dist/

# Ignore large data files
*.csv
*.json

# Ignore specific directories
legacy-code/
test-data/

This feature would greatly enhance the usability of Amazon Q for larger projects and monorepos, allowing developers to efficiently utilize the service within the given constraints.

@selenehyun selenehyun added the feature-request New feature or enhancement. May require GitHub community feedback. label Sep 25, 2024
@selenehyun selenehyun changed the title Feature Request: Implement .q-ignore functionality for Amazon Q uploads Implement .q-ignore functionality for Amazon Q uploads Sep 25, 2024
@justinmk3
Copy link
Contributor

We propose implementing a .q-ignore file functionality, similar to how .gitignore works for Git.

Any reason Q should not just use .gitignore if it is found?

@selenehyun
Copy link
Author

We propose implementing a .q-ignore file functionality, similar to how .gitignore works for Git.

Any reason Q should not just use .gitignore if it is found?

Thank you for your response.

While .gitignore lists files that should not be tracked by version control, it doesn’t necessarily align with the files that Amazon Q needs to analyze or upload.

My project is a monorepo and quite large in size. Even when I explicitly specify files or paths in the prompt, the upload often fails due to the size limit, primarily because of files related to Storybook and other environment configurations.

I proposed the .q-ignore file to exclude code or development environment-related files that are not necessary for analysis, hoping to avoid reaching the upload size limit.

Do you have any suggestions for a better solution?

@justinmk3
Copy link
Contributor

I don't have a better solution. Ideally there would be a quasi-standard pattern to use here, but I didn't find anything. Github copilot has a yaml format but it appears to be part of their UI, not a file that is committed to a project.

@selenehyun
Copy link
Author

I don't have a better solution. Ideally there would be a quasi-standard pattern to use here, but I didn't find anything. Github copilot has a yaml format but it appears to be part of their UI, not a file that is committed to a project.

I also couldn't think of a better solution than using a dedicated ignore file similar to .eslintignore or .npmignore. This approach would allow us to exclude specific types of files from being uploaded to Amazon Q, regardless of the language or development environment.

If you believe this idea has merit, I'd be interested to know if it could be included in the development roadmap or if there's any timeline associated with it. Alternatively, I'd be happy to contribute my time to help implement this feature if that's acceptable.

Thank you again for your attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
amazonq codewhisperer feature-request New feature or enhancement. May require GitHub community feedback.
Projects
None yet
Development

No branches or pull requests

2 participants