Codecatalyst dev environments and changing devfiles

1

Hi there, I've been playing with the devfile.yaml setup and had some issues getting changes recognised. Eventually I did the sensible thing and RTFM or at least the article at https://repost.aws/articles/ARBTATztMgQOeYyMZ9IAmxDw/configuring-codecatalyst-dev-environments.

I'd been editing the devfile and then stopping/re-starting the environment, but this didn't pick up any changes. In the article, it states that after changing the devfile, you need to create a new dev environment to pick up the changes. For myself, this meant first deleting the existing dev env since I got a message about not creating two environments with the same IDE and branch, but after creating the new env I could see the new changes.

I'm assuming this means the devfile is cached somewhere, or that restarting an existing environment doesn't check for changes? Are there any plans to provide a method of 'refreshing' an existing dev environment?

profile picture
asked a year ago289 views
3 Answers
2
Accepted Answer

I think you will need to commit the devfile.yaml to the repository , then stop & kill the Cloud9 instance/dev envronment.

A completely newly created DevEnvironment should then use the devfile.yaml - did you try that?

profile picture
answered a year ago
  • Hi. yes as mentioned above, I've got it working that when creating a new environment it picks up the devfile. It would just be good if there was some mechanism where we could force an environment to pick up a refreshed devfile - but it's a minor pain point.

2

As @Lockhead mentioned, commit your changes and then start the Dev Environment. Let us know if the issue persists.

From our documentation, https://docs.aws.amazon.com/codecatalyst/latest/userguide/devenvironment-devfile.html

We recommended that you edit the devfile in a supported IDE and then update your Dev Environment, but you can also edit the devfile from the root of the source repository in CodeCatalyst. If you edit the devfile in a supported IDE, you must commit and push your changes to the source repository or create a pull request so a team member can review and approve the devfile edits.

answered a year ago
0

Hi there, yes, if I make the changes to the devfile and then start a new environment, the changes get picked up.

I realise that devfiles are probably not going to change very often, so it's just a minor friction point that we have to create a new environment rather than being able to 'refresh' an existing environment.

profile picture
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions