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

fix(/dev): Exclude gradle-wrapper.jar and add separate build commands #5266

Closed

Conversation

karanA-aws
Copy link
Contributor

@karanA-aws karanA-aws commented Jan 15, 2025

Types of changes

  • feat: allow install, build, and test commands separately
  • Bug fix: Exclude gradle-wrapper.jar from .gitignore checks
  • Rebase: Rebase dev-execution with the main branch

Description

  • Add individual commands for installation, building, and testing

  • Enhance flexibility in the development workflow

  • Allow users to run specific stages of the process as needed

  • Ignore dismissal of "gradle/wrapper/gradle-wrapper.jar"

  • Ensure the wrapper JAR is tracked even if listed in .gitignore

  • Improve build consistency across different environments

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@karanA-aws karanA-aws requested review from a team as code owners January 15, 2025 20:46
@karanA-aws karanA-aws changed the title Exclude gradle-wrapper.jar and add separate build commands fix: Exclude gradle-wrapper.jar and add separate build commands Jan 15, 2025
@karanA-aws karanA-aws changed the title fix: Exclude gradle-wrapper.jar and add separate build commands fix(/dev): Exclude gradle-wrapper.jar and add separate build commands Jan 15, 2025
@karanA-aws
Copy link
Contributor Author

/retryBuilds

@osdemah
Copy link
Member

osdemah commented Jan 16, 2025

/retryBuild

@@ -112,6 +112,11 @@ class FeatureDevSessionContext(val project: Project, val maxProjectSizeBytes: Lo
suspend fun ignoreFile(file: VirtualFile): Boolean = ignoreFile(file.path)

suspend fun ignoreFile(path: String): Boolean {
// explicitly allow the Gradle wrapper JAR file
if (path.endsWith("gradle/wrapper/gradle-wrapper.jar")) {
Copy link
Member

Choose a reason for hiding this comment

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

don't hardcode here. add a list of them at the top. you can say something like private val requiredBinaryFilesForExecution = setOf("gradle/wrapper/gradle-wrapper.jar")

@@ -373,5 +374,9 @@ class CodeWhispererProjectCodeScanTest : CodeWhispererCodeScanTestBase(PythonCod
// The tests include the markdown file but not these two files.
projectRule.fixture.addFileToProject("/.gitignore", "node_modules\n.idea\n.vscode\n.DS_Store").virtualFile
projectRule.fixture.addFileToProject("test.idea", "ref: refs/heads/main")

Copy link
Member

Choose a reason for hiding this comment

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

please don't change other teams test unless necassary. Change the tests for our team instead. FeatureDevSessionContextTest.kt::testZipProject

karanA-aws and others added 20 commits January 16, 2025 13:16
Add `Dockerfile`, `Dockerfile.build` and `*.dockerfile` to list of supported file extensions for /dev
* enable implicit project context ab test

* patch
The agent may generate files with or without a leading slash in the generated file path. In JetBrains, this results in an exception thrown when attempting to write to the root directory on MacOS. (Various other failure modes may occur due to lack of normalization, depending on OS.)

This change normalized handling within /dev, to avoid breakage or other side effects of non-normalized file paths.
…indings (aws#5133)

When you select - Map Key bindings from Q's status bar - It takes you to a settings panel with setting to change "JB's Inline Suggestion". You must select Q's settings & then update.

This is to update the search text to Amazon Q inline suggestion to avoid confusion with JB's keybindings
* Add framework for processing notifications (aws#5112)

* Add deserialization for notification messages retrieved from the notification file and criteria on whether it should be displayed (aws#5093)

* Display toast notifications with actions

* Condition matcher for displaying notifications

* Modified deserialization cases and added tests

* not required file change

* feedback 1

* modified the base class

* modified test instance lifecycle

* Show toasts for notifications and notification banner on critical notifications(aws#5097)

* Display toast notifications with actions

* Condition matcher for displaying notifications

* Show notification banner

* feedback 1

* Modified deserialization cases and added tests

* not required file change

* feedback 1

* feedback 1

* modified the base class

* merge conflicts resolved

* rearranged call site

* show notifications when panel is opened

* fixed tests

* detekt

* feedback

* convert panels into wrappers

* fixed test

* Adding update/restart action to notifications (aws#5136)

* Poll for new notifications (aws#5119)

* initial commit

* run on startup

* detekt

* move vals

* remote resource implementation

* comments

* detekt

* Validate file before saving

* cache path

* observer implementation

* deserialize notifs from file

* detekt

* remove unused interface

* internal class

* Fix observer

* etag singleton state component

* add telemetry

* atomicBoolean

* initialize once per IDE startup

* code scan

* Omit (Unit)

* specify etag storage location

* detekt

* fix detekt issues

* basic tests

* no star imports

* coroutine scope delay instead of thread.sleep

* feedback fixes

* test fix

* Application Exists for tests

* endpoint object

* detekt

* detekt fixes

* boolean flag

* boolean flag

* update tests

* move startup flag handling to processBase

* fix delay

* fix delay

* Notification dismissal state tracking  (aws#5129)

* split notifications into separated lists.

* add persistent notification dismissal state logic

* boolean changes

* group persistant states

* comments

* Service initialized automatically

* isStartup global

* Deserialized notification schedule type

* tests

* persistent state syntax

* convert to light services

* Remove state from companion object

* detekt

* endpoint as registryKey

* detekt

* fix startup issues

* Expiry issues

* Add logging info to IDE notification polling and processing (aws#5138)

* add logs for polling and processing notifs

* redundant

* finish log

* fix isFirstPoll not setting to false on first pass

---------

Co-authored-by: aws-toolkit-automation <[email protected]>
Co-authored-by: manodnyab <[email protected]>
Co-authored-by: Bryce Ito <[email protected]>
* Add framework for processing notifications (aws#5112)

* Add deserialization for notification messages retrieved from the notification file and criteria on whether it should be displayed (aws#5093)

* Display toast notifications with actions

* Condition matcher for displaying notifications

* Modified deserialization cases and added tests

* not required file change

* feedback 1

* modified the base class

* modified test instance lifecycle

* Show toasts for notifications and notification banner on critical notifications(aws#5097)

* Display toast notifications with actions

* Condition matcher for displaying notifications

* Show notification banner

* feedback 1

* Modified deserialization cases and added tests

* not required file change

* feedback 1

* feedback 1

* modified the base class

* merge conflicts resolved

* rearranged call site

* show notifications when panel is opened

* fixed tests

* detekt

* feedback

* convert panels into wrappers

* fixed test

* Adding update/restart action to notifications (aws#5136)

* Poll for new notifications (aws#5119)

* initial commit

* run on startup

* detekt

* move vals

* remote resource implementation

* comments

* detekt

* Validate file before saving

* cache path

* observer implementation

* deserialize notifs from file

* detekt

* remove unused interface

* internal class

* Fix observer

* etag singleton state component

* add telemetry

* atomicBoolean

* initialize once per IDE startup

* code scan

* Omit (Unit)

* specify etag storage location

* detekt

* fix detekt issues

* basic tests

* no star imports

* coroutine scope delay instead of thread.sleep

* feedback fixes

* test fix

* Application Exists for tests

* endpoint object

* detekt

* detekt fixes

* boolean flag

* boolean flag

* update tests

* move startup flag handling to processBase

* fix delay

* fix delay

* Notification dismissal state tracking  (aws#5129)

* split notifications into separated lists.

* add persistent notification dismissal state logic

* boolean changes

* group persistant states

* comments

* Service initialized automatically

* isStartup global

* Deserialized notification schedule type

* tests

* persistent state syntax

* convert to light services

* Remove state from companion object

* detekt

* endpoint as registryKey

* detekt

* fix startup issues

* Expiry issues

* Add logging info to IDE notification polling and processing (aws#5138)

* add logs for polling and processing notifs

* redundant

* finish log

* show message instead of yesNoDialogue

* initialize ProcessNotificationsBase listener before Polling service

* fix isFirstPoll not setting to false on first pass

---------

Co-authored-by: aws-toolkit-automation <[email protected]>
Co-authored-by: manodnyab <[email protected]>
Co-authored-by: Bryce Ito <[email protected]>
Co-authored-by: Andrew Yu <[email protected]>
Co-authored-by: Ashish Podduturi <[email protected]>
Co-authored-by: Bodie Weedop <[email protected]>
Co-authored-by: C Tidd <[email protected]>
Co-authored-by: Grant G <[email protected]>
Co-authored-by: Kevin Ding <[email protected]>
Co-authored-by: Laxman Reddy <[email protected]>
Co-authored-by: Matt Lee <[email protected]>
Co-authored-by: Matthew McDonald <[email protected]>
Co-authored-by: Randall Jiang <[email protected]>
Co-authored-by: Richard Li <[email protected]>
Co-authored-by: Tai Lai <[email protected]>
Co-authored-by: Zoe Lin <[email protected]>
dhasani23 and others added 23 commits January 16, 2025 17:44
* fix(amazonq): add retry on IOException

* fix test

* update test

* update test

* fix detekt

---------

Co-authored-by: David Hasani <[email protected]>
…s#5241)

* fix(amazonq): Fix code generation error when cancelling /doc task

* fix isEmpty lint failure
* fix(amazonq): add follow up button

* fix(amazonq): add start a new transformation button

* fix(amazonq): add start a new transformation button

* fix detekt

---------

Co-authored-by: David Hasani <[email protected]>
…5253)

* feat(amazonq): add error message if updated README is too large
* fix(amazonq): add link to docs

* add period

---------

Co-authored-by: David Hasani <[email protected]>
…iles are kept in the repo archives (aws#5235)

* fix(amazonq): archives now preserve file premissions and amazon q can edit nvm/gradle files

* fix test failures on windows

* change FS operations to use BG context

---------

Co-authored-by: Hamed Soleimani <[email protected]>
Co-authored-by: manodnyab <[email protected]>
* fix(amazonq): loosen search strings

* make field optional

---------

Co-authored-by: David Hasani <[email protected]>
aws#5263)

* fix(amazonq): rely on server-side data to communicate number of code generations remaining

* fix(amazonq): rely on server-side data to communicate number of code generations remaining

* fix(amazonq): rely on server-side data to communicate number of code generations remaining

* fix(amazonq): rely on server-side data to communicate number of code generations remaining

* fix(amazonq): rely on server-side data to communicate number of code generations remaining
…ith LinesGenerated and CharsGenerated (aws#5254)

* lint

* fix the issue about the discrepancy between  NumOfUnitTestCasesGenerated with LinesGenerated and CharsGenerated

* fix format issue

* remove print command
* telemetry(amazonq): invalid zip event

* check windows path
* telemetry: fix the unknown language issue

* telemetry fix the unknown language issue and remove the wrong print
…ds (aws#5077)

Q /dev team is launching a new feature: Allow Q to execute build/test based on customer's configuration 🎉🎉

We have made a couple tweaks to incorporate the user experience
- Added a new setting to allow Q to run code and test commands per project
- Added a pre-filled prompt option for customer to generate a configuration for this feature
- Added a couple follow up buttons throughout the /dev flow and added logic around them
- Updated copies
- Updated `codefileExtensions` set
@karanA-aws karanA-aws requested a review from a team as a code owner January 17, 2025 01:47
@rli
Copy link
Contributor

rli commented Jan 17, 2025

Please use the existing merge PR to bring the branch up to date #5135.

18k lines of changes is not reasonable to review

Copy link
Member

@osdemah osdemah left a comment

Choose a reason for hiding this comment

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

approve

@karanA-aws karanA-aws closed this Jan 22, 2025
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.