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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: deprecate compose file detection by naming #4254

Merged
merged 8 commits into from
Apr 26, 2024

Conversation

jLopezbarb
Copy link
Contributor

@jLopezbarb jLopezbarb commented Apr 19, 2024

Proposed changes

Partly fixes DEV-248.

We are deprecating the detection of a compose or stack file based on the name of the file. Now the users will have to use OKTETO_SUPPORT_STACKS_ENABLED=true in order to have previous behaviour.

How to validate

  1. From https://github.com/okteto/movies-with-compose
  2. Rename docker-compose.yml to stack.yml
  3. Run okteto deploy

CLI Quality Reminders 馃敡

For both authors and reviewers:

  • Scrutinize for potential regressions
  • Ensure key automated tests are in place
  • Build the CLI and test using the validation steps
  • Assess Developer Experience impact (log messages, performances, etc)
  • If too broad, consider breaking into smaller PRs
  • Adhere to our code style and code review guidelines

Signed-off-by: Javier Lopez <javier@okteto.com>
Signed-off-by: Javier Lopez <javier@okteto.com>
Copy link

codecov bot commented Apr 19, 2024

Codecov Report

Attention: Patch coverage is 46.66667% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 45.55%. Comparing base (33c1bbf) to head (22eb918).
Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4254      +/-   ##
==========================================
- Coverage   45.58%   45.55%   -0.03%     
==========================================
  Files         305      305              
  Lines       27602    27612      +10     
==========================================
- Hits        12583    12580       -3     
- Misses      13944    13953       +9     
- Partials     1075     1079       +4     

pkg/model/stack.go Outdated Show resolved Hide resolved
Signed-off-by: Javier Lopez <javier@okteto.com>
pkg/model/stack.go Outdated Show resolved Hide resolved
Signed-off-by: Javier Lopez <javier@okteto.com>
Signed-off-by: Javier Lopez <javier@okteto.com>
pkg/model/stack.go Outdated Show resolved Hide resolved
Signed-off-by: Javier Lopez <javier@okteto.com>
@jLopezbarb jLopezbarb marked this pull request as ready for review April 26, 2024 11:17
@jLopezbarb jLopezbarb requested a review from a team as a code owner April 26, 2024 11:17
Signed-off-by: Javier Lopez <javier@okteto.com>
return true
}
if !isComposeFileName {
oktetoLog.Warning("okteto stack syntax is deprecated. Please consider migrating to compose syntax: https://community.okteto.com/t/important-update-migrating-from-okteto-stacks-to-docker-compose/1262")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
oktetoLog.Warning("okteto stack syntax is deprecated. Please consider migrating to compose syntax: https://community.okteto.com/t/important-update-migrating-from-okteto-stacks-to-docker-compose/1262")
oktetoLog.Warning("Okteto Stack syntax is deprecated. Please consider migrating to Docker Compose syntax: https://community.okteto.com/t/important-update-migrating-from-okteto-stacks-to-docker-compose/1262")

Also, could you share a screenshot? Maybe it looks better with a new line after "Okteto Stack syntax is deprecated"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the first line is very tiny compared to the second one. But the rest of warning messages are this way so I'd go with splitting in two lines
Screenshot 2024-04-26 at 14 09 36

Signed-off-by: Javier Lopez <javier@okteto.com>
@jLopezbarb jLopezbarb merged commit 025d46e into master Apr 26, 2024
11 of 12 checks passed
@jLopezbarb jLopezbarb deleted the jlo/deprecate-stacks-with-envvar branch April 26, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants