Skip to content

Duplicate Flags in Makefile #11662

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

Closed
wants to merge 14 commits into from

Conversation

vignesh1507
Copy link
Contributor

Duplicate Flags: In the upgrade-pinned-dependencies target, --strip-extras is specified twice in the pip-compile commands:

$(VENV_RUN); pip-compile --strip-extras --upgrade --strip-extras -o requirements-basic.txt pyproject.toml

vignesh1507 and others added 8 commits September 20, 2024 13:28
changes made to the code are as follows:

1. The regular expression r"\smypy_boto3_([a-z0-9_]+)\s" looks for occurrences of mypy_boto3_ followed by alphanumeric characters and underscores. This pattern assumes that there will always be a space before and after the match. However, if mypy_boto3_ appears at the beginning of a line or is surrounded by something other than spaces (like parentheses, quotes, etc.), it won't match.

A slightly more robust regex could be: r"mypy_boto3_([a-z0-9_]+)", which would match mypy_boto3_ patterns regardless of their surrounding whitespace.

2. No Output If No Match:
If result is empty (i.e., no match is found), the script will still print pip install "boto3-stubs[]". It would be better to check if result contains items before printing the pip install command.
Duplicate Flags: In the upgrade-pinned-dependencies target, --strip-extras is specified twice in the pip-compile commands:

```bash
$(VENV_RUN); pip-compile --strip-extras --upgrade --strip-extras -o requirements-basic.txt pyproject.toml
```
@vignesh1507 vignesh1507 requested a review from thrau as a code owner October 9, 2024 18:39
Copy link
Contributor

@bentsku bentsku left a comment

Choose a reason for hiding this comment

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

Hello and thanks for your contribution! Are you using an automated tool for grammar? It seems it was a bit too eager and changed things that do not make sense anymore. Could you revert the commented changes?

I'll ping @silv-io for the change in the Makefile in particular!

edit: I realize some of these changes have been already merged, as your commits are 3 weeks old. There also are some merge conflicts. Could you please rebase your PR?

@@ -338,7 +338,7 @@ def in_docker():
if os_hostname and os_hostname in content:
return True

# containerd does not set any specific file or config, but does use
# container does not set any specific file or config, but it does use
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a wrong automated change, we are indeed talking about containerd

@@ -375,7 +375,7 @@ def in_docker():
return False


# whether the in_docker check should always return True or False
# whether in_docker check should always return True or False
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe the readability is worse with this change

# will resolve to the real DNS entry, rather than the local one.
# will resolve it to the real DNS entry, rather than the local one.
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a wrong change, the sentence is "Any DNS name not matched * will resolve to the... ", the it does not make sense

internal use. This function is also not needed anymore because we don't separate between HTTP
and HTTP ports anymore since LocalStack listens to both."""
internal use. This function is not needed anymore because we don't separate between HTTP
and HTTP ports anymore since LocalStack comprehends to both."""
Copy link
Contributor

Choose a reason for hiding this comment

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

this change does not make sense, this talks about listening to a port, and this does not mean anything?

@@ -33,7 +33,7 @@
# Artifacts endpoint
ASSETS_ENDPOINT = "https://assets.localstack.cloud"

# host to bind to when starting the services
# host to bind when starting the services
Copy link
Contributor

Choose a reason for hiding this comment

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

this is wrong, we "bind to" a host and not bind a host

@@ -327,7 +327,7 @@ def deprecated_endpoint(
endpoint: Callable, previous_path: str, deprecation_version: str, new_path: str
) -> Callable:
"""
Wrapper function which logs a warning (and a deprecation path) whenever a deprecated URL is invoked by a router.
Wrapper function which logs a warning (and a deprecation path) whenever a deprecated URL is invoked by the router.
Copy link
Contributor

Choose a reason for hiding this comment

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

we can have different routers, so a is more correct


print(f'pip install "boto3-stubs[{",".join(result)}]"', end="")
if os.path.exists(filepath):
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this change needed? could you explain it?

@@ -32,8 +32,8 @@

class Directories:
"""
Holds the different directories available to localstack. Some directories are shared between the host and the
localstack container, some live only on the host and some only in the container.
Holds different directories available to localstack. Some directories are shared between the host and the
Copy link
Contributor

Choose a reason for hiding this comment

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

remove the the makes it a bit less readable in my opinion

@bentsku bentsku requested a review from silv-io October 10, 2024 10:20
Copy link
Member

@silv-io silv-io left a comment

Choose a reason for hiding this comment

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

The change in the Make target looks good!

Before merging, I would just ask to remove all the other changes (seems like they were automated?) as they don't seem to be connected to the PR description and goal.

@vignesh1507
Copy link
Contributor Author

ok then shall i delete the files except the makefile one?

@silv-io
Copy link
Member

silv-io commented Oct 10, 2024

@vignesh1507 yes, please just remove the changes outside of the Makefile :)

@silv-io
Copy link
Member

silv-io commented Oct 10, 2024

@vignesh1507 I think there was a bit of a misunderstanding here. We would ask you to revert all the changes outside of the Makefile, not delete those files. To do that, you can do e.g.:

git rebase -i master

And then you can replace all occurrences of pick with drop in all commits except "Update Makefile"

After that you can do git push --force and the changeset should only include the change for the Makefile

@silv-io silv-io added the semver: patch Non-breaking changes which can be included in patch releases label Oct 10, 2024
@vignesh1507 vignesh1507 deleted the version-0.1 branch October 10, 2024 12:30
@vignesh1507
Copy link
Contributor Author

Made a new PR (#11666 ) with only the makefile commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: patch Non-breaking changes which can be included in patch releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants