Skip to content
This repository was archived by the owner on Oct 9, 2024. It is now read-only.

Conversation

@ssbarnea
Copy link
Member

@ssbarnea ssbarnea commented Sep 14, 2021

Most changes are inspired from vscode-ansible extension as we tried
to minimize divergence between their configs.

@ssbarnea ssbarnea requested a review from webknjaz September 14, 2021 14:24
@ssbarnea ssbarnea added the bug Something isn't working label Sep 14, 2021
Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

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

blocking this for now because I have something locally and it should be built on top of that.

@ssbarnea ssbarnea force-pushed the fix/lockfiles branch 2 times, most recently from 74a9d3e to b7845b6 Compare September 14, 2021 14:44
@ssbarnea ssbarnea marked this pull request as ready for review September 14, 2021 14:51
@ssbarnea ssbarnea force-pushed the fix/lockfiles branch 2 times, most recently from 17717ed to 660564a Compare September 14, 2021 14:56
Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

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

Here's a short feedback with places that need to be atomic or changed. But I suggest discussing the GHA specifics after #19 and #20 are in. Other things seem to be mergeable mostly w/o debates.

@@ -0,0 +1,55 @@
# This is a basic workflow
Copy link
Member

Choose a reason for hiding this comment

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

I expect this to be moved to the workflow added in #18 once that is merged.

Comment on lines +9 to +7
branches: [main]
pull_request:
branches: [main]
Copy link
Member

Choose a reason for hiding this comment

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

FWIW I don't think we need to filter branches.

Copy link
Member Author

Choose a reason for hiding this comment

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

In fact it is needed because otherwise it will duplicate the jobs on any development branch, causing noise and making harder to read the checks.

If we will ever have a stable/ branch we can add it to the list but I doubt it will be too soon, if ever.

Another option to avoid duplicate job runs is to remove the push condition entirely. Still that is not ideal as we may want to enable a scheduler for building main every day or week, so we would know the status of the master branch, which could deprecate for external reasons.

I checked other projects where I remember having the duplicate problem in the past and they seem to have kinda similar setup. https://github.com/ansible-community/molecule/blob/main/.github/workflows/tox.yml#L7-L10 or https://github.com/ansible-community/ansible-lint/blob/main/.github/workflows/tox.yml#L7-L10

Whatever we pick, we should ensure that we avoid duplicate check runs on PRs, regardless if it comes from a fork or from inside the repository.

Copy link
Member

Choose a reason for hiding this comment

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

As explained in #18 (comment) and https://github.com/ansible/ansible-language-server/pull/18/files#r710255129 — the filtering is actually harmful to our developer experience for as long as we keep using upstream for our feature branches. But I'll reiterate here — it's should be a dedicated discussion separate from this PR. I firmly believe that we mustn't filter out events until we make the DX suitable for such a setup.
So while I recognize the problem you're attempting to address, I don't believe that we should rush into replacing one annoyance with the other.

# run: npm run-script lint

- name: Run build
run: npm run compile
Copy link
Member

Choose a reason for hiding this comment

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

I think this will need to go to a "devenv" job.

@webknjaz webknjaz added the new Use track issue requiring triage label Sep 15, 2021
This was referenced Sep 16, 2021
ssbarnea added a commit that referenced this pull request Sep 16, 2021
Require modern node>=16 and npm>7.11.2 in order to avoid
bugs and different behaviors during build and testing.

npm 7.11.2 is the version currently shipping with fedora 34.

That is in sync with requirements that we already use for
vscode-ansible extension. These requirements are build/test specific
and do not affect the runtime.

Prevents bug where older npm would mess the format of package-lock.json file.

Originally included in #17
ssbarnea added a commit that referenced this pull request Sep 16, 2021
Require modern node>=12 and npm>=7.11.2 in order to avoid
bugs and different behaviors during build and testing.

npm 7.11.2 is the version currently shipping with fedora 34.

That is in sync with requirements that we already use for
vscode-ansible extension. These requirements are build/test specific
and do not affect the runtime.

Prevents bug where older npm would mess the format of package-lock.json file.

Originally included in #17
@ssbarnea ssbarnea force-pushed the fix/lockfiles branch 6 times, most recently from c858fa2 to 97e5ca8 Compare September 16, 2021 14:22
ssbarnea added a commit that referenced this pull request Sep 16, 2021
Fixes problem introduced by #10 where we missed to keep
it in sync with package.json.

Part-Of: #17
@ssbarnea ssbarnea force-pushed the fix/lockfiles branch 2 times, most recently from 2c22e00 to af23bc3 Compare September 16, 2021 15:51
Comment on lines 20 to 18
# Commented as known to fail passing the tests
# - windows-latest
Copy link
Member

Choose a reason for hiding this comment

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

I'm pretty sure they should be visible as a reference and fixed.

Copy link
Member Author

Choose a reason for hiding this comment

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

I would not add until we get the checks green and fixing would be outside the scope of this change. If we include them and
ignore checks all PRs will report red, making much harder
to identify those that are ready for review or need more work.

That is due to how checks work, any red one makes the entire check red, even if is not required for merging. Its purely due
to the visual hint.

I added bug for tracking that #26

Most changes are inspired from vscode-ansible extension as we tried
to minimize divergence between their configs.
@ssbarnea ssbarnea closed this Sep 28, 2021
@ganeshrn ganeshrn deleted the fix/lockfiles branch October 3, 2021 12:55
@webknjaz webknjaz removed the new Use track issue requiring triage label Nov 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants